BAT 设置内网代理


::admin运行
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit cd /d "%~dp0"


:: 设置代理
color 2
set /p choice=请选择设置类型(1:H代理 / 2:M代理/3:取消:)
echo.
if "%choice%"=="1" goto daili1
if "%choice%"=="2" goto daili2
if "%choice%"=="3" goto daili3

goto main
:daili1
echo 设置H代理开始...
echo.
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "10.10.10.10:8080" /f
color 2
echo Set the proxyserver successfully !

pause
exit
if errorlevel 2 goto main
if errorlevel 1 goto end
:daili2
echo 设置M代理开始....
echo.
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "10.110.18.4:8080" /f
color 2
echo Set the proxyserver successfully !
echo Press any key to continue

pause
exit
if errorlevel 2 goto main
if errorlevel 1 goto end

:daili3
echo 取消代理开始....
@echo off

echo Removing the proxyserver ...

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "" /f
color 2
echo Remove the proxyserver successfully !
echo Press any key to continue
pause
exit
if errorlevel 2 goto main
if errorlevel 1 goto end
:end


------------------------

::route add

REM MTN Changeing Routes

@echo off
route delete 10.100.100.246/32

route add 10.100.100.246 mask 255.255.255.255 10.110.13.1 metric 1

route print
pause

评论

此博客中的热门博文

LTE – 网络架构及网元实体-[转]

LTE: 小区RS参考信号功率与RRU发射功率的计算-[转]