Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(config *protocol.Protocol_Shadowsocks) protocol.WrapProxy
Example ¶
simple := simple.New(&protocol.Protocol_Simple{ Simple: &protocol.Simple{ Host: "127.0.0.1", Port: 1080, PacketConnDirect: false, }, }) ws := websocket.New(&protocol.Protocol_Websocket{ Websocket: &protocol.Websocket{ Host: "localhost", }, }) ss := New(&protocol.Protocol_Shadowsocks{ Shadowsocks: &protocol.Shadowsocks{ Method: "aes-128-gcm", Password: "test", }, }) var err error var conn netapi.Proxy for _, wrap := range []protocol.WrapProxy{simple, ws, ss} { conn, err = wrap(conn) if err != nil { panic(err) } }
Output:
func NewHTTPOBFS ¶
func NewHTTPOBFS(config *protocol.Protocol_ObfsHttp) protocol.WrapProxy
func NewPacketConn ¶
func NewPacketConn(conn net.PacketConn) net.PacketConn
Types ¶
type HTTPObfs ¶
from https://github.com/Dreamacro/clash/blob/master/component/simple-obfs/http.go
HTTPObfs is shadowsocks http simple-obfs implementation
type Shadowsocks ¶
type Shadowsocks struct { netapi.EmptyDispatch // contains filtered or unexported fields }
Shadowsocks shadowsocks
func (*Shadowsocks) PacketConn ¶
func (s *Shadowsocks) PacketConn(ctx context.Context, tar netapi.Address) (net.PacketConn, error)
PacketConn .
Directories ¶
Path | Synopsis |
---|---|
Package bloom implements Bloom Filter using double hashing
|
Package bloom implements Bloom Filter using double hashing |
Package shadowaead implements a simple AEAD-protected secure protocol.
|
Package shadowaead implements a simple AEAD-protected secure protocol. |
Click to show internal directories.
Click to hide internal directories.