Documentation ¶
Index ¶
- func BuildPipe(src Conn, des Conn) error
- func ConnCopy(src Conn, des Conn, errCh chan error)
- type Conn
- type ConnWrapper
- type Decrypter
- type Encrypter
- type Listener
- type ListerWrapper
- type NetListenerWrapper
- type Obfuscate
- type Protocol
- type ProtocolWrapper
- type Proxy
- type WallCrosser
- type WallCrosserImply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnWrapper ¶
type ConnWrapper struct {
// contains filtered or unexported fields
}
func (ConnWrapper) Close ¶
func (c ConnWrapper) Close() error
type ListerWrapper ¶
type ListerWrapper struct {
// contains filtered or unexported fields
}
func (ListerWrapper) Accept ¶
func (l ListerWrapper) Accept() (Conn, error)
func (ListerWrapper) Close ¶
func (l ListerWrapper) Close() error
type NetListenerWrapper ¶
func (NetListenerWrapper) Accept ¶
func (l NetListenerWrapper) Accept() (Conn, error)
func (NetListenerWrapper) Close ¶
func (l NetListenerWrapper) Close() error
type Protocol ¶
func NewProtocol ¶
type ProtocolWrapper ¶
type ProtocolWrapper struct {
// contains filtered or unexported fields
}
type Proxy ¶
type Proxy interface { // return the Conn ready to forward data // 本地连接: 浏览器->本地服务器 // 远程连接: 本地服务器->远程服务器 // 传入一个本地连接和远程连接,返回一个完成代理握手的远程连接 // 如果本地和远程的代理协议一样,那么直接return remote即可 ClientHandshake(local, remote Conn, p Protocol) (Conn, error) // take a established Conn between client and server as argument // return the established Conn which is the client want to established // 传入一个已经完成可靠网络协议握手的conn,在这个conn上进行 // 代理协议握手,并且返回一个按客户端要求在服务端上建立的连接 ServerHandshake(Conn, Protocol) (Conn, error) }
type WallCrosser ¶
func NewWallCrosser ¶
func NewWallCrosser(protocol Protocol, proxy Proxy, obfuscate Obfuscate) WallCrosser
type WallCrosserImply ¶
type WallCrosserImply struct {
// contains filtered or unexported fields
}
func (WallCrosserImply) ClientConnHandler ¶
func (w WallCrosserImply) ClientConnHandler(conn Conn)
func (WallCrosserImply) ServerConnHandler ¶
func (w WallCrosserImply) ServerConnHandler(conn Conn)
func (*WallCrosserImply) StartClient ¶
func (w *WallCrosserImply) StartClient(loc, serv string)
func (*WallCrosserImply) StartServer ¶
func (w *WallCrosserImply) StartServer(addr string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.