mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 18:08:14 -05:00
del no need option
This commit is contained in:
parent
82c1753672
commit
d3fe0c8afe
16
conf/node.go
16
conf/node.go
@ -15,15 +15,13 @@ type ApiConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ControllerConfig struct {
|
type ControllerConfig struct {
|
||||||
DisableUploadTraffic bool `yaml:"DisableUploadTraffic"`
|
ListenIP string `yaml:"ListenIP"`
|
||||||
DisableGetRule bool `yaml:"DisableGetRule"`
|
SendIP string `yaml:"SendIP"`
|
||||||
ListenIP string `yaml:"ListenIP"`
|
EnableProxyProtocol bool `yaml:"EnableProxyProtocol"`
|
||||||
SendIP string `yaml:"SendIP"`
|
XrayOptions XrayOptions `yaml:"XrayOptions"`
|
||||||
EnableProxyProtocol bool `yaml:"EnableProxyProtocol"`
|
HyOptions HyOptions `yaml:"HyOptions"`
|
||||||
XrayOptions XrayOptions `yaml:"XrayOptions"`
|
LimitConfig LimitConfig `yaml:"LimitConfig"`
|
||||||
HyOptions HyOptions `yaml:"HyOptions"`
|
CertConfig *CertConfig `yaml:"CertConfig"`
|
||||||
LimitConfig LimitConfig `yaml:"LimitConfig"`
|
|
||||||
CertConfig *CertConfig `yaml:"CertConfig"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type XrayOptions struct {
|
type XrayOptions struct {
|
||||||
|
@ -58,10 +58,8 @@ func (c *Controller) Start() error {
|
|||||||
// add limiter
|
// add limiter
|
||||||
l := limiter.AddLimiter(c.Tag, &c.LimitConfig, c.userList)
|
l := limiter.AddLimiter(c.Tag, &c.LimitConfig, c.userList)
|
||||||
// add rule limiter
|
// add rule limiter
|
||||||
if !c.DisableGetRule {
|
if err = l.UpdateRule(c.nodeInfo.Rules); err != nil {
|
||||||
if err = l.UpdateRule(c.nodeInfo.Rules); err != nil {
|
return fmt.Errorf("update rule error: %s", err)
|
||||||
return fmt.Errorf("update rule error: %s", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if c.nodeInfo.Tls || c.nodeInfo.Type == "hysteria" {
|
if c.nodeInfo.Tls || c.nodeInfo.Type == "hysteria" {
|
||||||
err = c.requestCert()
|
err = c.requestCert()
|
||||||
|
@ -22,7 +22,7 @@ func (c *Controller) reportUserTrafficTask() (err error) {
|
|||||||
Download: down})
|
Download: down})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(userTraffic) > 0 && !c.DisableUploadTraffic {
|
if len(userTraffic) > 0 {
|
||||||
err = c.apiClient.ReportUserTraffic(userTraffic)
|
err = c.apiClient.ReportUserTraffic(userTraffic)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Report user traffic faild: %s", err)
|
log.Printf("Report user traffic faild: %s", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user