bestroutetb

这是一款生成最佳路由表的工具,用于本地路由表优化。

项目地址:https://github.com/ashi009/bestroutetb

以下为Linux / Unix用法。

用法:

1. 安装nodejs和npm
2. 创建新文件夹存放bestroutetb
3. 进入新文件夹,执行命令

npm install bestroutetb

4. 进入node_modules/bestroutetb目录
5. 根据自己的需求执行cli脚本。

样例:

官方样例:https://github.com/ashi009/bestroutetb/wiki/%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E

我的样例:
VPN网关IP: 192.168.168.2
ISP网关IP:192.168.0.1
生成脚本存的地发:~/route

1. 路由所有美国和英国的数据包走VPN,中国和广域均由本地访问:

./cli.js --route.vpn=us,gb --route.net=cn,0.0.0.0/0 --p iproute -f --gateway.vpn=192.168.168.2 --gateway.net=192.168.0.1 -o ~/route

生成出的结果:

#!/bin/sh
ip -b - <

2. 一台加拿大的服务器只路由中国的IP到位于美国的VPN,其他走ISP网关。

./cli.js --route.vpn=cn --route.net=ca,0.0.0.0/0 --p iproute -f --gateway.vpn=192.168.168.2 --gateway.net=192.168.0.1 -o ~/route

结果:

#!/bin/sh
ip -b - <

欢迎提出意见增加补充。

作者:小老外

我还需要不断地学习。

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据