forked from mirror/serenity
Add route address set
This commit is contained in:
parent
a56df2aae1
commit
6a68e63049
@ -12,13 +12,15 @@ func init() {
|
||||
}
|
||||
|
||||
func filter1100(metadata metadata.Metadata, options *option.Options) {
|
||||
if metadata.Version == nil || metadata.Version.GreaterThanOrEqual(semver.ParseVersion("1.10.0-alpha.2")) {
|
||||
if metadata.Version == nil || metadata.Version.GreaterThanOrEqual(semver.ParseVersion("1.10.0-alpha.13")) {
|
||||
return
|
||||
}
|
||||
newInbounds := make([]option.Inbound, 0, len(options.Inbounds))
|
||||
for _, inbound := range options.Inbounds {
|
||||
if inbound.Type == C.TypeTun && inbound.TunOptions.AutoRedirect {
|
||||
if inbound.Type == C.TypeTun {
|
||||
inbound.TunOptions.AutoRedirect = false
|
||||
inbound.TunOptions.RouteAddressSet = nil
|
||||
inbound.TunOptions.RouteExcludeAddressSet = nil
|
||||
}
|
||||
newInbounds = append(newInbounds, inbound)
|
||||
}
|
||||
|
@ -50,6 +50,9 @@ func (t *Template) renderInbounds(metadata M.Metadata, options *option.Options)
|
||||
}
|
||||
if autoRedirect {
|
||||
tunInbound.TunOptions.AutoRedirect = true
|
||||
if !t.DisableTrafficBypass {
|
||||
tunInbound.TunOptions.RouteExcludeAddressSet = []string{"geoip-cn"}
|
||||
}
|
||||
}
|
||||
if t.EnableFakeIP {
|
||||
tunInbound.TunOptions.InboundOptions.DomainStrategy = domainStrategy
|
||||
|
Loading…
x
Reference in New Issue
Block a user