Documentation ¶
Index ¶
- Constants
- func DialServerByConf(server string, conf *ProxyChannelConfig) (net.Conn, error)
- func DnsGetDoaminIP(domain string) (string, error)
- func InitialPMuxConfig(conf *ProxyChannelConfig) *pmux.Config
- func MatchPatterns(str string, rules []string) bool
- func NewDialByConf(conf *ProxyChannelConfig) func(network, addr string) (net.Conn, error)
- func NewHTTPClient(conf *ProxyChannelConfig) (*http.Client, error)
- func NewTLSConfig(conf *ProxyChannelConfig) *tls.Config
- func RegisterProxyType(str string, p Proxy) error
- func Start(home string, monitor InternalEventMonitor) error
- func Stop() error
- func SyncConfig(addr string, localDir string) (bool, error)
- type AdminConfig
- type CipherConfig
- type GFWListConfig
- type HTTPBaseConfig
- type HTTPConfig
- type IPRange
- type IPRangeHolder
- type InternalEventMonitor
- type KCPBaseConfig
- type KCPConfig
- type LocalConfig
- type LocalDNSConfig
- type PACConfig
- type Proxy
- type ProxyChannelConfig
- type ProxyConfig
- type ProxyFeatureSet
- type SNIConfig
- type UDPGWConfig
Constants ¶
View Source
const ( BlockedByGFWRule = "BlockedByGFW" InHostsRule = "InHosts" IsCNIPRule = "IsCNIP" )
Variables ¶
This section is empty.
Functions ¶
func DialServerByConf ¶ added in v0.27.2
func DialServerByConf(server string, conf *ProxyChannelConfig) (net.Conn, error)
func DnsGetDoaminIP ¶ added in v0.26.2
func InitialPMuxConfig ¶ added in v0.27.0
func InitialPMuxConfig(conf *ProxyChannelConfig) *pmux.Config
func MatchPatterns ¶ added in v0.26.1
func NewDialByConf ¶ added in v0.27.0
func NewDialByConf(conf *ProxyChannelConfig) func(network, addr string) (net.Conn, error)
func NewHTTPClient ¶ added in v0.26.3
func NewHTTPClient(conf *ProxyChannelConfig) (*http.Client, error)
func NewTLSConfig ¶ added in v0.27.2
func NewTLSConfig(conf *ProxyChannelConfig) *tls.Config
func RegisterProxyType ¶ added in v0.24.1
func Start ¶
func Start(home string, monitor InternalEventMonitor) error
Types ¶
type AdminConfig ¶
type CipherConfig ¶ added in v0.27.0
type GFWListConfig ¶ added in v0.26.0
type HTTPBaseConfig ¶ added in v0.27.0
type HTTPBaseConfig struct {
HTTPPushRateLimitPerSec int
}
type HTTPConfig ¶ added in v0.27.0
type HTTPConfig struct {
HTTPBaseConfig
}
func (*HTTPConfig) UnmarshalJSON ¶ added in v0.27.0
func (hcfg *HTTPConfig) UnmarshalJSON(data []byte) error
type IPRangeHolder ¶
type IPRangeHolder struct {
// contains filtered or unexported fields
}
func (*IPRangeHolder) Clear ¶
func (h *IPRangeHolder) Clear()
func (*IPRangeHolder) FindCountry ¶
func (h *IPRangeHolder) FindCountry(ip string) (string, error)
func (*IPRangeHolder) Len ¶
func (h *IPRangeHolder) Len() int
func (*IPRangeHolder) Less ¶
func (h *IPRangeHolder) Less(i, j int) bool
Less returns whether the element with index i should sort before the element with index j.
func (*IPRangeHolder) Swap ¶
func (h *IPRangeHolder) Swap(i, j int)
Swap swaps the elements with indexes i and j.
type InternalEventMonitor ¶ added in v0.24.1
type KCPBaseConfig ¶ added in v0.27.0
type KCPConfig ¶ added in v0.27.0
type KCPConfig struct {
KCPBaseConfig
}
func (*KCPConfig) UnmarshalJSON ¶ added in v0.27.0
type LocalConfig ¶
type LocalConfig struct { Log []string Cipher CipherConfig UserAgent string User string LocalDNS LocalDNSConfig UDPGW UDPGWConfig SNI SNIConfig Admin AdminConfig GFWList GFWListConfig Proxy []ProxyConfig Channel []ProxyChannelConfig }
var GConf LocalConfig
type LocalDNSConfig ¶
type PACConfig ¶
type Proxy ¶
type Proxy interface { //PrintStat(w io.Writer) CreateMuxSession(server string, conf *ProxyChannelConfig) (mux.MuxSession, error) Features() ProxyFeatureSet }
type ProxyChannelConfig ¶ added in v0.24.1
type ProxyChannelConfig struct { Enable bool Name string ServerList []string ConnsPerServer int SNI []string SNIProxy string Proxy string DialTimeout int ReadTimeout int ReconnectPeriod int HeartBeatPeriod int RCPRandomAdjustment int Compressor string KCP KCPConfig HTTP HTTPConfig // contains filtered or unexported fields }
func (*ProxyChannelConfig) ProxyURL ¶ added in v0.26.0
func (c *ProxyChannelConfig) ProxyURL() *url.URL
type ProxyConfig ¶
type ProxyFeatureSet ¶ added in v0.27.0
type UDPGWConfig ¶ added in v0.27.2
Click to show internal directories.
Click to hide internal directories.