Skip to content

Commit

Permalink
Revert "Set route_exclude_address_set for routing"
Browse files Browse the repository at this point in the history
This reverts commit e72f452.
  • Loading branch information
nekohasekai committed Jan 16, 2025
1 parent 09e4fee commit b1c0882
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions template/render_inbounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func (t *Template) renderInbounds(metadata M.Metadata, options *option.Options)
autoRedirect := t.AutoRedirect &&
!metadata.Platform.IsApple() &&
(metadata.Version == nil || metadata.Version.GreaterThanOrEqual(semver.ParseVersion("1.10.0-alpha.2")))
tunExclude := metadata.Platform != M.PlatformAndroid && (metadata.Version == nil || metadata.Version.GreaterThanOrEqual(semver.ParseVersion("1.11.0-beta.14")))
disableTun := t.DisableTUN && !metadata.Platform.TunOnly()
if !disableTun {
options.Route.AutoDetectInterface = true
Expand All @@ -38,16 +37,18 @@ func (t *Template) renderInbounds(metadata M.Metadata, options *option.Options)
address = append(address, netip.MustParsePrefix("fdfe:dcba:9876::1/126"))
}
tunOptions := &option.TunInboundOptions{
AutoRoute: true,
Address: address,
AutoRedirect: autoRedirect,
AutoRoute: true,
Address: address,
}
tunInbound := option.Inbound{
Type: C.TypeTun,
Options: tunOptions,
}
if tunExclude && !t.DisableTrafficBypass {
tunOptions.RouteExcludeAddressSet = []string{"geoip-cn"}
if autoRedirect {
tunOptions.AutoRedirect = true
if !t.DisableTrafficBypass && metadata.Platform == "" {
tunOptions.RouteExcludeAddressSet = []string{"geoip-cn"}
}
}
if metadata.Platform == M.PlatformUnknown {
tunOptions.StrictRoute = true
Expand Down

0 comments on commit b1c0882

Please sign in to comment.