Skip to content

Commit 619602b

Browse files
author
ym
committed
重构转发管理,优化停止函数存储与信号处理,改进日志输出
1 parent c18b270 commit 619602b

File tree

6 files changed

+247
-181
lines changed

6 files changed

+247
-181
lines changed

conf/conf.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ type IpBan struct {
2727
// 全局转发协程等待组
2828
var Wg sync.WaitGroup
2929

30-
// 全局协程通道 未初始化默认为nil
31-
var Ch chan string
30+
// StopFuncs 存储每个转发的停止函数,key 为 localPort+protocol
31+
var StopFuncs sync.Map
3232

3333
// Web管理面板端口
3434
var WebPort string

0 commit comments

Comments
 (0)