
[分享]批處理切換國內外主流DNS最后由 impk 于 -7-23 12:32
nclick="copycode($('code0'));">復制代碼
- @echo off
- color 2F
- @echo.
- @echo.
- @echo. 1. 國外混合DNS
- @echo.
- @echo. 2. 國內混合DNS
- @echo.
- @echo. 3. 云耀DNS
- @echo.
- @echo. 4. 谷歌DNS
- @echo.
- @echo. 5. 114DNS
- @echo.
- @echo. 6. 阿里DNS
- @echo.
- @echo.
- echo. 輸入序號選擇DNS:
- set /p id=
- if %id%==1 goto 國外混合DNS
- if %id%==2 goto 國內混合DNS
- if %id%==3 goto 云耀DNS
- if %id%==4 goto 谷歌DNS
- if %id%==5 goto 114DNS
- if %id%==6 goto 阿里DNS
- :國外混合DNS
- netsh interface ip set dns name=本地連接 source=static addr=1.1.1.1
- netsh interface ip add dns name=本地連接 addr=8.8.8.8
- netsh interface ip set dns name=無線網絡連接 source=static addr=1.1.1.1
- netsh interface ip add dns name=無線網絡連接 addr=8.8.8.8
- exit
- :國內混合DNS
- netsh interface ip set dns name=本地連接 source=static addr=114.114.114.114
- netsh interface ip add dns name=本地連接 addr=223.5.5.5
- netsh interface ip set dns name=無線網絡連接 source=static addr=114.114.114.114
- netsh interface ip add dns name=無線網絡連接 addr=223.5.5.5
- exit
- :云耀DNS
- netsh interface ip set dns name=本地連接 source=static addr=1.1.1.1
- netsh interface ip add dns name=本地連接 addr=1.0.0.1
- netsh interface ip set dns name=無線網絡連接 source=static addr=1.1.1.1
- netsh interface ip add dns name=無線網絡連接 addr=1.0.0.1
- exit
- :谷歌DNS
- netsh interface ip set dns name=本地連接 source=static addr=8.8.8.8
- netsh interface ip add dns name=本地連接 addr=8.8.4.4
- netsh interface ip set dns name=無線網絡連接 source=static addr=8.8.8.8
- netsh interface ip add dns name=無線網絡連接 addr=8.8.4.4
- exit
- :114DNS
- netsh interface ip set dns name=本地連接 source=static addr=114.114.114.114
- netsh interface ip add dns name=本地連接 addr=114.114.115.115
- netsh interface ip set dns name=無線網絡連接 source=static addr=114.114.114.114
- netsh interface ip add dns name=無線網絡連接 addr=114.114.115.115
- exit
- :阿里DNS
- netsh interface ip set dns name=本地連接 source=static addr=223.5.5.5
- netsh interface ip add dns name=本地連接 addr=223.6.6.6
- netsh interface ip set dns name=無線網絡連接 source=static addr=223.5.5.5
- netsh interface ip add dns name=無線網絡連接 addr=223.6.6.6
- exit

