fea: switch: do dnat.
Some checks failed
Coverage CI / build (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
Ubuntu CI / build (push) Has been cancelled

This commit is contained in:
Daniel Ding
2025-10-22 10:48:56 +08:00
parent eb9a1acc1c
commit caef90cc04
24 changed files with 382 additions and 175 deletions

View File

@@ -100,7 +100,7 @@ type Switch struct {
hooks []Hook
http *Http
server libol.SocketServer
worker map[string]api.Networker
worker map[string]api.NetworkApi
uuid string
newTime int64
out *libol.SubLogger
@@ -111,7 +111,7 @@ func NewSwitch(c *co.Switch) *Switch {
v := &Switch{
cfg: c,
fire: network.NewFireWallGlobal(c.FireWall),
worker: make(map[string]api.Networker, 32),
worker: make(map[string]api.NetworkApi, 32),
server: server,
newTime: time.Now().Unix(),
hooks: make([]Hook, 0, 64),