Documentation ¶
Index ¶
- Constants
- type Auth
- type SSOption
- func WithAutoDetectInterface(enable bool) SSOption
- func WithDefaultDnsNameservers(ns []string) SSOption
- func WithDefaultTransport() SSOption
- func WithEnableSSR() SSOption
- func WithEnableTun() SSOption
- func WithFakeDnsDisableRewrite(disable bool) SSOption
- func WithFakeDnsServer(addr string) SSOption
- func WithGrpcCAPath(caFile string) SSOption
- func WithGrpcCertPath(certFile string) SSOption
- func WithGrpcHostname(hostname string) SSOption
- func WithGrpcKeyPath(keyFile string) SSOption
- func WithGrpcSndRevBuffer(sndBuffer, revBuffer int) SSOption
- func WithGrpcTLS(mode transport.TlsMode) SSOption
- func WithGrpcTransport() SSOption
- func WithHttpAddr(addr string) SSOption
- func WithHttpUserInfo(username, password string) SSOption
- func WithKcpAckNoDelay() SSOption
- func WithKcpCompress() SSOption
- func WithKcpConns(conns int) SSOption
- func WithKcpCrypt(crypt string) SSOption
- func WithKcpDataShard(dataShard int) SSOption
- func WithKcpDscp(dscp int) SSOption
- func WithKcpInterval(interval int) SSOption
- func WithKcpKeepAlive(second int) SSOption
- func WithKcpKey(key string) SSOption
- func WithKcpMTU(mtu int) SSOption
- func WithKcpMode(mode string) SSOption
- func WithKcpNc(nc int) SSOption
- func WithKcpNoDelay(noDelay int) SSOption
- func WithKcpParityShard(parityShard int) SSOption
- func WithKcpResend(resend int) SSOption
- func WithKcpSmuxBuf(smuxBuf int) SSOption
- func WithKcpSmuxVer(smuxVer int) SSOption
- func WithKcpSndRevWnd(sndWnd, revWnd int) SSOption
- func WithKcpSockBuf(sockBuf int) SSOption
- func WithKcpStreamBuf(streamBuf int) SSOption
- func WithKcpTransport() SSOption
- func WithMethod(method string) SSOption
- func WithMitm(enable bool) SSOption
- func WithMitmCAPath(caPath string) SSOption
- func WithMitmFakeCertPool(capacity, interval, expireSecond int) SSOption
- func WithMitmKeyPath(keyPath string) SSOption
- func WithMixedAddr(addr string) SSOption
- func WithObfsHost(host string) SSOption
- func WithObfsParam(param string) SSOption
- func WithObfsTransport() SSOption
- func WithOutboundInterface(ifaceName string) SSOption
- func WithPassword(password string) SSOption
- func WithQuicCAPath(caFile string) SSOption
- func WithQuicCertPath(certFile string) SSOption
- func WithQuicConns(conns int) SSOption
- func WithQuicHandshakeIdleTimeout(timeout time.Duration) SSOption
- func WithQuicHostname(hostname string) SSOption
- func WithQuicKeepAlivePeriod(timeout time.Duration) SSOption
- func WithQuicKeyPath(keyFile string) SSOption
- func WithQuicMaxIdleTimeout(timeout time.Duration) SSOption
- func WithQuicTLS(mode transport.TlsMode) SSOption
- func WithQuicTransport() SSOption
- func WithRuler(ruler *rule.Ruler) SSOption
- func WithSSRObfs(name string) SSOption
- func WithSSRProtocol(name string) SSOption
- func WithSSRProtocolParam(param string) SSOption
- func WithServerAddr(addr string) SSOption
- func WithServerCompose(opts ...SSOption) SSOption
- func WithServerName(name string) SSOption
- func WithSocksAddr(addr string) SSOption
- func WithSocksUserInfo(username, password string) SSOption
- func WithSystemProxy() SSOption
- func WithTcpTunAddr(addrs [][]string) SSOption
- func WithTunCIDR(cidr string) SSOption
- func WithTunMTU(mtu uint32) SSOption
- func WithTunName(name string) SSOption
- func WithUDPRelay(enable bool) SSOption
- func WithWsCAPath(caFile string) SSOption
- func WithWsCertPath(certFile string) SSOption
- func WithWsCompress() SSOption
- func WithWsHost(host string) SSOption
- func WithWsHostname(hostname string) SSOption
- func WithWsKeyPath(keyFile string) SSOption
- func WithWsPath(path string) SSOption
- func WithWsSndRevBuffer(sndBuffer, revBuffer int) SSOption
- func WithWsTLS(mode transport.TlsMode) SSOption
- func WithWsTransport() SSOption
- func WithWsUserAgent(userAgent string) SSOption
- type ShadowsocksClient
- type ShadowsocksServer
Constants ¶
const ( CONNECT = iota + 1 BIND UDP )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSOption ¶
type SSOption interface {
// contains filtered or unexported methods
}
func WithAutoDetectInterface ¶
func WithDefaultDnsNameservers ¶
WithDefaultDnsNameservers default dns nameservers
func WithDefaultTransport ¶
func WithDefaultTransport() SSOption
func WithEnableSSR ¶
func WithEnableSSR() SSOption
WithEnableSSR whether to support SSR connection for example "ss" or "ssr", default "ss"
func WithFakeDnsServer ¶
func WithGrpcCAPath ¶
func WithGrpcCertPath ¶
func WithGrpcHostname ¶
func WithGrpcKeyPath ¶
func WithGrpcSndRevBuffer ¶
func WithGrpcTLS ¶
func WithGrpcTransport ¶
func WithGrpcTransport() SSOption
func WithHttpAddr ¶
func WithHttpUserInfo ¶
func WithKcpAckNoDelay ¶
func WithKcpAckNoDelay() SSOption
func WithKcpCompress ¶
func WithKcpCompress() SSOption
func WithKcpConns ¶
func WithKcpCrypt ¶
WithKcpCrypt support: none, aes-128, aes-192, salsa20, blowfish, twofish, cast5, 3des, tea, xtea, xor, sm4
func WithKcpDataShard ¶
func WithKcpDscp ¶
func WithKcpInterval ¶
func WithKcpKeepAlive ¶
func WithKcpKey ¶
func WithKcpMTU ¶
func WithKcpMode ¶
WithKcpMode fast3, fast2, fast, normal, manual
func WithKcpNoDelay ¶
WithKcpNoDelay NoDelay options fastest: ikcp_nodelay(kcp, 1, 20, 2, 1) nodelay: 0:disable(default), 1:enable interval: internal update timer interval in millisec, default is 100ms resend: 0:disable fast resend(default), 1:enable fast resend nc: 0:normal congestion control(default), 1:disable congestion control
func WithKcpParityShard ¶
func WithKcpResend ¶
func WithKcpSmuxBuf ¶
func WithKcpSmuxVer ¶
func WithKcpSndRevWnd ¶
func WithKcpSockBuf ¶
func WithKcpStreamBuf ¶
func WithKcpTransport ¶
func WithKcpTransport() SSOption
func WithMethod ¶
func WithMitmCAPath ¶
func WithMitmFakeCertPool ¶
func WithMitmKeyPath ¶
func WithMixedAddr ¶
WithMixedAddr mixed proxy ports (SOCKS and HTTP)
func WithObfsHost ¶
func WithObfsParam ¶
func WithObfsTransport ¶
func WithObfsTransport() SSOption
func WithOutboundInterface ¶
WithOutboundInterface set the outgoing interface name
func WithPassword ¶
func WithQuicCAPath ¶
func WithQuicCertPath ¶
func WithQuicConns ¶
func WithQuicHostname ¶
func WithQuicKeepAlivePeriod ¶
func WithQuicKeyPath ¶
func WithQuicMaxIdleTimeout ¶
func WithQuicTLS ¶
func WithQuicTransport ¶
func WithQuicTransport() SSOption
func WithSSRObfs ¶
WithSSRObfs ssr obfs name support obfs plugins: - plain - http_simple - http_post - random_head - tls1.2_ticket_auth - tls1.2_ticket_auth_compatible
func WithSSRProtocol ¶
WithSSRProtocol ssr protocol name support protocol plugins: - origin - auth_sha1_v4 - auth_aes128_md5 - auth_aes128_sha1 - auth_chain_a - auth_chain_b
func WithSSRProtocolParam ¶
func WithServerAddr ¶
func WithServerCompose ¶
func WithServerName ¶
func WithSocksAddr ¶
func WithSocksUserInfo ¶
func WithSystemProxy ¶
func WithSystemProxy() SSOption
WithSystemProxy whether to enable system proxy (for Linux, only Ubuntu and KDE are supported)
func WithTcpTunAddr ¶
func WithTunCIDR ¶
func WithTunMTU ¶
func WithTunName ¶
func WithUDPRelay ¶
func WithWsCAPath ¶
func WithWsCertPath ¶
func WithWsCompress ¶
func WithWsCompress() SSOption
func WithWsHost ¶
func WithWsHostname ¶
func WithWsKeyPath ¶
func WithWsPath ¶
func WithWsSndRevBuffer ¶
func WithWsTransport ¶
func WithWsTransport() SSOption
func WithWsUserAgent ¶
type ShadowsocksClient ¶
type ShadowsocksClient struct { Opts ssOptions // contains filtered or unexported fields }
func NewShadowsocksClient ¶
func NewShadowsocksClient(opts ...SSOption) *ShadowsocksClient
func (*ShadowsocksClient) Close ¶
func (ss *ShadowsocksClient) Close() error
func (*ShadowsocksClient) Start ¶
func (ss *ShadowsocksClient) Start() error
type ShadowsocksServer ¶
type ShadowsocksServer struct { Opts ssOptions // contains filtered or unexported fields }
func NewShadowsocksServer ¶
func NewShadowsocksServer(opts ...SSOption) *ShadowsocksServer
func (*ShadowsocksServer) Close ¶
func (ss *ShadowsocksServer) Close() error
func (*ShadowsocksServer) Start ¶
func (ss *ShadowsocksServer) Start() error