mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
update example, add realtime option, fix ip limit bug for packet protocol
This commit is contained in:
95
conf/node.go
95
conf/node.go
@@ -1,14 +1,46 @@
|
||||
package conf
|
||||
|
||||
type CertConfig struct {
|
||||
CertMode string `yaml:"CertMode"` // none, file, http, dns
|
||||
RejectUnknownSni bool `yaml:"RejectUnknownSni"`
|
||||
CertDomain string `yaml:"CertDomain"`
|
||||
CertFile string `yaml:"CertFile"`
|
||||
KeyFile string `yaml:"KeyFile"`
|
||||
Provider string `yaml:"Provider"` // alidns, cloudflare, gandi, godaddy....
|
||||
Email string `yaml:"Email"`
|
||||
DNSEnv map[string]string `yaml:"DNSEnv"`
|
||||
type NodeConfig struct {
|
||||
ApiConfig *ApiConfig `yaml:"ApiConfig"`
|
||||
ControllerConfig *ControllerConfig `yaml:"ControllerConfig"`
|
||||
}
|
||||
|
||||
type ApiConfig struct {
|
||||
APIHost string `yaml:"ApiHost"`
|
||||
NodeID int `yaml:"NodeID"`
|
||||
Key string `yaml:"ApiKey"`
|
||||
NodeType string `yaml:"NodeType"`
|
||||
Timeout int `yaml:"Timeout"`
|
||||
RuleListPath string `yaml:"RuleListPath"`
|
||||
}
|
||||
|
||||
type ControllerConfig struct {
|
||||
ListenIP string `yaml:"ListenIP"`
|
||||
SendIP string `yaml:"SendIP"`
|
||||
EnableDNS bool `yaml:"EnableDNS"`
|
||||
DNSType string `yaml:"DNSType"`
|
||||
EnableVless bool `yaml:"EnableVless"`
|
||||
EnableTls bool `yaml:"EnableTls"`
|
||||
LimitConfig LimitConfig `yaml:"LimitConfig"`
|
||||
DisableUploadTraffic bool `yaml:"DisableUploadTraffic"`
|
||||
DisableGetRule bool `yaml:"DisableGetRule"`
|
||||
EnableProxyProtocol bool `yaml:"EnableProxyProtocol"`
|
||||
EnableFallback bool `yaml:"EnableFallback"`
|
||||
DisableIVCheck bool `yaml:"DisableIVCheck"`
|
||||
DisableSniffing bool `yaml:"DisableSniffing"`
|
||||
FallBackConfigs []*FallBackConfig `yaml:"FallBackConfigs"`
|
||||
CertConfig *CertConfig `yaml:"CertConfig"`
|
||||
}
|
||||
|
||||
type LimitConfig struct {
|
||||
EnableRealtime bool `yaml:"EnableRealtime"`
|
||||
SpeedLimit int `yaml:"SpeedLimit"`
|
||||
IPLimit int `yaml:"DeviceLimit"`
|
||||
ConnLimit int `yaml:"ConnLimit"`
|
||||
EnableIpRecorder bool `yaml:"EnableIpRecorder"`
|
||||
IpRecorderConfig *IpReportConfig `yaml:"IpRecorderConfig"`
|
||||
EnableDynamicSpeedLimit bool `yaml:"EnableDynamicSpeedLimit"`
|
||||
DynamicSpeedLimitConfig *DynamicSpeedLimitConfig `yaml:"DynamicSpeedLimitConfig"`
|
||||
}
|
||||
|
||||
type FallBackConfig struct {
|
||||
@@ -47,40 +79,13 @@ type DynamicSpeedLimitConfig struct {
|
||||
ExpireTime int `yaml:"ExpireTime"`
|
||||
}
|
||||
|
||||
type ControllerConfig struct {
|
||||
ListenIP string `yaml:"ListenIP"`
|
||||
SendIP string `yaml:"SendIP"`
|
||||
EnableDNS bool `yaml:"EnableDNS"`
|
||||
DNSType string `yaml:"DNSType"`
|
||||
EnableVless bool `yaml:"EnableVless"`
|
||||
EnableTls bool `yaml:"EnableTls"`
|
||||
SpeedLimit int `yaml:"SpeedLimit"`
|
||||
IPLimit int `yaml:"DeviceLimit"`
|
||||
ConnLimit int `yaml:"ConnLimit"`
|
||||
DisableUploadTraffic bool `yaml:"DisableUploadTraffic"`
|
||||
DisableGetRule bool `yaml:"DisableGetRule"`
|
||||
EnableProxyProtocol bool `yaml:"EnableProxyProtocol"`
|
||||
EnableFallback bool `yaml:"EnableFallback"`
|
||||
DisableIVCheck bool `yaml:"DisableIVCheck"`
|
||||
DisableSniffing bool `yaml:"DisableSniffing"`
|
||||
FallBackConfigs []*FallBackConfig `yaml:"FallBackConfigs"`
|
||||
EnableIpRecorder bool `yaml:"EnableIpRecorder"`
|
||||
IpRecorderConfig *IpReportConfig `yaml:"IpRecorderConfig"`
|
||||
EnableDynamicSpeedLimit bool `yaml:"EnableDynamicSpeedLimit"`
|
||||
DynamicSpeedLimitConfig *DynamicSpeedLimitConfig `yaml:"DynamicSpeedLimitConfig"`
|
||||
CertConfig *CertConfig `yaml:"CertConfig"`
|
||||
}
|
||||
|
||||
type ApiConfig struct {
|
||||
APIHost string `yaml:"ApiHost"`
|
||||
NodeID int `yaml:"NodeID"`
|
||||
Key string `yaml:"ApiKey"`
|
||||
NodeType string `yaml:"NodeType"`
|
||||
Timeout int `yaml:"Timeout"`
|
||||
RuleListPath string `yaml:"RuleListPath"`
|
||||
}
|
||||
|
||||
type NodeConfig struct {
|
||||
ApiConfig *ApiConfig `yaml:"ApiConfig"`
|
||||
ControllerConfig *ControllerConfig `yaml:"ControllerConfig"`
|
||||
type CertConfig struct {
|
||||
CertMode string `yaml:"CertMode"` // none, file, http, dns
|
||||
RejectUnknownSni bool `yaml:"RejectUnknownSni"`
|
||||
CertDomain string `yaml:"CertDomain"`
|
||||
CertFile string `yaml:"CertFile"`
|
||||
KeyFile string `yaml:"KeyFile"`
|
||||
Provider string `yaml:"Provider"` // alidns, cloudflare, gandi, godaddy....
|
||||
Email string `yaml:"Email"`
|
||||
DNSEnv map[string]string `yaml:"DNSEnv"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user