修复:Android VPN 子网代理路由未生效的问题#231
Open
chengoak wants to merge 1 commit into
Open
Conversation
This PR fixes the issue where subnet proxy routes (proxy_cidrs) from EasyTier peers were not being added to the Android VPN TUN interface. Changes: - Rust KVNodeInfo: add proxy_cidrs field - Rust network status: populate proxy_cidrs from peer info - Dart KVNodeInfo: add proxyCidrs field - VpnManager.start(): accept proxyCidrs parameter - ServerConnectionManager: fetch network status on connect to extract peer subnet proxy routes and pass them to VPN service Fixes: VPN connected but unable to access proxied subnets like 192.168.1.0/24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
连接到开启了子网代理的 EasyTier 网络时,Android VPN TUN 接口没有将代理子网(如
192.168.1.0/24)加入路由表,导致无法访问代理子网后的设备。根因
KVNodeInfo结构体缺少proxy_cidrs字段VpnManager.start()未接收代理路由参数_handleSuccessfulConnection()在netStatus尚未填充时就调用 `_extractProxyCidrs()$,导致路由列表为空修改内容
Rust
rust/src/api/simple.rs:KVNodeInfo添加proxy_cidrs: Vec<String>字段rust/src/api/p2p.rs:get_network_status()从node_info.proxy_cidrs填充数据rust/src/frb_generated.rs: 更新 FRB 序列化代码Dart
lib/src/rust/api/simple.dart:KVNodeInfo添加proxyCidrs字段lib/src/rust/frb_generated.dart: 更新 FRB 序列化代码lib/core/services/vpn_manager.dart:start()方法新增List<String> proxyCidrs参数lib/core/services/server_connection_manager.dart: 连接成功后主动调用getNetworkStatus()提取对等节点的proxyCidrs,并传入 VPN 服务测试方法
192.168.1.0/24子网代理的 EasyTier 网络192.168.1.x网段的设备Fixes #issue_number(如适用)