Improve auto redirect

This commit is contained in:
世界
2025-04-02 16:16:16 +08:00
parent 0d54aee584
commit 4f98009a15
5 changed files with 27 additions and 13 deletions

View File

@@ -245,7 +245,7 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo
if err != nil {
return nil, E.Cause(err, "initialize auto-redirect")
}
if !C.IsAndroid /*&& (len(inbound.routeRuleSet) > 0 || len(inbound.routeExcludeRuleSet) > 0) */ {
if !C.IsAndroid {
inbound.tunOptions.AutoRedirectMarkMode = true
err = networkManager.RegisterAutoRedirectOutputMark(inbound.tunOptions.AutoRedirectOutputMark)
if err != nil {