From 8c58d8a8ad5feb8f9db93d0fe7ef6f3eee6f2b2c Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Mon, 5 Dec 2022 16:29:50 +0800 Subject: [PATCH] fix: remove unneed listener's start --- listener/listener.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/listener/listener.go b/listener/listener.go index 99e16aea..0530e20e 100644 --- a/listener/listener.go +++ b/listener/listener.go @@ -267,7 +267,7 @@ func ReCreateShadowSocks(shadowSocksConfig string, tcpIn chan<- C.ConnContext, u var ssConfig LC.ShadowsocksServer if addr, cipher, password, err := embedSS.ParseSSURL(shadowSocksConfig); err == nil { ssConfig = LC.ShadowsocksServer{ - Enable: true, + Enable: len(shadowSocksConfig) > 0, Listen: addr, Password: password, Cipher: cipher, @@ -320,7 +320,7 @@ func ReCreateVmess(vmessConfig string, tcpIn chan<- C.ConnContext, udpIn chan<- var vsConfig LC.VmessServer if addr, username, password, err := sing_vmess.ParseVmessURL(vmessConfig); err == nil { vsConfig = LC.VmessServer{ - Enable: true, + Enable: len(vmessConfig) > 0, Listen: addr, Users: []LC.VmessUser{{Username: username, UUID: password, AlterID: 1}}, }