mirror of
https://github.com/cbeuw/Cloak.git
synced 2024-11-09 19:10:44 +00:00
17 lines
441 B
Go
17 lines
441 B
Go
package server
|
|
|
|
import (
|
|
"crypto"
|
|
"errors"
|
|
"net"
|
|
)
|
|
|
|
type Transport interface {
|
|
HasRecordLayer() bool
|
|
UnitReadFunc() func(net.Conn, []byte) (int, error)
|
|
handshake(reqPacket []byte, privateKey crypto.PrivateKey, originalConn net.Conn) (authenticationInfo, func([]byte) (net.Conn, error), error)
|
|
}
|
|
|
|
var ErrInvalidPubKey = errors.New("public key has invalid format")
|
|
var ErrCiphertextLength = errors.New("ciphertext has the wrong length")
|