Versions in this module Expand all Collapse all v1 v1.9.6 Oct 16, 2024 v1.9.5 Sep 26, 2024 v1.9.4 Sep 25, 2024 v1.9.3 Sep 24, 2024 v1.9.2 Sep 21, 2024 Changes in this version + const AuthMethodNoAuth + const AuthMethodUserPass + var FileCache = make(map[string][]byte) + var IPCache = make(map[string]*router.GeoIP) + var SiteCache = make(map[string]*router.GeoSite) + func DecodeVarint(buf []byte) (x uint64, n int) + func DefaultLogConfig() *log.Config + func ParseIP(s string) (*router.CIDR, error) + func ParseRule(msg json.RawMessage) (*router.RoutingRule, error) + func ParseWireGuardKey(str string) (string, error) + func PostProcessConfigureFile(conf *Config) error + func RegisterConfigureFilePostProcessingStage(name string, stage ConfigureFilePostProcessingStage) + func ToCidrList(ips StringList) ([]*router.GeoIP, error) + type APIConfig struct + Listen string + Services []string + Tag string + func (c *APIConfig) Build() (*commander.Config, error) + type Address struct + func ParseSendThough(Addr *string) *Address + func (v *Address) Build() *net.IPOrDomain + func (v *Address) UnmarshalJSON(data []byte) error + type AttributeList struct + func (al *AttributeList) IsEmpty() bool + func (al *AttributeList) Match(domain *router.Domain) bool + type AttributeMatcher interface + Match func(*router.Domain) bool + type Authenticator struct + Request AuthenticatorRequest + Response AuthenticatorResponse + func (v *Authenticator) Build() (proto.Message, error) + type AuthenticatorRequest struct + Headers map[string]*StringList + Method string + Path StringList + Version string + func (v *AuthenticatorRequest) Build() (*http.RequestConfig, error) + type AuthenticatorResponse struct + Headers map[string]*StringList + Reason string + Status string + Version string + func (v *AuthenticatorResponse) Build() (*http.ResponseConfig, error) + type BalancingRule struct + FallbackTag string + Selectors StringList + Strategy StrategyConfig + Tag string + func (r *BalancingRule) Build() (*router.BalancingRule, error) + type BlackholeConfig struct + Response json.RawMessage + func (v *BlackholeConfig) Build() (proto.Message, error) + type BooleanMatcher string + func (m BooleanMatcher) Match(domain *router.Domain) bool + type BridgeConfig struct + Domain string + Tag string + func (c *BridgeConfig) Build() (*reverse.BridgeConfig, error) + type Buildable interface + Build func() (proto.Message, error) + type BurstObservatoryConfig struct + HealthCheck *healthCheckSettings + SubjectSelector []string + func (b BurstObservatoryConfig) Build() (proto.Message, error) + type Config struct + API *APIConfig + BurstObservatory *BurstObservatoryConfig + DNSConfig *DNSConfig + FakeDNS *FakeDNSConfig + InboundConfig *InboundDetourConfig + InboundConfigs []InboundDetourConfig + InboundDetours []InboundDetourConfig + LogConfig *LogConfig + Metrics *MetricsConfig + Observatory *ObservatoryConfig + OutboundConfig *OutboundDetourConfig + OutboundConfigs []OutboundDetourConfig + OutboundDetours []OutboundDetourConfig + Policy *PolicyConfig + Port uint16 + Reverse *ReverseConfig + RouterConfig *RouterConfig + Stats *StatsConfig + Transport *TransportConfig + func (c *Config) Build() (*core.Config, error) + func (c *Config) Override(o *Config, fn string) + type ConfigCreator func() interface + type ConfigCreatorCache map[string]ConfigCreator + func (v ConfigCreatorCache) CreateConfig(id string) (interface{}, error) + func (v ConfigCreatorCache) RegisterCreator(id string, creator ConfigCreator) error + type ConfigureFilePostProcessingStage interface + Process func(conf *Config) error + type CustomSockoptConfig struct + Level string + Opt string + Type string + Value string + type DNSAuthenticator struct + Domain string + func (v *DNSAuthenticator) Build() (proto.Message, error) + type DNSConfig struct + ClientIP *Address + DisableCache bool + DisableFallback bool + DisableFallbackIfMatch bool + Hosts *HostsWrapper + QueryStrategy string + Servers []*NameServerConfig + Tag string + func (c *DNSConfig) Build() (*dns.Config, error) + type DNSOutboundConfig struct + Address *Address + Network Network + NonIPQuery string + Port uint16 + UserLevel uint32 + func (c *DNSOutboundConfig) Build() (proto.Message, error) + type DTLSAuthenticator struct + func (DTLSAuthenticator) Build() (proto.Message, error) + type DokodemoConfig struct + Host *Address + NetworkList *NetworkList + PortValue uint16 + Redirect bool + TimeoutValue uint32 + UserLevel uint32 + func (v *DokodemoConfig) Build() (proto.Message, error) + type DomainSocketConfig struct + Abstract bool + Padding bool + Path string + func (c *DomainSocketConfig) Build() (proto.Message, error) + type FakeDNSConfig struct + func (f *FakeDNSConfig) Build() (*fakedns.FakeDnsPoolMulti, error) + func (f *FakeDNSConfig) UnmarshalJSON(data []byte) error + type FakeDNSPoolElementConfig struct + IPPool string + LRUSize int64 + type FakeDNSPostProcessingStage struct + func (FakeDNSPostProcessingStage) Process(config *Config) error + type FeaturesConfig struct + Detour *VMessDetourConfig + type Fragment struct + Interval string + Length string + Packets string + type FreedomConfig struct + DomainStrategy string + Fragment *Fragment + ProxyProtocol uint32 + Redirect string + Timeout *uint32 + UserLevel uint32 + func (c *FreedomConfig) Build() (proto.Message, error) + type GRPCConfig struct + Authority string + HealthCheckTimeout int32 + IdleTimeout int32 + InitialWindowsSize int32 + MultiMode bool + PermitWithoutStream bool + ServiceName string + UserAgent string + func (g *GRPCConfig) Build() (proto.Message, error) + type HTTPAccount struct + Password string + Username string + func (v *HTTPAccount) Build() *http.Account + type HTTPClientConfig struct + Headers map[string]string + Servers []*HTTPRemoteConfig + func (v *HTTPClientConfig) Build() (proto.Message, error) + type HTTPConfig struct + Headers map[string]*StringList + HealthCheckTimeout int32 + Host *StringList + Method string + Path string + ReadIdleTimeout int32 + func (c *HTTPConfig) Build() (proto.Message, error) + type HTTPRemoteConfig struct + Address *Address + Port uint16 + Users []json.RawMessage + type HTTPResponse struct + func (*HTTPResponse) Build() (proto.Message, error) + type HTTPServerConfig struct + Accounts []*HTTPAccount + Timeout uint32 + Transparent bool + UserLevel uint32 + func (c *HTTPServerConfig) Build() (proto.Message, error) + type HostAddress struct + func (h *HostAddress) UnmarshalJSON(data []byte) error + type HostsWrapper struct + Hosts map[string]*HostAddress + func (m *HostsWrapper) Build() ([]*dns.Config_HostMapping, error) + func (m *HostsWrapper) UnmarshalJSON(data []byte) error + type HttpUpgradeConfig struct + AcceptProxyProtocol bool + Headers map[string]string + Host string + Path string + func (c *HttpUpgradeConfig) Build() (proto.Message, error) + type InboundDetourAllocationConfig struct + Concurrency *uint32 + RefreshMin *uint32 + Strategy string + func (c *InboundDetourAllocationConfig) Build() (*proxyman.AllocationStrategy, error) + type InboundDetourConfig struct + Allocation *InboundDetourAllocationConfig + DomainOverride *StringList + ListenOn *Address + PortList *PortList + Protocol string + Settings *json.RawMessage + SniffingConfig *SniffingConfig + StreamSetting *StreamConfig + Tag string + func (c *InboundDetourConfig) Build() (*core.InboundHandlerConfig, error) + type Int32Range struct + From int32 + To int32 + func (v *Int32Range) UnmarshalJSON(data []byte) error + type JSONConfigLoader struct + func NewJSONConfigLoader(cache ConfigCreatorCache, idKey string, configKey string) *JSONConfigLoader + func (v *JSONConfigLoader) Load(raw []byte) (interface{}, string, error) + func (v *JSONConfigLoader) LoadWithID(raw []byte, id string) (interface{}, error) + type KCPConfig struct + Congestion *bool + DownCap *uint32 + HeaderConfig json.RawMessage + Mtu *uint32 + ReadBufferSize *uint32 + Seed *string + Tti *uint32 + UpCap *uint32 + WriteBufferSize *uint32 + func (c *KCPConfig) Build() (proto.Message, error) + type LogConfig struct + AccessLog string + DNSLog bool + ErrorLog string + LogLevel string + func (v *LogConfig) Build() *log.Config + type LoopbackConfig struct + InboundTag string + func (l LoopbackConfig) Build() (proto.Message, error) + type MetricsConfig struct + Tag string + func (c *MetricsConfig) Build() (*metrics.Config, error) + type MuxConfig struct + Concurrency int16 + Enabled bool + XudpConcurrency int16 + XudpProxyUDP443 string + func (m *MuxConfig) Build() (*proxyman.MultiplexingConfig, error) + type NameServerConfig struct + Address *Address + ClientIP *Address + Domains []string + ExpectIPs StringList + Port uint16 + QueryStrategy string + SkipFallback bool + func (c *NameServerConfig) Build() (*dns.NameServer, error) + func (c *NameServerConfig) UnmarshalJSON(data []byte) error + type Network string + func (v Network) Build() net.Network + type NetworkList []Network + func (v *NetworkList) Build() []net.Network + func (v *NetworkList) UnmarshalJSON(data []byte) error + type NoOpAuthenticator struct + func (NoOpAuthenticator) Build() (proto.Message, error) + type NoOpConnectionAuthenticator struct + func (NoOpConnectionAuthenticator) Build() (proto.Message, error) + type NoneResponse struct + func (*NoneResponse) Build() (proto.Message, error) + type ObservatoryConfig struct + EnableConcurrency bool + ProbeInterval duration.Duration + ProbeURL string + SubjectSelector []string + func (o *ObservatoryConfig) Build() (proto.Message, error) + type OutboundDetourConfig struct + MuxSettings *MuxConfig + Protocol string + ProxySettings *ProxyConfig + SendThrough *string + Settings *json.RawMessage + StreamSetting *StreamConfig + Tag string + func (c *OutboundDetourConfig) Build() (*core.OutboundHandlerConfig, error) + type Policy struct + BufferSize *int32 + ConnectionIdle *uint32 + DownlinkOnly *uint32 + Handshake *uint32 + StatsUserDownlink bool + StatsUserUplink bool + UplinkOnly *uint32 + func (t *Policy) Build() (*policy.Policy, error) + type PolicyConfig struct + Levels map[uint32]*Policy + System *SystemPolicy + func (c *PolicyConfig) Build() (*policy.Config, error) + type PortList struct + Range []PortRange + func (list *PortList) Build() *net.PortList + func (list *PortList) UnmarshalJSON(data []byte) error + type PortRange struct + From uint32 + To uint32 + func (v *PortRange) Build() *net.PortRange + func (v *PortRange) UnmarshalJSON(data []byte) error + type PortalConfig struct + Domain string + Tag string + func (c *PortalConfig) Build() (*reverse.PortalConfig, error) + type ProxyConfig struct + Tag string + TransportLayerProxy bool + func (v *ProxyConfig) Build() (*internet.ProxyConfig, error) + type QUICConfig struct + Header json.RawMessage + Key string + Security string + func (c *QUICConfig) Build() (proto.Message, error) + type REALITYConfig struct + ClientRandPacket string + ClientRandPacketCount string + Dest json.RawMessage + Fingerprint string + MasterKeyLog string + MaxClientVer string + MaxTimeDiff uint64 + MinClientVer string + PaddingSize uint32 + PrivateKey string + PublicKey string + ServerName string + ServerNames []string + ServerRandPacket string + ServerRandPacketCount string + ShortId string + ShortIds []string + Show bool + SpiderX string + SplitPacket string + SubchunkSize uint32 + Type string + Xver uint64 + func (c *REALITYConfig) Build() (proto.Message, error) + type ReverseConfig struct + Bridges []BridgeConfig + Portals []PortalConfig + func (c *ReverseConfig) Build() (proto.Message, error) + type RouterConfig struct + Balancers []*BalancingRule + DomainMatcher string + DomainStrategy *string + RuleList []json.RawMessage + Settings *RouterRulesConfig + func (c *RouterConfig) Build() (*router.Config, error) + type RouterRule struct + BalancerTag string + DomainMatcher string + OutboundTag string + RuleTag string + Type string + type RouterRulesConfig struct + DomainStrategy string + RuleList []json.RawMessage + type SRTPAuthenticator struct + func (SRTPAuthenticator) Build() (proto.Message, error) + type ShadowsocksClientConfig struct + Servers []*ShadowsocksServerTarget + func (v *ShadowsocksClientConfig) Build() (proto.Message, error) + type ShadowsocksServerConfig struct + Cipher string + Email string + IVCheck bool + Level byte + NetworkList *NetworkList + Password string + Users []*ShadowsocksUserConfig + func (v *ShadowsocksServerConfig) Build() (proto.Message, error) + type ShadowsocksServerTarget struct + Address *Address + Cipher string + Email string + IVCheck bool + Level byte + Password string + Port uint16 + UoT bool + UoTVersion int + type ShadowsocksUserConfig struct + Address *Address + Cipher string + Email string + Level byte + Password string + Port uint16 + type SniffingConfig struct + DestOverride *StringList + DomainsExcluded *StringList + Enabled bool + MetadataOnly bool + RouteOnly bool + func (c *SniffingConfig) Build() (*proxyman.SniffingConfig, error) + type SocketConfig struct + AcceptProxyProtocol bool + CustomSockopt []*CustomSockoptConfig + DialerProxy string + DomainStrategy string + Interface string + Mark int32 + TCPCongestion string + TCPKeepAliveIdle int32 + TCPKeepAliveInterval int32 + TCPMaxSeg int32 + TCPUserTimeout int32 + TCPWindowClamp int32 + TFO interface{} + TProxy string + TcpMptcp bool + TcpNoDelay bool + V6only bool + func (c *SocketConfig) Build() (*internet.SocketConfig, error) + type SocksAccount struct + Password string + Username string + func (v *SocksAccount) Build() *socks.Account + type SocksClientConfig struct + Servers []*SocksRemoteConfig + Version string + func (v *SocksClientConfig) Build() (proto.Message, error) + type SocksRemoteConfig struct + Address *Address + Port uint16 + Users []json.RawMessage + type SocksServerConfig struct + Accounts []*SocksAccount + AuthMethod string + Host *Address + Timeout uint32 + UDP bool + UserLevel uint32 + func (v *SocksServerConfig) Build() (proto.Message, error) + type SplitHTTPConfig struct + Headers map[string]string + Host string + NoSSEHeader bool + Path string + ScMaxConcurrentPosts *Int32Range + ScMaxEachPostBytes *Int32Range + ScMinPostsIntervalMs *Int32Range + XPaddingBytes *Int32Range + func (c *SplitHTTPConfig) Build() (proto.Message, error) + type StatsConfig struct + func (c *StatsConfig) Build() (*stats.Config, error) + type StrategyConfig struct + Settings *json.RawMessage + Type string + type StreamConfig struct + DSSettings *DomainSocketConfig + GRPCConfig *GRPCConfig + GUNConfig *GRPCConfig + HTTPSettings *HTTPConfig + HTTPUPGRADESettings *HttpUpgradeConfig + KCPSettings *KCPConfig + Network *TransportProtocol + QUICSettings *QUICConfig + REALITYSettings *REALITYConfig + Security string + SocketSettings *SocketConfig + SplitHTTPSettings *SplitHTTPConfig + TCPSettings *TCPConfig + TLSSettings *TLSConfig + WSSettings *WebSocketConfig + func (c *StreamConfig) Build() (*internet.StreamConfig, error) + type StringList []string + func NewStringList(raw []string) *StringList + func (v *StringList) UnmarshalJSON(data []byte) error + func (v StringList) Len() int + type SystemPolicy struct + StatsInboundDownlink bool + StatsInboundUplink bool + StatsOutboundDownlink bool + StatsOutboundUplink bool + func (p *SystemPolicy) Build() (*policy.SystemPolicy, error) + type TCPConfig struct + AcceptProxyProtocol bool + HeaderConfig json.RawMessage + func (c *TCPConfig) Build() (proto.Message, error) + type TLSCertConfig struct + BuildChain bool + CertFile string + CertStr []string + KeyFile string + KeyStr []string + OcspStapling uint64 + OneTimeLoading bool + Usage string + func (c *TLSCertConfig) Build() (*tls.Certificate, error) + type TLSConfig struct + ALPN *StringList + Certs []*TLSCertConfig + CipherSuites string + DisableSystemRoot bool + EnableSessionResumption bool + Fingerprint string + Insecure bool + MasterKeyLog string + MaxVersion string + MinVersion string + PinnedPeerCertificateChainSha256 *[]string + PinnedPeerCertificatePublicKeySha256 *[]string + RejectUnknownSNI bool + ServerName string + func (c *TLSConfig) Build() (proto.Message, error) + type TransportConfig struct + DSConfig *DomainSocketConfig + GRPCConfig *GRPCConfig + GUNConfig *GRPCConfig + HTTPConfig *HTTPConfig + HTTPUPGRADEConfig *HttpUpgradeConfig + KCPConfig *KCPConfig + QUICConfig *QUICConfig + SplitHTTPConfig *SplitHTTPConfig + TCPConfig *TCPConfig + WSConfig *WebSocketConfig + func (c *TransportConfig) Build() (*global.Config, error) + type TransportProtocol string + func (p TransportProtocol) Build() (string, error) + type TrojanClientConfig struct + Servers []*TrojanServerTarget + func (c *TrojanClientConfig) Build() (proto.Message, error) + type TrojanInboundFallback struct + Alpn string + Dest json.RawMessage + Name string + Path string + Type string + Xver uint64 + type TrojanServerConfig struct + Clients []*TrojanUserConfig + Fallback *TrojanInboundFallback + Fallbacks []*TrojanInboundFallback + func (c *TrojanServerConfig) Build() (proto.Message, error) + type TrojanServerTarget struct + Address *Address + Email string + Flow string + Level byte + Password string + Port uint16 + type TrojanUserConfig struct + Email string + Flow string + Level byte + Password string + type UTPAuthenticator struct + func (UTPAuthenticator) Build() (proto.Message, error) + type User struct + EmailString string + LevelByte byte + func (v *User) Build() *protocol.User + type VLessInboundConfig struct + Clients []json.RawMessage + Decryption string + Fallback *VLessInboundFallback + Fallbacks []*VLessInboundFallback + func (c *VLessInboundConfig) Build() (proto.Message, error) + type VLessInboundFallback struct + Alpn string + Dest json.RawMessage + Name string + Path string + Type string + Xver uint64 + type VLessOutboundConfig struct + Vnext []*VLessOutboundVnext + func (c *VLessOutboundConfig) Build() (proto.Message, error) + type VLessOutboundVnext struct + Address *Address + Port uint16 + Users []json.RawMessage + type VMessAccount struct + Experiments string + ID string + Security string + func (a *VMessAccount) Build() *vmess.Account + type VMessDefaultConfig struct + Level byte + func (c *VMessDefaultConfig) Build() *inbound.DefaultConfig + type VMessDetourConfig struct + ToTag string + func (c *VMessDetourConfig) Build() *inbound.DetourConfig + type VMessInboundConfig struct + Defaults *VMessDefaultConfig + DetourConfig *VMessDetourConfig + Features *FeaturesConfig + Users []json.RawMessage + func (c *VMessInboundConfig) Build() (proto.Message, error) + type VMessOutboundConfig struct + Receivers []*VMessOutboundTarget + func (c *VMessOutboundConfig) Build() (proto.Message, error) + type VMessOutboundTarget struct + Address *Address + Port uint16 + Users []json.RawMessage + type WebSocketConfig struct + AcceptProxyProtocol bool + Headers map[string]string + Host string + Path string + func (c *WebSocketConfig) Build() (proto.Message, error) + type WechatVideoAuthenticator struct + func (WechatVideoAuthenticator) Build() (proto.Message, error) + type WireGuardConfig struct + Address []string + DomainStrategy string + IsClient bool + KernelMode *bool + MTU int32 + NumWorkers int32 + Peers []*WireGuardPeerConfig + Reserved []byte + SecretKey string + func (c *WireGuardConfig) Build() (proto.Message, error) + type WireGuardPeerConfig struct + AllowedIPs []string + Endpoint string + KeepAlive uint32 + PreSharedKey string + PublicKey string + func (c *WireGuardPeerConfig) Build() (proto.Message, error) + type WireguardAuthenticator struct + func (WireguardAuthenticator) Build() (proto.Message, error)