Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type Address
- type AttributeList
- type AttributeMatcher
- type Authenticator
- type AuthenticatorRequest
- type AuthenticatorResponse
- type BalancingRule
- type BlackholeConfig
- type BooleanMatcher
- type BridgeConfig
- type Buildable
- type BurstObservatoryConfig
- type Config
- type ConfigCreator
- type ConfigCreatorCache
- type ConfigureFilePostProcessingStage
- type CustomSockoptConfig
- type DNSAuthenticator
- type DNSConfig
- type DNSOutboundConfig
- type DTLSAuthenticator
- type DokodemoConfig
- type FakeDNSConfig
- type FakeDNSPoolElementConfig
- type FakeDNSPostProcessingStage
- type FeaturesConfig
- type Fragment
- type FreedomConfig
- type GRPCConfig
- type HTTPAccount
- type HTTPClientConfig
- type HTTPConfig
- type HTTPRemoteConfig
- type HTTPResponse
- type HTTPServerConfig
- type HostAddress
- type HostsWrapper
- type HttpUpgradeConfig
- type InboundDetourAllocationConfig
- type InboundDetourConfig
- type Int32Range
- type JSONConfigLoader
- type KCPConfig
- type LogConfig
- type LoopbackConfig
- type MetricsConfig
- type MuxConfig
- type NameServerConfig
- type Network
- type NetworkList
- type NoOpAuthenticator
- type NoOpConnectionAuthenticator
- type Noise
- type NoneResponse
- type ObservatoryConfig
- type OutboundDetourConfig
- type Policy
- type PolicyConfig
- type PortList
- type PortRange
- type PortalConfig
- type ProxyConfig
- type REALITYConfig
- type ReverseConfig
- type RouterConfig
- type RouterRule
- type RouterRulesConfig
- type SRTPAuthenticator
- type ShadowsocksClientConfig
- type ShadowsocksServerConfig
- type ShadowsocksServerTarget
- type ShadowsocksUserConfig
- type SniffingConfig
- type SocketConfig
- type SocksAccount
- type SocksClientConfig
- type SocksRemoteConfig
- type SocksServerConfig
- type SplitHTTPConfig
- type StatsConfig
- type StrategyConfig
- type StreamConfig
- type StringList
- type SystemPolicy
- type TCPConfig
- type TLSCertConfig
- type TLSConfig
- type TransportProtocol
- type TrojanClientConfig
- type TrojanInboundFallback
- type TrojanServerConfig
- type TrojanServerTarget
- type TrojanUserConfig
- type UTPAuthenticator
- type User
- type VLessInboundConfig
- type VLessInboundFallback
- type VLessOutboundConfig
- type VLessOutboundVnext
- type VMessAccount
- type VMessDefaultConfig
- type VMessDetourConfig
- type VMessInboundConfig
- type VMessOutboundConfig
- type VMessOutboundTarget
- type WebSocketConfig
- type WechatVideoAuthenticator
- type WireGuardConfig
- type WireGuardPeerConfig
- type WireguardAuthenticator
Constants ¶
const ( AuthMethodNoAuth = "noauth" AuthMethodUserPass = "password" )
Variables ¶
Functions ¶
func DecodeVarint ¶
func DefaultLogConfig ¶
func ParseRule ¶
func ParseRule(msg json.RawMessage) (*router.RoutingRule, error)
func ParseWireGuardKey ¶ added in v1.8.24
func RegisterConfigureFilePostProcessingStage ¶
func RegisterConfigureFilePostProcessingStage(name string, stage ConfigureFilePostProcessingStage)
func ToCidrList ¶
func ToCidrList(ips StringList) ([]*router.GeoIP, error)
Types ¶
type APIConfig ¶
type Address ¶
func ParseSendThough ¶ added in v1.8.10
Convert string to Address.
func (*Address) Build ¶
func (v *Address) Build() *net.IPOrDomain
func (*Address) UnmarshalJSON ¶
type AttributeList ¶
type AttributeList struct {
// contains filtered or unexported fields
}
func (*AttributeList) IsEmpty ¶
func (al *AttributeList) IsEmpty() bool
type AttributeMatcher ¶
type Authenticator ¶
type Authenticator struct { Request AuthenticatorRequest `json:"request"` Response AuthenticatorResponse `json:"response"` }
type AuthenticatorRequest ¶
type AuthenticatorRequest struct { Version string `json:"version"` Method string `json:"method"` Path StringList `json:"path"` Headers map[string]*StringList `json:"headers"` }
func (*AuthenticatorRequest) Build ¶
func (v *AuthenticatorRequest) Build() (*http.RequestConfig, error)
type AuthenticatorResponse ¶
type AuthenticatorResponse struct { Version string `json:"version"` Status string `json:"status"` Reason string `json:"reason"` Headers map[string]*StringList `json:"headers"` }
func (*AuthenticatorResponse) Build ¶
func (v *AuthenticatorResponse) Build() (*http.ResponseConfig, error)
type BalancingRule ¶
type BalancingRule struct { Tag string `json:"tag"` Selectors StringList `json:"selector"` Strategy StrategyConfig `json:"strategy"` FallbackTag string `json:"fallbackTag"` }
func (*BalancingRule) Build ¶
func (r *BalancingRule) Build() (*router.BalancingRule, error)
Build builds the balancing rule
type BlackholeConfig ¶
type BlackholeConfig struct {
Response json.RawMessage `json:"response"`
}
type BooleanMatcher ¶
type BooleanMatcher string
type BridgeConfig ¶
func (*BridgeConfig) Build ¶
func (c *BridgeConfig) Build() (*reverse.BridgeConfig, error)
type BurstObservatoryConfig ¶ added in v1.8.10
type BurstObservatoryConfig struct { SubjectSelector []string `json:"subjectSelector"` // health check settings HealthCheck *healthCheckSettings `json:"pingConfig,omitempty"` }
type Config ¶
type Config struct { // Port of this Point server. // Deprecated: Port exists for historical compatibility // and should not be used. Port uint16 `json:"port"` // Deprecated: Global transport config is no longer used // left for returning error Transport map[string]json.RawMessage `json:"transport"` LogConfig *LogConfig `json:"log"` RouterConfig *RouterConfig `json:"routing"` DNSConfig *DNSConfig `json:"dns"` InboundConfigs []InboundDetourConfig `json:"inbounds"` OutboundConfigs []OutboundDetourConfig `json:"outbounds"` Policy *PolicyConfig `json:"policy"` API *APIConfig `json:"api"` Metrics *MetricsConfig `json:"metrics"` Stats *StatsConfig `json:"stats"` Reverse *ReverseConfig `json:"reverse"` FakeDNS *FakeDNSConfig `json:"fakeDns"` Observatory *ObservatoryConfig `json:"observatory"` BurstObservatory *BurstObservatoryConfig `json:"burstObservatory"` }
type ConfigCreator ¶
type ConfigCreator func() interface{}
type ConfigCreatorCache ¶
type ConfigCreatorCache map[string]ConfigCreator
func (ConfigCreatorCache) CreateConfig ¶
func (v ConfigCreatorCache) CreateConfig(id string) (interface{}, error)
func (ConfigCreatorCache) RegisterCreator ¶
func (v ConfigCreatorCache) RegisterCreator(id string, creator ConfigCreator) error
type CustomSockoptConfig ¶ added in v1.8.24
type DNSAuthenticator ¶
type DNSAuthenticator struct {
Domain string `json:"domain"`
}
type DNSConfig ¶
type DNSConfig struct { Servers []*NameServerConfig `json:"servers"` Hosts *HostsWrapper `json:"hosts"` ClientIP *Address `json:"clientIp"` Tag string `json:"tag"` QueryStrategy string `json:"queryStrategy"` DisableCache bool `json:"disableCache"` DisableFallback bool `json:"disableFallback"` DisableFallbackIfMatch bool `json:"disableFallbackIfMatch"` }
DNSConfig is a JSON serializable object for dns.Config.
type DNSOutboundConfig ¶
type DTLSAuthenticator ¶
type DTLSAuthenticator struct{}
type DokodemoConfig ¶
type FakeDNSConfig ¶
type FakeDNSConfig struct {
// contains filtered or unexported fields
}
func (*FakeDNSConfig) Build ¶
func (f *FakeDNSConfig) Build() (*fakedns.FakeDnsPoolMulti, error)
func (*FakeDNSConfig) UnmarshalJSON ¶
func (f *FakeDNSConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements encoding/json.Unmarshaler.UnmarshalJSON
type FakeDNSPostProcessingStage ¶
type FakeDNSPostProcessingStage struct{}
func (FakeDNSPostProcessingStage) Process ¶
func (FakeDNSPostProcessingStage) Process(config *Config) error
type FeaturesConfig ¶
type FeaturesConfig struct {
Detour *VMessDetourConfig `json:"detour"`
}
type FreedomConfig ¶
type GRPCConfig ¶
type GRPCConfig struct { Authority string `json:"authority"` ServiceName string `json:"serviceName"` MultiMode bool `json:"multiMode"` IdleTimeout int32 `json:"idle_timeout"` HealthCheckTimeout int32 `json:"health_check_timeout"` PermitWithoutStream bool `json:"permit_without_stream"` InitialWindowsSize int32 `json:"initial_windows_size"` UserAgent string `json:"user_agent"` }
type HTTPAccount ¶
func (*HTTPAccount) Build ¶
func (v *HTTPAccount) Build() *http.Account
type HTTPClientConfig ¶
type HTTPClientConfig struct { Servers []*HTTPRemoteConfig `json:"servers"` Headers map[string]string `json:"headers"` }
type HTTPConfig ¶
type HTTPConfig struct { Host *StringList `json:"host"` Path string `json:"path"` ReadIdleTimeout int32 `json:"read_idle_timeout"` HealthCheckTimeout int32 `json:"health_check_timeout"` Method string `json:"method"` Headers map[string]*StringList `json:"headers"` }
type HTTPRemoteConfig ¶
type HTTPRemoteConfig struct { Address *Address `json:"address"` Port uint16 `json:"port"` Users []json.RawMessage `json:"users"` }
type HTTPResponse ¶
type HTTPResponse struct{}
type HTTPServerConfig ¶
type HTTPServerConfig struct { Timeout uint32 `json:"timeout"` Accounts []*HTTPAccount `json:"accounts"` Transparent bool `json:"allowTransparent"` UserLevel uint32 `json:"userLevel"` }
type HostAddress ¶
type HostAddress struct {
// contains filtered or unexported fields
}
func (*HostAddress) UnmarshalJSON ¶
func (h *HostAddress) UnmarshalJSON(data []byte) error
UnmarshalJSON implements encoding/json.Unmarshaler.UnmarshalJSON
type HostsWrapper ¶
type HostsWrapper struct {
Hosts map[string]*HostAddress
}
func (*HostsWrapper) Build ¶
func (m *HostsWrapper) Build() ([]*dns.Config_HostMapping, error)
Build implements Buildable
func (*HostsWrapper) UnmarshalJSON ¶
func (m *HostsWrapper) UnmarshalJSON(data []byte) error
UnmarshalJSON implements encoding/json.Unmarshaler.UnmarshalJSON
type HttpUpgradeConfig ¶ added in v1.8.10
type InboundDetourAllocationConfig ¶
type InboundDetourAllocationConfig struct { Strategy string `json:"strategy"` Concurrency *uint32 `json:"concurrency"` RefreshMin *uint32 `json:"refresh"` }
func (*InboundDetourAllocationConfig) Build ¶
func (c *InboundDetourAllocationConfig) Build() (*proxyman.AllocationStrategy, error)
Build implements Buildable.
type InboundDetourConfig ¶
type InboundDetourConfig struct { Protocol string `json:"protocol"` PortList *PortList `json:"port"` ListenOn *Address `json:"listen"` Settings *json.RawMessage `json:"settings"` Tag string `json:"tag"` Allocation *InboundDetourAllocationConfig `json:"allocate"` StreamSetting *StreamConfig `json:"streamSettings"` DomainOverride *StringList `json:"domainOverride"` SniffingConfig *SniffingConfig `json:"sniffing"` }
func (*InboundDetourConfig) Build ¶
func (c *InboundDetourConfig) Build() (*core.InboundHandlerConfig, error)
Build implements Buildable.
type Int32Range ¶ added in v1.8.24
Int32Range deserializes from "1-2" or 1, so can deserialize from both int and number. Negative integers can be passed as sentinel values, but do not parse as ranges.
func (*Int32Range) UnmarshalJSON ¶ added in v1.8.24
func (v *Int32Range) UnmarshalJSON(data []byte) error
type JSONConfigLoader ¶
type JSONConfigLoader struct {
// contains filtered or unexported fields
}
func NewJSONConfigLoader ¶
func NewJSONConfigLoader(cache ConfigCreatorCache, idKey string, configKey string) *JSONConfigLoader
func (*JSONConfigLoader) Load ¶
func (v *JSONConfigLoader) Load(raw []byte) (interface{}, string, error)
func (*JSONConfigLoader) LoadWithID ¶
func (v *JSONConfigLoader) LoadWithID(raw []byte, id string) (interface{}, error)
type KCPConfig ¶
type KCPConfig struct { Mtu *uint32 `json:"mtu"` Tti *uint32 `json:"tti"` UpCap *uint32 `json:"uplinkCapacity"` DownCap *uint32 `json:"downlinkCapacity"` Congestion *bool `json:"congestion"` ReadBufferSize *uint32 `json:"readBufferSize"` WriteBufferSize *uint32 `json:"writeBufferSize"` HeaderConfig json.RawMessage `json:"header"` Seed *string `json:"seed"` }
type LogConfig ¶
type LoopbackConfig ¶
type LoopbackConfig struct {
InboundTag string `json:"inboundTag"`
}
type MetricsConfig ¶
type MetricsConfig struct {
Tag string `json:"tag"`
}
type MuxConfig ¶
type NameServerConfig ¶
type NameServerConfig struct { Address *Address ClientIP *Address Port uint16 SkipFallback bool Domains []string ExpectIPs StringList QueryStrategy string }
func (*NameServerConfig) Build ¶
func (c *NameServerConfig) Build() (*dns.NameServer, error)
func (*NameServerConfig) UnmarshalJSON ¶
func (c *NameServerConfig) UnmarshalJSON(data []byte) error
type NetworkList ¶
type NetworkList []Network
func (*NetworkList) Build ¶
func (v *NetworkList) Build() []net.Network
func (*NetworkList) UnmarshalJSON ¶
func (v *NetworkList) UnmarshalJSON(data []byte) error
type NoOpAuthenticator ¶
type NoOpAuthenticator struct{}
type NoOpConnectionAuthenticator ¶
type NoOpConnectionAuthenticator struct{}
type NoneResponse ¶
type NoneResponse struct{}
type ObservatoryConfig ¶
type OutboundDetourConfig ¶
type OutboundDetourConfig struct { Protocol string `json:"protocol"` SendThrough *string `json:"sendThrough"` Tag string `json:"tag"` Settings *json.RawMessage `json:"settings"` StreamSetting *StreamConfig `json:"streamSettings"` ProxySettings *ProxyConfig `json:"proxySettings"` MuxSettings *MuxConfig `json:"mux"` }
func (*OutboundDetourConfig) Build ¶
func (c *OutboundDetourConfig) Build() (*core.OutboundHandlerConfig, error)
Build implements Buildable.
type Policy ¶
type Policy struct { Handshake *uint32 `json:"handshake"` ConnectionIdle *uint32 `json:"connIdle"` UplinkOnly *uint32 `json:"uplinkOnly"` DownlinkOnly *uint32 `json:"downlinkOnly"` StatsUserUplink bool `json:"statsUserUplink"` StatsUserDownlink bool `json:"statsUserDownlink"` BufferSize *int32 `json:"bufferSize"` }
type PolicyConfig ¶
type PolicyConfig struct { Levels map[uint32]*Policy `json:"levels"` System *SystemPolicy `json:"system"` }
type PortList ¶
type PortList struct {
Range []PortRange
}
func (*PortList) UnmarshalJSON ¶
UnmarshalJSON implements encoding/json.Unmarshaler.UnmarshalJSON
type PortRange ¶
func (*PortRange) UnmarshalJSON ¶
UnmarshalJSON implements encoding/json.Unmarshaler.UnmarshalJSON
type PortalConfig ¶
func (*PortalConfig) Build ¶
func (c *PortalConfig) Build() (*reverse.PortalConfig, error)
type ProxyConfig ¶
type ProxyConfig struct { Tag string `json:"tag"` // TransportLayerProxy: For compatibility. TransportLayerProxy bool `json:"transportLayer"` }
func (*ProxyConfig) Build ¶
func (v *ProxyConfig) Build() (*internet.ProxyConfig, error)
Build implements Buildable.
type REALITYConfig ¶
type REALITYConfig struct { Show bool `json:"show"` MasterKeyLog string `json:"masterKeyLog"` Dest json.RawMessage `json:"dest"` Type string `json:"type"` Xver uint64 `json:"xver"` ServerNames []string `json:"serverNames"` PrivateKey string `json:"privateKey"` MinClientVer string `json:"minClientVer"` MaxClientVer string `json:"maxClientVer"` MaxTimeDiff uint64 `json:"maxTimeDiff"` ShortIds []string `json:"shortIds"` Fingerprint string `json:"fingerprint"` ServerName string `json:"serverName"` PublicKey string `json:"publicKey"` ShortId string `json:"shortId"` SpiderX string `json:"spiderX"` }
type ReverseConfig ¶
type ReverseConfig struct { Bridges []BridgeConfig `json:"bridges"` Portals []PortalConfig `json:"portals"` }
type RouterConfig ¶
type RouterConfig struct { Settings *RouterRulesConfig `json:"settings"` // Deprecated RuleList []json.RawMessage `json:"rules"` DomainStrategy *string `json:"domainStrategy"` Balancers []*BalancingRule `json:"balancers"` DomainMatcher string `json:"domainMatcher"` }
type RouterRule ¶
type RouterRulesConfig ¶
type RouterRulesConfig struct { RuleList []json.RawMessage `json:"rules"` DomainStrategy string `json:"domainStrategy"` }
type SRTPAuthenticator ¶
type SRTPAuthenticator struct{}
type ShadowsocksClientConfig ¶
type ShadowsocksClientConfig struct {
Servers []*ShadowsocksServerTarget `json:"servers"`
}
type ShadowsocksServerConfig ¶
type ShadowsocksServerConfig struct { Cipher string `json:"method"` Password string `json:"password"` Level byte `json:"level"` Email string `json:"email"` Users []*ShadowsocksUserConfig `json:"clients"` NetworkList *NetworkList `json:"network"` IVCheck bool `json:"ivCheck"` }
type ShadowsocksServerTarget ¶
type ShadowsocksServerTarget struct { Address *Address `json:"address"` Port uint16 `json:"port"` Cipher string `json:"method"` Password string `json:"password"` Email string `json:"email"` Level byte `json:"level"` IVCheck bool `json:"ivCheck"` UoT bool `json:"uot"` UoTVersion int `json:"uotVersion"` }
type ShadowsocksUserConfig ¶
type SniffingConfig ¶
type SniffingConfig struct { Enabled bool `json:"enabled"` DestOverride *StringList `json:"destOverride"` DomainsExcluded *StringList `json:"domainsExcluded"` MetadataOnly bool `json:"metadataOnly"` RouteOnly bool `json:"routeOnly"` }
func (*SniffingConfig) Build ¶
func (c *SniffingConfig) Build() (*proxyman.SniffingConfig, error)
Build implements Buildable.
type SocketConfig ¶
type SocketConfig struct { Mark int32 `json:"mark"` TFO interface{} `json:"tcpFastOpen"` TProxy string `json:"tproxy"` AcceptProxyProtocol bool `json:"acceptProxyProtocol"` DomainStrategy string `json:"domainStrategy"` DialerProxy string `json:"dialerProxy"` TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"` TCPKeepAliveIdle int32 `json:"tcpKeepAliveIdle"` TCPCongestion string `json:"tcpCongestion"` TCPWindowClamp int32 `json:"tcpWindowClamp"` TCPMaxSeg int32 `json:"tcpMaxSeg"` TcpNoDelay bool `json:"tcpNoDelay"` TCPUserTimeout int32 `json:"tcpUserTimeout"` V6only bool `json:"v6only"` Interface string `json:"interface"` TcpMptcp bool `json:"tcpMptcp"` CustomSockopt []*CustomSockoptConfig `json:"customSockopt"` }
func (*SocketConfig) Build ¶
func (c *SocketConfig) Build() (*internet.SocketConfig, error)
Build implements Buildable.
type SocksAccount ¶
func (*SocksAccount) Build ¶
func (v *SocksAccount) Build() *socks.Account
type SocksClientConfig ¶
type SocksClientConfig struct { Servers []*SocksRemoteConfig `json:"servers"` Version string `json:"version"` }
type SocksRemoteConfig ¶
type SocksRemoteConfig struct { Address *Address `json:"address"` Port uint16 `json:"port"` Users []json.RawMessage `json:"users"` }
type SocksServerConfig ¶
type SplitHTTPConfig ¶ added in v1.8.24
type SplitHTTPConfig struct { Host string `json:"host"` Path string `json:"path"` Headers map[string]string `json:"headers"` ScMaxConcurrentPosts *Int32Range `json:"scMaxConcurrentPosts"` ScMaxEachPostBytes *Int32Range `json:"scMaxEachPostBytes"` ScMinPostsIntervalMs *Int32Range `json:"scMinPostsIntervalMs"` NoSSEHeader bool `json:"noSSEHeader"` XPaddingBytes *Int32Range `json:"xPaddingBytes"` }
type StatsConfig ¶
type StatsConfig struct{}
type StrategyConfig ¶
type StrategyConfig struct { Type string `json:"type"` Settings *json.RawMessage `json:"settings"` }
StrategyConfig represents a strategy config
type StreamConfig ¶
type StreamConfig struct { Network *TransportProtocol `json:"network"` Security string `json:"security"` TLSSettings *TLSConfig `json:"tlsSettings"` REALITYSettings *REALITYConfig `json:"realitySettings"` TCPSettings *TCPConfig `json:"tcpSettings"` KCPSettings *KCPConfig `json:"kcpSettings"` WSSettings *WebSocketConfig `json:"wsSettings"` HTTPSettings *HTTPConfig `json:"httpSettings"` SocketSettings *SocketConfig `json:"sockopt"` GRPCConfig *GRPCConfig `json:"grpcSettings"` GUNConfig *GRPCConfig `json:"gunSettings"` HTTPUPGRADESettings *HttpUpgradeConfig `json:"httpupgradeSettings"` SplitHTTPSettings *SplitHTTPConfig `json:"splithttpSettings"` }
func (*StreamConfig) Build ¶
func (c *StreamConfig) Build() (*internet.StreamConfig, error)
Build implements Buildable.
type StringList ¶
type StringList []string
func NewStringList ¶
func NewStringList(raw []string) *StringList
func (StringList) Len ¶
func (v StringList) Len() int
func (*StringList) UnmarshalJSON ¶
func (v *StringList) UnmarshalJSON(data []byte) error
type SystemPolicy ¶
type SystemPolicy struct { StatsInboundUplink bool `json:"statsInboundUplink"` StatsInboundDownlink bool `json:"statsInboundDownlink"` StatsOutboundUplink bool `json:"statsOutboundUplink"` StatsOutboundDownlink bool `json:"statsOutboundDownlink"` }
func (*SystemPolicy) Build ¶
func (p *SystemPolicy) Build() (*policy.SystemPolicy, error)
type TCPConfig ¶
type TCPConfig struct { HeaderConfig json.RawMessage `json:"header"` AcceptProxyProtocol bool `json:"acceptProxyProtocol"` }
type TLSCertConfig ¶
type TLSCertConfig struct { CertFile string `json:"certificateFile"` CertStr []string `json:"certificate"` KeyFile string `json:"keyFile"` KeyStr []string `json:"key"` Usage string `json:"usage"` OcspStapling uint64 `json:"ocspStapling"` OneTimeLoading bool `json:"oneTimeLoading"` BuildChain bool `json:"buildChain"` }
func (*TLSCertConfig) Build ¶
func (c *TLSCertConfig) Build() (*tls.Certificate, error)
Build implements Buildable.
type TLSConfig ¶
type TLSConfig struct { Insecure bool `json:"allowInsecure"` Certs []*TLSCertConfig `json:"certificates"` ServerName string `json:"serverName"` ALPN *StringList `json:"alpn"` EnableSessionResumption bool `json:"enableSessionResumption"` DisableSystemRoot bool `json:"disableSystemRoot"` MinVersion string `json:"minVersion"` MaxVersion string `json:"maxVersion"` CipherSuites string `json:"cipherSuites"` Fingerprint string `json:"fingerprint"` RejectUnknownSNI bool `json:"rejectUnknownSni"` PinnedPeerCertificateChainSha256 *[]string `json:"pinnedPeerCertificateChainSha256"` PinnedPeerCertificatePublicKeySha256 *[]string `json:"pinnedPeerCertificatePublicKeySha256"` MasterKeyLog string `json:"masterKeyLog"` }
type TransportProtocol ¶
type TransportProtocol string
func (TransportProtocol) Build ¶
func (p TransportProtocol) Build() (string, error)
Build implements Buildable.
type TrojanClientConfig ¶
type TrojanClientConfig struct {
Servers []*TrojanServerTarget `json:"servers"`
}
TrojanClientConfig is configuration of trojan servers
type TrojanInboundFallback ¶
type TrojanInboundFallback struct { Name string `json:"name"` Alpn string `json:"alpn"` Path string `json:"path"` Type string `json:"type"` Dest json.RawMessage `json:"dest"` Xver uint64 `json:"xver"` }
TrojanInboundFallback is fallback configuration
type TrojanServerConfig ¶
type TrojanServerConfig struct { Clients []*TrojanUserConfig `json:"clients"` Fallback *TrojanInboundFallback `json:"fallback"` Fallbacks []*TrojanInboundFallback `json:"fallbacks"` }
TrojanServerConfig is Inbound configuration
type TrojanServerTarget ¶
type TrojanServerTarget struct { Address *Address `json:"address"` Port uint16 `json:"port"` Password string `json:"password"` Email string `json:"email"` Level byte `json:"level"` Flow string `json:"flow"` }
TrojanServerTarget is configuration of a single trojan server
type TrojanUserConfig ¶
type TrojanUserConfig struct { Password string `json:"password"` Level byte `json:"level"` Email string `json:"email"` Flow string `json:"flow"` }
TrojanUserConfig is user configuration
type UTPAuthenticator ¶
type UTPAuthenticator struct{}
type VLessInboundConfig ¶
type VLessInboundConfig struct { Clients []json.RawMessage `json:"clients"` Decryption string `json:"decryption"` Fallback *VLessInboundFallback `json:"fallback"` Fallbacks []*VLessInboundFallback `json:"fallbacks"` }
type VLessInboundFallback ¶
type VLessOutboundConfig ¶
type VLessOutboundConfig struct {
Vnext []*VLessOutboundVnext `json:"vnext"`
}
type VLessOutboundVnext ¶
type VLessOutboundVnext struct { Address *Address `json:"address"` Port uint16 `json:"port"` Users []json.RawMessage `json:"users"` }
type VMessAccount ¶
type VMessAccount struct { ID string `json:"id"` Security string `json:"security"` Experiments string `json:"experiments"` }
func (*VMessAccount) Build ¶
func (a *VMessAccount) Build() *vmess.Account
Build implements Buildable
type VMessDefaultConfig ¶
type VMessDefaultConfig struct {
Level byte `json:"level"`
}
func (*VMessDefaultConfig) Build ¶
func (c *VMessDefaultConfig) Build() *inbound.DefaultConfig
Build implements Buildable
type VMessDetourConfig ¶
type VMessDetourConfig struct {
ToTag string `json:"to"`
}
func (*VMessDetourConfig) Build ¶
func (c *VMessDetourConfig) Build() *inbound.DetourConfig
Build implements Buildable
type VMessInboundConfig ¶
type VMessInboundConfig struct { Users []json.RawMessage `json:"clients"` Features *FeaturesConfig `json:"features"` Defaults *VMessDefaultConfig `json:"default"` DetourConfig *VMessDetourConfig `json:"detour"` }
type VMessOutboundConfig ¶
type VMessOutboundConfig struct {
Receivers []*VMessOutboundTarget `json:"vnext"`
}
type VMessOutboundTarget ¶
type VMessOutboundTarget struct { Address *Address `json:"address"` Port uint16 `json:"port"` Users []json.RawMessage `json:"users"` }
type WebSocketConfig ¶
type WechatVideoAuthenticator ¶
type WechatVideoAuthenticator struct{}
type WireGuardConfig ¶
type WireGuardConfig struct { IsClient bool `json:""` KernelMode *bool `json:"kernelMode"` SecretKey string `json:"secretKey"` Address []string `json:"address"` Peers []*WireGuardPeerConfig `json:"peers"` MTU int32 `json:"mtu"` NumWorkers int32 `json:"workers"` Reserved []byte `json:"reserved"` DomainStrategy string `json:"domainStrategy"` }
type WireGuardPeerConfig ¶
type WireguardAuthenticator ¶
type WireguardAuthenticator struct{}
Source Files ¶
- api.go
- blackhole.go
- buildable.go
- common.go
- conf.go
- dns.go
- dns_proxy.go
- dokodemo.go
- fakedns.go
- freedom.go
- grpc.go
- http.go
- init.go
- lint.go
- loader.go
- log.go
- loopback.go
- metrics.go
- observatory.go
- policy.go
- reverse.go
- router.go
- router_strategy.go
- shadowsocks.go
- socks.go
- transport_authenticators.go
- transport_internet.go
- trojan.go
- vless.go
- vmess.go
- wireguard.go
- xray.go