Documentation ¶
Index ¶
- Variables
- func HandleEvent(ev event.Event) error
- func MatchRegexs(str string, rules []*regexp.Regexp) bool
- func NewAuthEvent() *event.AuthEvent
- func NewRegex(rules []string) ([]*regexp.Regexp, error)
- func RegisterProxy(p Proxy) error
- func Start(home string) error
- func Stop() error
- type DirectConfig
- type EncryptConfig
- type Feature
- type GAEConfig
- type IPRange
- type IPRangeHolder
- type LocalConfig
- type LocalDNSConfig
- type PAASConfig
- type PACConfig
- type Proxy
- type ProxyChannel
- type ProxyConfig
- type ProxySession
- type RangeFetcher
- type RemoteChannel
- type RemoteChannelTable
- type RemoteProxyChannel
- type VPSConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrChannelAuthFailed = errors.New("Remote channel auth failed")
View Source
var ErrChannelReadTimeout = errors.New("Remote channel read timeout")
Functions ¶
func HandleEvent ¶
func NewAuthEvent ¶
func RegisterProxy ¶
Types ¶
type DirectConfig ¶
type DirectConfig struct {
SNI []string
}
type EncryptConfig ¶
type IPRangeHolder ¶
type IPRangeHolder struct {
// contains filtered or unexported fields
}
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 LocalConfig ¶
type LocalConfig struct { Log []string Encrypt EncryptConfig UserAgent string Auth string UDPGWAddr string Proxy []ProxyConfig PAAS PAASConfig GAE GAEConfig VPS VPSConfig LocalDNS LocalDNSConfig Direct DirectConfig }
var GConf LocalConfig
type LocalDNSConfig ¶
type PAASConfig ¶
type PACConfig ¶
type ProxyConfig ¶
type ProxySession ¶
type ProxySession struct { Remote *RemoteChannel Hijacked bool SSLHijacked bool // contains filtered or unexported fields }
func (*ProxySession) Close ¶
func (s *ProxySession) Close() error
type RangeFetcher ¶
type RangeFetcher struct { SingleFetchLimit int64 ConcurrentFetcher int32 C *RemoteChannel }
func (*RangeFetcher) Fetch ¶
func (f *RangeFetcher) Fetch(req *event.HTTPRequestEvent) (*event.HTTPResponseEvent, error)
type RemoteChannel ¶
type RemoteChannel struct { Addr string Index int DirectIO bool WriteJoinAuth bool OpenJoinAuth bool HeartBeat bool C RemoteProxyChannel // contains filtered or unexported fields }
func (*RemoteChannel) Close ¶
func (rc *RemoteChannel) Close()
func (*RemoteChannel) Init ¶
func (rc *RemoteChannel) Init() error
func (*RemoteChannel) Stop ¶
func (rc *RemoteChannel) Stop()
type RemoteChannelTable ¶
type RemoteChannelTable struct {
// contains filtered or unexported fields
}
func NewRemoteChannelTable ¶
func NewRemoteChannelTable() *RemoteChannelTable
func (*RemoteChannelTable) Add ¶
func (p *RemoteChannelTable) Add(c *RemoteChannel)
func (*RemoteChannelTable) Select ¶
func (p *RemoteChannelTable) Select() *RemoteChannel
func (*RemoteChannelTable) StopAll ¶
func (p *RemoteChannelTable) StopAll()
type RemoteProxyChannel ¶
Click to show internal directories.
Click to hide internal directories.