Documentation ¶
Index ¶
- Variables
- func AcceptErrorInfo() string
- func CheckError(err error, info string)
- func CheckErrorOrExit(err error, info string)
- func CheckPort(port string)
- func EnableDebug(flag bool)
- func EnableLog(flag bool)
- func GetLogger() *log.Logger
- func GetPAC() ([]byte, int)
- func InitLog()
- func ListenTCP(localPort string) net.Listener
- func ListenUDP(localPort string) net.Listener
- func PortForwardForClient(localPort, serverAddr string)
- func PortForwardForServer(laborPort, queryPort string)
- func PortOccupiedInfo(port string) string
- func RelayTraffic(dst, src net.Conn)
- func SetLogName(name string)
- func Socks5ForClientByTCP(localPort, serverAddr, method, key string, pacMode bool)
- func Socks5ForClientByUDP(localPort, serverAddr string)
- func Socks5ForServerByTCP(localPort, method, key string)
- func Socks5ForServerByUDP(localPort string)
- func StartHttp(port string)
- func StartSocks5(port string)
- func TCPToUDP(session *kcp.UDPSession, conn net.Conn)
- func UDPToTCP(conn net.Conn, session *kcp.UDPSession)
- type Cipher
- type Conn
- type EncOrDec
Constants ¶
This section is empty.
Variables ¶
View Source
var CipherMap = map[string]*cipherEntity{
"aes-128-cfb": {16, 16, newAESCFBStream},
"aes-192-cfb": {24, 16, newAESCFBStream},
"aes-256-cfb": {32, 16, newAESCFBStream},
"aes-128-ctr": {16, 16, newAESCTRStream},
"aes-192-ctr": {24, 16, newAESCTRStream},
"aes-256-ctr": {32, 16, newAESCTRStream},
"rc4-md5": {16, 16, newRC4MD5Stream},
"rc4-md5-6": {16, 6, newRC4MD5Stream},
"chacha20": {32, 8, newChaCha20Stream},
"chacha20-ietf": {32, 12, newChaCha20Stream},
}
View Source
var (
IV = []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}
)
Functions ¶
func AcceptErrorInfo ¶
func AcceptErrorInfo() string
func CheckError ¶
just check error and print if err is not nil
func CheckErrorOrExit ¶
check error and exit if err is not nil
func EnableDebug ¶
func EnableDebug(flag bool)
func PortForwardForClient ¶
func PortForwardForClient(localPort, serverAddr string)
forward your local port to server port -- client
func PortForwardForServer ¶
func PortForwardForServer(laborPort, queryPort string)
forward your local port to server port -- server
func RelayTraffic ¶
func Socks5ForClientByTCP ¶
func Socks5ForClientByUDP ¶
func Socks5ForClientByUDP(localPort, serverAddr string)
func Socks5ForServerByTCP ¶
func Socks5ForServerByTCP(localPort, method, key string)
func Socks5ForServerByUDP ¶
func Socks5ForServerByUDP(localPort string)
func StartSocks5 ¶
func StartSocks5(port string)
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
func NewCipherInstance ¶
type Conn ¶
func DialWithAddr ¶
dial server and send request addr of client
Click to show internal directories.
Click to hide internal directories.