Documentation
¶
Overview ¶
Index ¶
- Constants
- func HandleShadowsocksTCP(sc *shadowsocksConn) error
- func HandleSocks5TCP(conn io.ReadWriteCloser, srv Node) error
- func HandleSocks5UDP(conn net.PacketConn, saddr net.Addr, packet []byte, srv Node) error
- func ParseConfig(path string, conf *Config) error
- type Config
- type Node
- type Shadowsocks
Constants ¶
View Source
const ( OTADisabled = 1 << iota OTASenderRequest OTASenderChunk OTAReceiverRequest OTAReceiverChunk )
Variables ¶
This section is empty.
Functions ¶
func HandleSocks5TCP ¶
func HandleSocks5TCP(conn io.ReadWriteCloser, srv Node) error
func HandleSocks5UDP ¶
func ParseConfig ¶
Types ¶
type Config ¶
type Config struct {
Rnode string `toml:"rnode"`
Pnode string `toml:"pnode"`
Password string `toml:"password"`
Timeout int `toml:"timeout"`
Method string `toml:"method"`
FastOpen bool `toml:"fast_open"`
Workers int `toml:"workers"`
PreferIpv6 bool `toml:"prefer_ipv6"`
OneTimeAuth bool `toml:"one_time_auth"`
}
type Shadowsocks ¶
type Shadowsocks struct {
RemoteTCPAddr *net.TCPAddr
RemoteUDPAddr *net.UDPAddr
// contains filtered or unexported fields
}
func NewShadowsocks ¶
func NewShadowsocks(raddr, method, password string, otaStatus int) (*Shadowsocks, error)
func (*Shadowsocks) AcceptTCP ¶
func (ss *Shadowsocks) AcceptTCP(conn net.Conn) (*shadowsocksConn, error)
func (*Shadowsocks) AcceptUDP ¶
func (ss *Shadowsocks) AcceptUDP(conn *net.UDPConn) (*shadowsocksPacketConn, error)
func (*Shadowsocks) DialTCP ¶
func (ss *Shadowsocks) DialTCP() (*shadowsocksConn, error)
func (*Shadowsocks) DialUDP ¶
func (ss *Shadowsocks) DialUDP() (*shadowsocksPacketConn, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.