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 WithFakeDnsDomainFilter(domain []string) 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 options.TlsMode) SSOption
- func WithGrpcTransport() SSOption
- func WithHttpAddr(addr string) SSOption
- func WithHttpUserInfo(username, password string) 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 WithMitmProxy(proxy 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 options.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 WithSshAuthorizedKey(key string) SSOption
- func WithSshPassword(password string) SSOption
- func WithSshPrivateKey(key string) SSOption
- func WithSshPublicKey(key string) SSOption
- func WithSshTransport() SSOption
- func WithSshUser(user string) SSOption
- func WithSystemProxy() SSOption
- func WithTcpTunAddr(addrs [][]string) SSOption
- func WithTunAutoRoute(autoRoute bool) SSOption
- func WithTunCIDR(cidr string) SSOption
- func WithTunDnsHijack(dns []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 options.TlsMode) SSOption
- func WithWsTransport() SSOption
- func WithWsUserAgent(userAgent string) SSOption
- type ShadowsocksClient
- type ShadowsocksServer
Constants ¶
View Source
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 WithFakeDnsDomainFilter ¶ added in v1.0.0
func WithFakeDnsServer ¶
func WithGrpcCAPath ¶
func WithGrpcCertPath ¶
func WithGrpcHostname ¶
func WithGrpcKeyPath ¶
func WithGrpcSndRevBuffer ¶
func WithGrpcTLS ¶
func WithGrpcTransport ¶
func WithGrpcTransport() SSOption
func WithHttpAddr ¶
func WithHttpUserInfo ¶
func WithMethod ¶
func WithMitmCAPath ¶
func WithMitmFakeCertPool ¶
func WithMitmKeyPath ¶
func WithMitmProxy ¶ added in v1.1.0
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 WithSshAuthorizedKey ¶ added in v1.1.1
func WithSshPassword ¶ added in v1.1.1
func WithSshPrivateKey ¶ added in v1.1.1
func WithSshPublicKey ¶ added in v1.1.1
func WithSshTransport ¶ added in v1.1.1
func WithSshTransport() SSOption
func WithSshUser ¶ added in v1.1.1
func WithSystemProxy ¶
func WithSystemProxy() SSOption
WithSystemProxy whether to enable system proxy (for Linux, only Ubuntu and KDE are supported)
func WithTcpTunAddr ¶
func WithTunAutoRoute ¶ added in v1.2.0
func WithTunCIDR ¶
func WithTunDnsHijack ¶ added in v1.0.0
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.