mirror of https://github.com/cbeuw/Cloak
Refactor client transport modules
parent
896fd16938
commit
4029763123
@ -1,10 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
type Transport interface {
|
||||
Handshake(rawConn net.Conn, authInfo AuthInfo) (sessionKey [32]byte, err error)
|
||||
net.Conn
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package transports
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package transports
|
||||
|
||||
import (
|
||||
"bytes"
|
@ -0,0 +1,23 @@
|
||||
package transports
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
"github.com/cbeuw/Cloak/internal/common"
|
||||
"net"
|
||||
)
|
||||
|
||||
type Transport interface {
|
||||
Handshake(rawConn net.Conn, authInfo AuthInfo) (sessionKey [32]byte, err error)
|
||||
net.Conn
|
||||
}
|
||||
|
||||
type AuthInfo struct {
|
||||
UID []byte
|
||||
SessionId uint32
|
||||
ProxyMethod string
|
||||
EncryptionMethod byte
|
||||
Unordered bool
|
||||
ServerPubKey crypto.PublicKey
|
||||
MockDomain string
|
||||
WorldState common.WorldState
|
||||
}
|
Loading…
Reference in New Issue