Documentation ¶
Index ¶
- Variables
- func ApplyGeneralConfig()
- func ParseMultiServersConfigFile(path string) error
- type ACL
- type APIConfiguration
- type AllowDeny
- type ConsoleConfiguration
- type DNS
- type DNSAbroadServerConfiguration
- type DNSCacheConfiguration
- type DNSChinaServerConfiguration
- type DNSConfig
- type DNSEdnsClientSubnetConfiguration
- type DNSServerSpecific
- type DNSTimeoutConfiguration
- type DebuggingConfiguration
- type GeneralConfig
- type LocalConfig
- type PriorityInterfaceConfiguration
- type ProxyPolicyConfiguration
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Configurations = new(LocalConfig) LeftQuote int64 = 1 * 1024 * 1024 // 1MB initially AllowedPort = make(map[int]bool) DeniedPort = make(map[int]bool) AllowedIP = make(map[uint32]bool) // IPv4 only DeniedIP = make(map[uint32]bool) // IPv4 only DefaultPort string DefaultKey string DefaultMethod string )
Functions ¶
func ApplyGeneralConfig ¶
func ApplyGeneralConfig()
Types ¶
type APIConfiguration ¶
type ConsoleConfiguration ¶
type DNS ¶
type DNS struct { DNSCacheConfiguration DNSTimeoutConfiguration DNSAbroadServerConfiguration DNSChinaServerConfiguration DNSEdnsClientSubnetConfiguration Enabled bool `json:"enabled"` SearchDomain string `json:"search_domain"` Local []*DNSConfig `json:"local"` Server DNSServerSpecific `json:"server"` }
DNS represents the DNS section in configuration file
func (*DNS) UnmarshalJSON ¶
UnmarshalJSON override the json unmarshal method, so that some fields could be initialized correctly
type DNSCacheConfiguration ¶
type DNSConfig ¶
type DNSConfig struct { Address string `json:"address"` Protocol string `json:"protocol"` EDNSClientSubnetEnabled bool `json:"edns_client_subnet_enabled"` }
DNSConfig represents each DNS server configuration
type DNSServerSpecific ¶
type DNSServerSpecific struct { Domains []string `json:"domains"` Servers []*DNSConfig `json:"servers"` }
DNSServerSpecific some domain names should be resolved by some special DNS servers
type DNSTimeoutConfiguration ¶
type DebuggingConfiguration ¶
type GeneralConfig ¶
type GeneralConfig struct { SSRSubscription string `json:"ssrsub"` SSRSubscriptionEnabled bool `json:"ssrsub_enabled"` Token string `json:"token"` CacheService string `json:"cache_service"` ProtectSocketPathPrefix string `json:"protect_socket_path_prefix"` MaxOpenFiles uint64 `json:"max_openfiles"` BroadcastEnabled bool `json:"broadcast_enabled"` Timeout time.Duration InboundTimeout time.Duration ProxyPolicyConfiguration DebuggingConfiguration APIConfiguration PriorityInterfaceConfiguration ConsoleConfiguration }
GeneralConfig represents the general config section in configuration file
func (*GeneralConfig) UnmarshalJSON ¶
func (g *GeneralConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON override the json unmarshal method, so that some fields could be initialized correctly
type LocalConfig ¶
type LocalConfig struct { Generals *GeneralConfig `json:"general"` DNSProxy *DNS `json:"dns"` Target *ACL `json:"target"` InboundConfig *inbound.Inbound `json:"github.com/LincolnYe/avege/inbound"` InboundsConfig []*inbound.Inbound `json:"inbounds"` OutboundsConfig []*outbound.Outbound `json:"outbounds"` }
LocalConfig represents the whole configuration file struct
Click to show internal directories.
Click to hide internal directories.