chore: add android feature and patch

This commit is contained in:
Steve Johnson
2023-11-17 13:19:24 +08:00
parent b73382f60a
commit d9cfdc3242
6 changed files with 67 additions and 17 deletions

View File

@@ -35,6 +35,8 @@ import (
"github.com/metacubex/mihomo/log"
"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
@@ -170,7 +172,9 @@ 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)
listener.ReCreateAutoRedir(general.EBpf.AutoRedir, tunnel.Tunnel)
if !slices.Contains(features.TAGS, "cmfa") {
listener.ReCreateAutoRedir(general.EBpf.AutoRedir, tunnel.Tunnel)
}
listener.ReCreateTProxy(general.TProxyPort, tunnel.Tunnel)
listener.ReCreateMixed(general.MixedPort, tunnel.Tunnel)
listener.ReCreateShadowSocks(general.ShadowSocksConfig, tunnel.Tunnel)