代码拉取完成,页面将自动刷新
@rem 项目是域名解析到网关机器,做分发。调试的是,有时候要各自服务器都看看。就需要手动更改hosts文件。
@rem 使用bat文件,方便更改hosts文件
@echo off
@echo "请注意你的杀毒软件提示,一定要允许"
@echo ########################################
@echo 请选择要指定的ip地址
@echo 0、退出
@echo 1、139.196.253.146(国内网关)
@echo 2、139.196.253.144
@echo 3、139.196.153.151
@echo 4、47.88.85.96(美国网关)
@echo 5、47.88.86.91
@echo 6、47.88.84.80
:CHOOSE
set /p choice=
if %choice%==0 (
exit
)
set /a choice=%choice%+0
if %choice% GTR 0 (
if %choice% LEQ 6 (
@xcopy C:\Windows\system32\drivers\etc\hosts C:\Windows\system32\drivers\etc\hosts.bak\ /d /c /i /y
@echo ########################################
@echo hosts文件备份完毕,开始修改hosts文件
@rem ==============start=====================
@rem ==============start=====================
@rem ==============start=====================
if %choice%==1 (
@echo 139.196.253.146 act.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.146 cp.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.146 captcha.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.146 www.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.146 ddusys.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.146 cn.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.146 passport.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.146 search.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.146 exhibition.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
)else if %choice%==2 (
@echo 139.196.253.144 act.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.144 cp.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.144 captcha.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.144 www.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.144 ddusys.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.144 cn.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.144 passport.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.144 search.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.253.144 exhibition.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
)else if %choice%==3 (
@echo 139.196.153.151 act.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.153.151 cp.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.153.151 captcha.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.153.151 www.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.153.151 ddusys.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.153.151 cn.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.153.151 passport.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.153.151 search.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 139.196.153.151 exhibition.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
)else if %choice%==4 (
@echo 47.88.85.96 act.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.85.96 cp.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.85.96 captcha.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.85.96 www.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.85.96 ddusys.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.85.96 cn.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.85.96 passport.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.85.96 search.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.85.96 exhibition.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
)else if %choice%==5 (
@echo 47.88.86.91 act.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.86.91 cp.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.86.91 captcha.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.86.91 www.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.86.91 ddusys.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.86.91 cn.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.86.91 passport.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.86.91 search.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.86.91 exhibition.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
)else if %choice%==6 (
@echo 47.88.84.80 act.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.84.80 cp.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.84.80 captcha.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.84.80 www.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.84.80 ddusys.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.84.80 cn.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.84.80 passport.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.84.80 search.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
@echo 47.88.84.80 exhibition.drugdu.com >>C:\Windows\System32\drivers\etc\hosts
)
@rem ==============end=====================
@rem ==============end=====================
@rem ==============end=====================
@echo "hosts文件修改完成"
@ipconfig /flushdns
@echo "刷新DNS完成"
@echo hosts文件修改完毕,按任意键恢复系统原始状态
@echo
@echo ########################################
@pause > nul
@copy C:\Windows\System32\drivers\etc\hosts.bak\hosts C:\Windows\System32\drivers\etc\hosts /y
@echo
@echo off
echo hosts文件恢复完毕,按任意键退出
@echo
@pause > nul
@exit
)else (
echo 输入有误2,请重新输入
goto CHOOSE
)
echo a
goto CHOOSE
) else (
echo 输入有误1,请重新输入
goto CHOOSE
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。