fix(android): update vpn routes when proxy cidrs change (#1717)

This commit is contained in:
Mg Pig authored and GitHub committed 2025-12-30 19:26:42 +08:00
1 parent 650323faef
commit 18478b7c4b
11 files changed
+257 -68

No files matched your search

+10
View File
@@ -534,6 +534,8 @@ pub struct Instance {
#[cfg(feature = "socks5")]
socks5_server: Arc<Socks5Server>,
proxy_cidrs_monitor: Option<ScopedTask<()>>,
global_ctx: ArcGlobalCtx,
}
@@ -613,6 +615,8 @@ impl Instance {
#[cfg(feature = "socks5")]
socks5_server,
proxy_cidrs_monitor: None,
global_ctx,
}
}
@@ -964,6 +968,12 @@ impl Instance {
self.add_initial_peers().await?;
let monitor = super::proxy_cidrs_monitor::ProxyCidrsMonitor::new(
self.peer_manager.clone(),
self.global_ctx.clone(),
);
self.proxy_cidrs_monitor = Some(monitor.start());
if self.global_ctx.get_vpn_portal_cidr().is_some() {
self.run_vpn_portal().await?;
}