Documentation
¶
Index ¶
Constants ¶
View Source
const ( TLSModeACME = "acme" TLSModeStatic = "static" )
TLS mode about how to configure the certificate source.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a SoH client with SOCKS4, SOCKS5 and HTTP proxy server.
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
NewClient is used to create SoH client.
type ClientConfig ¶
type ClientConfig struct {
Common struct {
Password string `toml:"password"`
LogPath string `toml:"log_path"`
} `toml:"common"`
Client struct {
Timeout duration `toml:"timeout"`
PreConns int `toml:"pre_conns"`
} `toml:"client"`
Server struct {
Network string `toml:"network"`
Address string `toml:"address"`
RootCA string `toml:"root_ca"`
} `toml:"server"`
Front struct {
Network string `toml:"network"`
Address string `toml:"address"`
Username string `toml:"username"`
Password string `toml:"password"`
} `toml:"front"`
Tunnel struct {
BufferSize int `toml:"buffer_size"`
JitterLevel int `toml:"jitter_level"`
} `toml:"tunnel"`
Android struct {
DNSServer string `toml:"dns_server"`
} `toml:"android"`
} // #nosec
ClientConfig contains configurations for proxy client.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a SOCKS-over-HTTPS server.
type ServerConfig ¶
type ServerConfig struct {
Common struct {
PassHash string `toml:"pwd_hash"`
LogPath string `toml:"log_path"`
} `toml:"common"`
HTTP struct {
Network string `toml:"network"`
Address string `toml:"address"`
Timeout duration `toml:"timeout"`
MaxConns int `toml:"max_conns"`
} `toml:"http"`
TLS struct {
Mode string `toml:"mode"`
ACME struct {
Domains []string `toml:"domains"`
} `toml:"acme"`
Static struct {
Cert string `toml:"cert_path"`
Key string `toml:"key_path"`
} `toml:"static"`
} `toml:"tls"`
Tunnel struct {
MaxBufferSize int `toml:"max_buffer_size"`
} `toml:"tunnel"`
Web struct {
Directory string `toml:"directory"`
} `toml:"web"`
}
ServerConfig contains configurations for proxy server.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.