Documentation
¶
Index ¶
- func Run()
- type AutoBlacklist
- type BlacklistManager
- type Config
- type DoHResolver
- type DomainDiagnosis
- type DomainProfile
- type FileBlacklist
- type FragmentStrategy
- type HTTPRequest
- type NoBlacklist
- type ProbeResult
- type ProxyServer
- type Socks5Server
- type Statistics
- func (s *Statistics) GetStats() string
- func (s *Statistics) IncrementAllowed()
- func (s *Statistics) IncrementBlocked()
- func (s *Statistics) IncrementError()
- func (s *Statistics) IncrementTotal()
- func (s *Statistics) ReleaseConn()
- func (s *Statistics) TryAcquireConn(max int) bool
- func (s *Statistics) UpdateTraffic(in, out uint64)
- type StrategyRecord
- type TransparentServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AutoBlacklist ¶
type AutoBlacklist struct {
// contains filtered or unexported fields
}
func NewAutoBlacklist ¶
func NewAutoBlacklist(config *Config) *AutoBlacklist
func (*AutoBlacklist) CheckDomain ¶
func (b *AutoBlacklist) CheckDomain(domain string)
func (*AutoBlacklist) IsBlocked ¶
func (b *AutoBlacklist) IsBlocked(domain string) bool
type BlacklistManager ¶
type Config ¶
type Config struct {
Host string
Port int
OutHost string
OutPort int
OutType string
OutUsername string
OutPassword string
BlacklistFile string
FragmentMethod string
DomainMatching string
LogAccess string
LogError string
LogDomains bool
NoBlacklist bool
AutoBlacklist bool
Quiet bool
Username string
Password string
FragmentDelay int
FragmentMin int
FragmentMax int
SplitBeforeSNI bool
SplitAfterSNI bool
FakeSNI string
FrontMapRaw string
FrontMap map[string]string
TTL int
KeepAlive bool
BufferSize int
Timeout int
ConfigFile string
EnableSocks5 bool
Socks5Port int
Socks5Host string
EnableDoH bool
DoHServer string
DoHCache bool
BlockQUIC bool
QUICMode string
QUICDelay int
FakePacket bool
FakePacketTTL int
HTTPObfuscate bool
Adaptive bool
TLSGrease bool
ECHGrease bool
TLSPadding int
TLSShuffle bool
TLSProfile string
FakeSNIPoolRaw string
FakeSNIPool []string
FakePacketCount int
FragmentJitter int
RaceStrategies bool
Scan bool
ScanDomainsRaw string
ScanDomains []string
Preset string
EnableTransparent bool
TransparentHost string
TransparentPort int
TCPFastOpen bool
TCPMSS int
StrategyCacheFile string
StatsHTTP bool
StatsPort int
HostsFile string
MaxConnections int
Benchmark bool
Selftest bool
Profiles map[string]*DomainProfile
// contains filtered or unexported fields
}
func (*Config) GetProfile ¶
func (c *Config) GetProfile(domain string) *DomainProfile
func (*Config) ReloadProfiles ¶
type DoHResolver ¶
type DoHResolver struct {
// contains filtered or unexported fields
}
func NewDoHResolver ¶
func NewDoHResolver(server string, useCache, queryEnabled bool) *DoHResolver
func (*DoHResolver) SetStaticHosts ¶
func (d *DoHResolver) SetStaticHosts(hosts map[string][]net.IP)
type DomainDiagnosis ¶
type DomainDiagnosis struct {
Domain string
SystemDNS []net.IP
DoHDNS []net.IP
DNSMismatch bool
TCPDirect ProbeResult
TLSDirect ProbeResult
TLSFragmentedSNI ProbeResult
TLSFakeSNI ProbeResult
LikelyDPI bool
Method string
Suggestion string
}
type DomainProfile ¶
type FileBlacklist ¶
type FileBlacklist struct {
// contains filtered or unexported fields
}
func NewFileBlacklist ¶
func NewFileBlacklist(config *Config) (*FileBlacklist, error)
func (*FileBlacklist) CheckDomain ¶
func (b *FileBlacklist) CheckDomain(domain string)
func (*FileBlacklist) IsBlocked ¶
func (b *FileBlacklist) IsBlocked(domain string) bool
type FragmentStrategy ¶
type HTTPRequest ¶
type NoBlacklist ¶
type NoBlacklist struct{}
func (*NoBlacklist) CheckDomain ¶
func (n *NoBlacklist) CheckDomain(domain string)
func (*NoBlacklist) IsBlocked ¶
func (n *NoBlacklist) IsBlocked(domain string) bool
type ProxyServer ¶
type ProxyServer struct {
// contains filtered or unexported fields
}
func NewProxyServer ¶
func NewProxyServer(config *Config, stats *Statistics, blacklist BlacklistManager) *ProxyServer
func (*ProxyServer) Start ¶
func (s *ProxyServer) Start() error
func (*ProxyServer) Stop ¶
func (s *ProxyServer) Stop()
type Socks5Server ¶
type Socks5Server struct {
// contains filtered or unexported fields
}
func NewSocks5Server ¶
func NewSocks5Server(config *Config, stats *Statistics, blacklist BlacklistManager, proxy *ProxyServer) *Socks5Server
func (*Socks5Server) Start ¶
func (s *Socks5Server) Start() error
func (*Socks5Server) Stop ¶
func (s *Socks5Server) Stop()
type Statistics ¶
type Statistics struct {
// contains filtered or unexported fields
}
func (*Statistics) GetStats ¶
func (s *Statistics) GetStats() string
func (*Statistics) IncrementAllowed ¶
func (s *Statistics) IncrementAllowed()
func (*Statistics) IncrementBlocked ¶
func (s *Statistics) IncrementBlocked()
func (*Statistics) IncrementError ¶
func (s *Statistics) IncrementError()
func (*Statistics) IncrementTotal ¶
func (s *Statistics) IncrementTotal()
func (*Statistics) ReleaseConn ¶
func (s *Statistics) ReleaseConn()
func (*Statistics) TryAcquireConn ¶
func (s *Statistics) TryAcquireConn(max int) bool
func (*Statistics) UpdateTraffic ¶
func (s *Statistics) UpdateTraffic(in, out uint64)
type StrategyRecord ¶
type StrategyRecord struct {
Strategy FragmentStrategy
Attempts int64
Successes int64
}
func (*StrategyRecord) Confidence ¶
func (r *StrategyRecord) Confidence() float64
type TransparentServer ¶
type TransparentServer struct {
// contains filtered or unexported fields
}
func NewTransparentServer ¶
func NewTransparentServer(config *Config, stats *Statistics, blacklist BlacklistManager, proxy *ProxyServer) *TransparentServer
func (*TransparentServer) Start ¶
func (s *TransparentServer) Start() error
func (*TransparentServer) Stop ¶
func (s *TransparentServer) Stop()
Source Files
¶
- adaptive_stats.go
- benchmark.go
- config.go
- diagnose.go
- doh.go
- domainfront.go
- fakepacket.go
- fingerprint.go
- flags.go
- fragshape.go
- httplimits.go
- httpobfuscate.go
- persistence.go
- privacy.go
- quic_initial.go
- run.go
- selftest.go
- sni_extract.go
- sockopts.go
- sockopts_linux.go
- sockopts_other.go
- socks5.go
- statshttp.go
- strategy.go
- tls_clienthello.go
- tlsprofiles.go
- transparent.go
- transparent_linux.go
- transparent_other.go
- webpanel.go
Click to show internal directories.
Click to hide internal directories.