Skip to content

Commit

Permalink
Fix gateway select
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Nov 6, 2024
1 parent d95423e commit 5ae25fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tun.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (o *Options) Inet4GatewayAddr() netip.Addr {
if len(o.Inet4Address) > 0 {
if HasNextAddress(o.Inet4Address[0], 1) {
return o.Inet4Address[0].Addr().Next()
} else if runtime.GOOS != "linux" {
} else if runtime.GOOS != "linux" && runtime.GOOS != "android" {
return o.Inet4Address[0].Addr()
}
}
Expand All @@ -105,7 +105,7 @@ func (o *Options) Inet6GatewayAddr() netip.Addr {
if len(o.Inet6Address) > 0 {
if HasNextAddress(o.Inet6Address[0], 1) {
return o.Inet6Address[0].Addr().Next()
} else if runtime.GOOS != "linux" {
} else if runtime.GOOS != "linux" && runtime.GOOS != "android" {
return o.Inet6Address[0].Addr()
}
}
Expand Down

0 comments on commit 5ae25fc

Please sign in to comment.