Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大佬,能否写个直接更新HOSTS里面的自定义域名。 #4

Closed
lylus opened this issue Feb 12, 2023 · 5 comments
Closed

大佬,能否写个直接更新HOSTS里面的自定义域名。 #4

lylus opened this issue Feb 12, 2023 · 5 comments

Comments

@lylus
Copy link

lylus commented Feb 12, 2023

感觉直接更新到hosts里面速度更快,设置也更方便。
CloudflareSpeedTest里面有看到更新到hosts里的脚本,但是他不支持多域名。

@lee1080
Copy link
Owner

lee1080 commented Feb 13, 2023

linux的hosts吗?多域名单ip,还是多域名多ip?

@lee1080
Copy link
Owner

lee1080 commented Feb 16, 2023

如果是多域名单ip,可以用原版脚本,写多个域名,统一写一个ip,然后脚本会自动查找你设定的ip,进行替换。

即你需要先去 /etc/hosts 文件中将所有 Cloudflare CDN IP 统一改为一个 IP。
然后在脚本中输入该 IP,按下回车键继续(IP 会存储在 nowip.txt 文件,以便下次脚本知道替换哪个 IP。
XIU2/CloudflareSpeedTest#42 (comment)

@lylus
Copy link
Author

lylus commented Feb 16, 2023

多域名多ip,就像大佬您的脚本一样。

@thsrite
Copy link

thsrite commented Feb 22, 2023

多域名多ip,就像大佬您的脚本一样。

同需要,docker部署 能自动更新hosts里面域名的ip就太棒了

@lee1080
Copy link
Owner

lee1080 commented Apr 13, 2023

已经增加更新hosts里的功能,但是docker的不能更新到宿主机。

@lee1080 lee1080 closed this as completed Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants