Documentation ¶
Index ¶
- Constants
- func ConnectWS(network string, host string, port string, config config.Config) *websocket.Conn
- func DirectProxy(conn net.Conn, host string, port string, config config.Config)
- func ForwardClient(wsConn *websocket.Conn, conn net.Conn)
- func ForwardRemote(wsConn *websocket.Conn, conn net.Conn)
- func Response(conn net.Conn, rep byte)
- func TCPProxy(conn net.Conn, addrType uint8, host string, port string, config config.Config)
- func UDPProxy(tcpConn net.Conn, config config.Config)
- type RequestAddr
- type UDPServer
Constants ¶
View Source
const ( ConnectCommand = uint8(1) BindCommand = uint8(2) AssociateCommand = uint8(3) Ipv4Address = uint8(1) FqdnAddress = uint8(3) Ipv6Address = uint8(4) )
View Source
const ( SuccessReply uint8 = iota ServerFailure RuleFailure NetworkUnreachable HostUnreachable ConnectionRefused TTLExpired CommandNotSupported AddrTypeNotSupported )
View Source
const ( NoAuth = uint8(0) NoAcceptable = uint8(255) UserPassAuth = uint8(2) UserAuthVersion = uint8(1) AuthSuccess = uint8(0) AuthFailure = uint8(1) )
View Source
const (
BufferSize int = 4 * 1024
)
View Source
const (
Socks5Version = uint8(5)
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RequestAddr ¶ added in v1.1.0
type RequestAddr struct { Host string Port string Username string Password string Network string Timestamp string }
func (*RequestAddr) MarshalBinary ¶ added in v1.1.0
func (e *RequestAddr) MarshalBinary() ([]byte, error)
MarshalBinary
func (*RequestAddr) UnmarshalBinary ¶ added in v1.1.0
func (e *RequestAddr) UnmarshalBinary(data []byte) error
UnmarshalBinary
Click to show internal directories.
Click to hide internal directories.