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, scheme string) func(network, addr string) (net.Conn, error)
- func NewHTTPClient(conf *ProxyChannelConfig, scheme string) (*http.Client, error)
- func NewTLSConfig(conf *ProxyChannelConfig) *tls.Config
- func RegisterProxyType(str string, p Proxy) error
- func Start(options ProxyOptions) error
- func StartProxy() error
- func Stop() error
- func SyncConfig(addr string, localDir string) (bool, error)
- type AdminConfig
- type CipherConfig
- type GFWListConfig
- type HTTPBaseConfig
- type HTTPConfig
- type KCPBaseConfig
- type KCPConfig
- type LocalConfig
- type LocalDNSConfig
- type PACConfig
- type Proxy
- type ProxyChannelConfig
- type ProxyConfig
- type ProxyFeatureSet
- type ProxyOptions
- type RemoteDNSConfig
- type SNIConfig
- type UDPGWConfig
Constants ¶
View Source
const ( BlockedByGFWRule = "BlockedByGFW" InHostsRule = "InHosts" IsCNIPRule = "IsCNIP" )
View Source
const ( SO_ORIGINAL_DST = 80 IP6T_SO_ORIGINAL_DST = 80 IPV6_RECVORIGDSTADDR = 74 )
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 NewHTTPClient ¶ added in v0.26.3
func NewHTTPClient(conf *ProxyChannelConfig, scheme string) (*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(options ProxyOptions) error
func StartProxy ¶ added in v0.29.0
func StartProxy() 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 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 RemoteDNS RemoteDNSConfig UDPGW UDPGWConfig SNI SNIConfig Admin AdminConfig GFWList GFWListConfig TransparentMark int 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 ProxyOptions ¶ added in v0.28.0
type RemoteDNSConfig ¶ added in v0.28.0
type RemoteDNSConfig struct {
TrustedDNS []string
}
type UDPGWConfig ¶ added in v0.27.2
type UDPGWConfig struct {
Addr string
}
Click to show internal directories.
Click to hide internal directories.