521xueweihan / GitHub520

:kissing_heart: 让你“爱”上 GitHub,解决访问时图裂、加载慢的问题。(无需安装)
21.33k stars 2.15k forks source link

[Share] Update the Hosts in Windows with a Batch File #245

Open baskgithub opened 2 weeks ago

baskgithub commented 2 weeks ago

I wrote a batch file to download and merge into the local hosts file on Windows. Save following code in a bat file on your desktop and click 'Run As Administrator' in the context menu.

1. Update Part of the Hosts File

This batch file will update the content between the markers "### Github Start" and "### Github End" in your original hosts file, or, append to the end if not found the markers.

2. Simply overwrite the hosts with remote one.

Please visit this repo for the batch files. https://github.com/baskgithub/WindowsHosts