Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerTypeShadowSocks = "shadowsocks" ServerTypeCustom = "custom" ServerTypeHttp = "http" ServerTypeHttps = "https" ServerTypeDirect = "direct" ServerTypeReject = "direct" LocalServerSocksV5 = "localSocksv5" LocalServerHttp = "localHttp" )
View Source
const (
DEFAULT_SOCKS_PORT = 1080
)
Variables ¶
This section is empty.
Functions ¶
func GeoIPString ¶
Types ¶
type DirectServer ¶ added in v0.2.3
type DirectServer struct {
// contains filtered or unexported fields
}
func NewDirect ¶ added in v0.2.3
func NewDirect() *DirectServer
func (*DirectServer) AddFail ¶ added in v0.2.3
func (s *DirectServer) AddFail()
func (*DirectServer) DialWithRawAddr ¶ added in v0.2.3
func (*DirectServer) FailCount ¶ added in v0.2.3
func (s *DirectServer) FailCount() int
func (*DirectServer) ProxyType ¶ added in v0.2.3
func (s *DirectServer) ProxyType() string
func (*DirectServer) ResetFailCount ¶ added in v0.2.3
func (s *DirectServer) ResetFailCount()
type ProxyConfig ¶
type ProxyConfig struct { SurgeConfig *ini.File GeoDbPath string LocalSocksPort int LocalHost string // contains filtered or unexported fields }
func LoadConfig ¶
func LoadConfig(cfgFile string, geoFile string) *ProxyConfig
func (*ProxyConfig) GetProxyServer ¶ added in v0.2.3
func (c *ProxyConfig) GetProxyServer(action string) ProxyServer
type ProxyServer ¶ added in v0.2.3
type Reject ¶ added in v0.2.3
type Reject struct {
// contains filtered or unexported fields
}
func (*Reject) DialWithRawAddr ¶ added in v0.2.3
func (*Reject) ResetFailCount ¶ added in v0.2.3
func (s *Reject) ResetFailCount()
type ShadowSocksServer ¶ added in v0.2.3
type ShadowSocksServer struct {
// contains filtered or unexported fields
}
func NewShadowSocks ¶ added in v0.2.3
func NewShadowSocks(server string, cipher *ss.Cipher) *ShadowSocksServer
func (*ShadowSocksServer) AddFail ¶ added in v0.2.3
func (s *ShadowSocksServer) AddFail()
func (*ShadowSocksServer) DialWithRawAddr ¶ added in v0.2.3
func (*ShadowSocksServer) FailCount ¶ added in v0.2.3
func (s *ShadowSocksServer) FailCount() int
func (*ShadowSocksServer) ProxyType ¶ added in v0.2.3
func (s *ShadowSocksServer) ProxyType() string
func (*ShadowSocksServer) ResetFailCount ¶ added in v0.2.3
func (s *ShadowSocksServer) ResetFailCount()
type SystemProxySettings ¶ added in v0.2.6
type SystemProxySettings interface { TurnOnGlobProxy() TurnOffGlobProxy() }
Click to show internal directories.
Click to hide internal directories.