Merge remote-tracking branch 'origin/main' into proto-ipv6-overlay

Resolve conflict in setupAndroidRoutes: merge IPv6 fake IP route
with the explicit fake IP route storage from #5865.

Notifier now stores a slice of fake IP routes (v4 + v6) via
SetFakeIPRoutes to preserve the stale route re-injection fix.
This commit is contained in:
Viktor Liu
2026-04-13 11:39:08 +02:00
6 changed files with 473 additions and 79 deletions

View File

@@ -160,22 +160,23 @@ func (m *DefaultManager) setupAndroidRoutes(config ManagerConfig) {
m.fakeIPManager = fakeip.NewManager()
v4ID := uuid.NewString()
cr = append(cr, &route.Route{
fakeIPRoute := &route.Route{
ID: route.ID(v4ID),
Network: m.fakeIPManager.GetFakeIPBlock(),
NetID: route.NetID(v4ID),
Peer: m.pubKey,
NetworkType: route.IPv4Network,
})
}
v6ID := uuid.NewString()
cr = append(cr, &route.Route{
fakeIPv6Route := &route.Route{
ID: route.ID(v6ID),
Network: m.fakeIPManager.GetFakeIPv6Block(),
NetID: route.NetID(v6ID),
Peer: m.pubKey,
NetworkType: route.IPv6Network,
})
}
cr = append(cr, fakeIPRoute, fakeIPv6Route)
m.notifier.SetFakeIPRoutes([]*route.Route{fakeIPRoute, fakeIPv6Route})
}
m.notifier.SetInitialClientRoutes(cr, routesForComparison)