基本原理是连上VPN之后设置路由表,使只有Steam的地区限制验证流量走VPN,DotA2的客户端流量直接走本地网络连接。之前我测试过在DotA2客户端启动之后断开VPN,确实是可以继续玩的,而且ping很小,所以这个方法理论上是可行的。不过我用这个脚本没有成功,求大神解决。
@
echo off
for /F "tokens=4" %%* in ('route -p print ^| findstr "\<255.255.255.255\>"') do (set routeadd=%%*)
echo %routeadd%
@
echo 清理路由表,避免在多网卡上添加发生错误
pause
route delete 68.142.91.0
route delete 68.142.116.0
route delete 69.28.145.0
route delete 72.165.61.0
route delete 81.171.115.0
route delete 103.28.54.0
route delete 146.66.152.0
route delete 205.185.220.0
route delete 208.64.200.0
route delete 208.111.133.0
route delete 208.111.171.0
route delete 209.197.6.0
route delete 209.197.20.0
route delete 209.197.30.0
route delete 209.197.26.0
route delete 209.197.29.0
@
echo 请确认您已连接上VPN!
pause
route add 68.142.91.0 mask 255.255.255.0 %routeadd%
route add 68.142.116.0 mask 255.255.255.0 %routeadd%
route add 69.28.145.0 mask 255.255.255.0 %routeadd%
route add 72.165.61.0 mask 255.255.255.0 %routeadd%
route add 81.171.115.0 mask 255.255.255.0 %routeadd%
route add 146.66.152.0 mask 255.255.255.0 %routeadd%
route add 205.185.220.0 mask 255.255.255.0 %routeadd%
route add 208.64.200.0 mask 255.255.255.0 %routeadd%
route add 208.111.133.0 mask 255.255.255.0 %routeadd%
route add 208.111.171.0 mask 255.255.255.0 %routeadd%
route add 209.197.6.0 mask 255.255.255.0 %routeadd%
route add 209.197.20.0 mask 255.255.255.0 %routeadd%
route add 209.197.30.0 mask 255.255.255.0 %routeadd%
route add 209.197.26.0 mask 255.255.255.0 %routeadd%
route add 209.197.29.0 mask 255.255.255.0 %routeadd%
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/58859
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.