第一次用go写的项目,写的比较烂,欢迎大佬指出错误。
对Hosts进行一个新的更
解决Steam、github访问问题
推荐使用Hosts管理工具SwitchHosts SwitchHosts备用下载源
win + R 后执行 shell:startup
将快捷方式复制进去即可
可选的URL有:
如果访问不到GitHub可以尝试将github.com
替换为hub.fastgit.xyz
(国内镜像)
- ALL:
https://raw.githubusercontent.com/Clov614/SteamHostSync/main/Hosts
- Steam:
https://raw.githubusercontent.com/Clov614/SteamHostSync/main/Hosts_steam
- github:
https://raw.githubusercontent.com/Clov614/SteamHostSync/main/Hosts_github
镜像地址:
- All:
https://raw.sevencdn.com/Clov614/SteamHostSync/main/Hosts
- Steam:
https://raw.sevencdn.com/Clov614/SteamHostSync/main/Hosts_steam
- github:
https://raw.sevencdn.com/Clov614/SteamHostSync/main/Hosts_github
- Windows 系统:
C:\Windows\System32\drivers\etc\hosts
- Linux 系统:
/etc/hosts
- Mac(苹果电脑)系统:
/etc/hosts
复制下面的内容至hosts尾部(追加在文本末尾)
#github Start
140.82.114.25 alive.github.com
140.82.113.26 live.github.com
185.199.108.154 github.githubassets.com
140.82.112.21 central.github.com
185.199.108.133 desktop.githubusercontent.com
#### assets-cdn.github.com
185.199.108.133 camo.githubusercontent.com
185.199.108.133 github.map.fastly.net
151.101.65.194 github.global.ssl.fastly.net
140.82.113.4 gist.github.com
185.199.110.153 github.io
140.82.113.3 github.com
192.0.66.2 github.blog
140.82.114.5 api.github.com
185.199.109.133 raw.githubusercontent.com
185.199.109.133 user-images.githubusercontent.com
185.199.111.133 favicons.githubusercontent.com
185.199.108.133 avatars5.githubusercontent.com
185.199.111.133 avatars4.githubusercontent.com
185.199.109.133 avatars3.githubusercontent.com
185.199.110.133 avatars2.githubusercontent.com
185.199.110.133 avatars1.githubusercontent.com
185.199.111.133 avatars0.githubusercontent.com
185.199.108.133 avatars.githubusercontent.com
140.82.114.9 codeload.github.com
16.15.217.183 github-cloud.s3.amazonaws.com
52.217.120.233 github-com.s3.amazonaws.com
16.182.39.41 github-production-release-asset-2e65be.s3.amazonaws.com
3.5.28.236 github-production-user-asset-6210df.s3.amazonaws.com
52.217.207.121 github-production-repository-file-5c1aeb.s3.amazonaws.com
185.199.108.153 githubstatus.com
140.82.114.17 github.community
52.224.38.193 github.dev
185.199.109.133 media.githubusercontent.com
23.45.149.185 store.steampowered.com
#github End
# Last Update Time : 2025-01-30 09:21:04
#steam Start
23.214.233.226 steamcommunity.com
23.213.69.74 www.steamcommunity.com
23.45.149.185 store.steampowered.com
23.214.233.226 api.steampowered.com
23.214.233.226 help.steampowered.com
23.215.0.10 store.akamai.steamstatic.com
23.215.0.136 steamcdn-a.akamaihd.net
23.215.0.14 cdn.akamai.steamstatic.com
23.213.69.74 steam-chat.com
23.215.0.14 community.akamai.steamstatic.com
#steam End
# Last Update Time : 2025-01-30 09:21:05
#Ubisoft_download Start
23.222.201.62 static3.cdn.Ubi.com
23.221.242.5 static2.cdn.Ubi.com
193.108.91.206 static1.cdn.Ubi.com
#Ubisoft_download End
# Last Update Time : 2025-01-30 09:21:05
#docker Start
141.193.213.20 docker.com
54.208.73.48 hub.docker.com
18.160.10.27 docs.docker.com
104.19.168.24 login.docker.com
44.208.254.194 registry.hub.docker.com
100.29.167.200 docker.io
3.94.224.37 registry-1.docker.io
98.85.153.80 index.docker.io
#docker End
# Last Update Time : 2025-01-30 09:21:05
#gog galaxy Start
151.101.129.55 auth.gog.com
151.101.129.55 www.gogalaxy.com
151.101.193.55 remote-config.gog.com
151.101.193.55 insights-collector.gog.com
151.101.1.55 gameplay.gog.com
151.101.193.55 gamesdb.gog.com
151.101.193.55 external-accounts.gog.com
151.101.65.55 www.gog.com
#gog galaxy End
# Last Update Time : 2025-01-30 09:21:05
#Github: https://github.com/Clov614/SteamHostSync
大部分情况下是直接生效,如未生效可尝试下面的办法,刷新 DNS:
- Windows:在 CMD 窗口输入:
ipconfig /flushdns
- Linux 命令:
sudo nscd restart
- Mac 命令:
sudo killall -HUP mDNSResponder
手动下载可执行文件第一次执行后会在目录生成Source.yaml文件,可手动配置。
ua : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
platforms:
-
#github :
- github #数组的第一个值为对应平台
- alive.github.com #后续值为需要解析ip地址的域名
- live.github.com
- github.githubassets.com
- central.github.com
- desktop.githubusercontent.com
- assets-cdn.github.com
- camo.githubusercontent.com
- github.map.fastly.net
- github.global.ssl.fastly.net
- gist.github.com
- github.io
- github.com
- github.blog
- api.github.com
- raw.githubusercontent.com
- user-images.githubusercontent.com
- favicons.githubusercontent.com
- avatars5.githubusercontent.com
- avatars4.githubusercontent.com
- avatars3.githubusercontent.com
- avatars2.githubusercontent.com
- avatars1.githubusercontent.com
- avatars0.githubusercontent.com
- avatars.githubusercontent.com
- codeload.github.com
- github-cloud.s3.amazonaws.com
- github-com.s3.amazonaws.com
- github-production-release-asset-2e65be.s3.amazonaws.com
- github-production-user-asset-6210df.s3.amazonaws.com
- github-production-repository-file-5c1aeb.s3.amazonaws.com
- githubstatus.com
- github.community
- github.dev
- media.githubusercontent.com
-
#steam:
- steam
- steamcommunity.com
- www.steamcommunity.com
- store.steampowered.com
- api.steampowered.com
- help.steampowered.com
- store.akamai.steamstatic.com
- steamcdn-a.akamaihd.net
- cdn.akamai.steamstatic.com
- steam-chat.com
- community.akamai.steamstatic.com