From 69eec50f81788854553c9346bf475ea493c8c38a Mon Sep 17 00:00:00 2001 From: yuzuki999 Date: Fri, 19 May 2023 10:51:11 +0800 Subject: [PATCH] del not need config --- conf/node.go | 1 - node/inbound.go | 2 +- node/task.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/conf/node.go b/conf/node.go index ccde4cf..354c860 100644 --- a/conf/node.go +++ b/conf/node.go @@ -20,7 +20,6 @@ type ControllerConfig struct { 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"` diff --git a/node/inbound.go b/node/inbound.go index 7016253..2b334eb 100644 --- a/node/inbound.go +++ b/node/inbound.go @@ -65,7 +65,7 @@ func buildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s AcceptProxyProtocol: config.EnableProxyProtocol} //Enable proxy protocol } // Set TLS and XTLS settings - if config.EnableTls && config.CertConfig.CertMode != "none" { + if nodeInfo.Tls != 0 && config.CertConfig.CertMode != "none" { inbound.StreamSetting.Security = "tls" certFile, keyFile, err := getCertFile(config.CertConfig) if err != nil { diff --git a/node/task.go b/node/task.go index 1d488ed..bc3be75 100644 --- a/node/task.go +++ b/node/task.go @@ -35,7 +35,7 @@ func (c *Controller) initTask() { time.Sleep(time.Duration(c.nodeInfo.BaseConfig.PushInterval.(int)) * time.Second) _ = c.userReportPeriodic.Start() }() - if c.EnableTls && c.CertConfig.CertMode != "none" && + if c.nodeInfo.Tls != 0 && c.CertConfig.CertMode != "none" && (c.CertConfig.CertMode == "dns" || c.CertConfig.CertMode == "http") { c.renewCertPeriodic = &task.Periodic{ Interval: time.Hour * 24,