fix: tun should not care "force" when Put configs from restful api
Some checks are pending
Trigger CMFA Update / trigger-CMFA-update (push) Waiting to run

This commit is contained in:
wwqgtxx 2024-08-26 20:52:56 +08:00
parent 9cf3eb39f5
commit d79423a4fa

View File

@ -101,6 +101,7 @@ func ApplyConfig(cfg *config.Config, force bool) {
updateNTP(cfg.NTP) updateNTP(cfg.NTP)
updateDNS(cfg.DNS, cfg.General.IPv6) updateDNS(cfg.DNS, cfg.General.IPv6)
updateListeners(cfg.General, cfg.Listeners, force) updateListeners(cfg.General, cfg.Listeners, force)
updateTun(cfg.General) // tun should not care "force"
updateIPTables(cfg) updateIPTables(cfg)
updateTunnels(cfg.Tunnels) updateTunnels(cfg.Tunnels)
@ -198,6 +199,9 @@ func updateListeners(general *config.General, listeners map[string]C.InboundList
listener.ReCreateShadowSocks(general.ShadowSocksConfig, tunnel.Tunnel) listener.ReCreateShadowSocks(general.ShadowSocksConfig, tunnel.Tunnel)
listener.ReCreateVmess(general.VmessConfig, tunnel.Tunnel) listener.ReCreateVmess(general.VmessConfig, tunnel.Tunnel)
listener.ReCreateTuic(general.TuicServer, tunnel.Tunnel) listener.ReCreateTuic(general.TuicServer, tunnel.Tunnel)
}
func updateTun(general *config.General) {
listener.ReCreateTun(general.Tun, tunnel.Tunnel) listener.ReCreateTun(general.Tun, tunnel.Tunnel)
} }