1
0
mirror of https://github.com/MetaCubeX/mihomo.git synced 2025-09-19 20:15:59 +08:00

fix: improve feature check and add missing patches

This commit is contained in:
Steve Johnson
2023-11-17 19:03:39 +08:00
parent d9cfdc3242
commit b5a8f0fce1
12 changed files with 64 additions and 45 deletions

View File

@ -36,7 +36,6 @@ import (
"github.com/metacubex/mihomo/ntp"
"github.com/metacubex/mihomo/tunnel"
"github.com/metacubex/mihomo/constant/features"
"golang.org/x/exp/slices"
)
var mux sync.Mutex
@ -172,7 +171,7 @@ func updateListeners(general *config.General, listeners map[string]C.InboundList
listener.ReCreateHTTP(general.Port, tunnel.Tunnel)
listener.ReCreateSocks(general.SocksPort, tunnel.Tunnel)
listener.ReCreateRedir(general.RedirPort, tunnel.Tunnel)
if !slices.Contains(features.TAGS, "cmfa") {
if !features.Contains("cmfa") {
listener.ReCreateAutoRedir(general.EBpf.AutoRedir, tunnel.Tunnel)
}
listener.ReCreateTProxy(general.TProxyPort, tunnel.Tunnel)