Android体系实现多网共存且能独立上外网

[复制链接]
发表于 2026-2-25 05:00:13 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
有些场景下必要多网共存,使用网络聚合举行提拔网速。而在Android体系源码上默认是不支持多网同时共存且能独立上外网的。以是必要举行定制修改
修改如下:
1.修改main 表优先级到9999, 作用:eth1 wlan0 访问内网
2.不去teardown 低分数网线
3.修改wifi为70分,以太网为60分,4G为50分
  1. diff --git a/server/RouteController.cpp b/server/RouteController.cpp
  2. index ba305e6..d38aec5 100644
  3. --- a/server/RouteController.cpp
  4. +++ b/server/RouteController.cpp
  5. @@ -721,6 +721,18 @@ int RouteController::configureDummyNetwork() {
  6.      return 0;
  7. }
  8. +// Add a new rule to look up the 'main' table, with the same selectors as the "default network"
  9. +// rule, but with a lower priority. We will never create routes in the main table; it should only be
  10. +// used for directly-connected routes implicitly created by the kernel when adding IP addresses.
  11. +// This is necessary,
复制代码
回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表