现有文件如下settings.json
{
"Type": "Socks5",
"Password": "",
"Username": "",
"RemoteHostname": "",
"Group": "NONE",
"Hostname": "192.168.79.68",
"Port": 18888,
"Rate": 1,
"Remark": "11"
},
想把 "Group": "NONE"下面这行"Hostname":替换成一个变量Gateway
然后这个变量是- for /f "tokens=3,4" %%a in ('route print^|find "0.0.0.0 0.0.0.0"') do (if not defined ip set "Gateway=%%a" & set "ip=%%b")
复制代码
|