本帖最后由 syscca 于 2019-5-17 16:55 编辑
vpndown.bat原数据- @echo off
- route delete 1.0.1.0
- route delete 1.0.2.0
- route delete 1.0.8.0
- route delete 1.0.32.0
- route delete 1.1.0.0
- route delete 1.1.2.0
- route delete 1.1.4.0
- route delete 1.1.8.0
- route delete 1.1.9.0
复制代码 处理vpndown.bat做成del.txt这样的数据但mask后面要对上add.txt的数据- delete 1.0.1.0 mask 255.255.255.0 default METRIC default IF default
- delete 1.0.2.0 mask 255.255.254.0 default METRIC default IF default
- delete 1.0.8.0 mask 255.255.248.0 default METRIC default IF default
- delete 1.0.32.0 mask 255.255.224.0 default METRIC default IF default
- delete 1.1.0.0 mask 255.255.255.0 default METRIC default IF default
- delete 1.1.2.0 mask 255.255.254.0 default METRIC default IF default
- delete 1.1.4.0 mask 255.255.252.0 default METRIC default IF default
- delete 1.1.8.0 mask 255.255.255.0 default METRIC default IF default
- delete 1.1.9.0 mask 255.255.255.0 default METRIC default IF default
复制代码 vpnup.bat原数据- @echo off
- for /F "tokens=3" %%* in ('route print ^| findstr "\<0.0.0.0\>"') do set "gw=%%*"
-
-
- ipconfig /flushdns
-
- route add 1.0.1.0 mask 255.255.255.0 %gw% metric 5
- route add 1.0.2.0 mask 255.255.254.0 %gw% metric 5
- route add 1.0.8.0 mask 255.255.248.0 %gw% metric 5
- route add 1.0.32.0 mask 255.255.224.0 %gw% metric 5
- route add 1.1.0.0 mask 255.255.255.0 %gw% metric 5
- route add 1.1.2.0 mask 255.255.254.0 %gw% metric 5
- route add 1.1.4.0 mask 255.255.252.0 %gw% metric 5
- route add 1.1.8.0 mask 255.255.255.0 %gw% metric 5
- route add 1.1.9.0 mask 255.255.255.0 %gw% metric 5
复制代码 处理vpnup.bat做成add.txt这样的数据- add 1.0.1.0 mask 255.255.255.0 default METRIC default IF default
- add 1.0.2.0 mask 255.255.254.0 default METRIC default IF default
- add 1.0.8.0 mask 255.255.248.0 default METRIC default IF default
- add 1.0.32.0 mask 255.255.224.0 default METRIC default IF default
- add 1.1.0.0 mask 255.255.255.0 default METRIC default IF default
- add 1.1.2.0 mask 255.255.254.0 default METRIC default IF default
- add 1.1.4.0 mask 255.255.252.0 default METRIC default IF default
- add 1.1.8.0 mask 255.255.255.0 default METRIC default IF default
- add 1.1.9.0 mask 255.255.255.0 default METRIC default IF default
复制代码
|