Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
HIT-Coder
HostsFile
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
HostsFile
/
README
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
28 lines (20 loc) · 1.92 KB
master
Breadcrumbs
HostsFile
/
README
Copy path
Top
File metadata and controls
Code
Blame
28 lines (20 loc) · 1.92 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
The file "hosts" is the final list.
This hosts file that can help you visit Facebook, Twitter & Google (as well as YouTube).
If you want the list of any other sites, post domain names here, and I'll work out the new list.
列表可以访问哪些网站?
可以访问的网站包括FourSquare, DropBox, Google, Facebook以及Twitter。YouTube可以访问,但是不能看视频(主要是因为YouTube获取视频流的地址不支持https)。
另外,将这个Hosts列表导入到Android手机后,手机可以访问Twitter, Facebook的服务。对Facebook手机应用的支持还不是很好,我不知道Facebook的手机应用需要哪些Hosts,因此没有完整提供。
列表如何生成?
目前这个列表是在SSH服务器上通过脚本获取的。当然,脚本只是一种方式,个人认为,任何一个可以翻墙的代理都可以用来获取Hosts列表。
在这个列表生成以后,当中的很多IP实际上是不能访问的。这些IP将被放到我本地的数据库中进行检查。比如像之前Twitter的IP,在不断地发生变化,那么,在我本地的数据库中,就存有了Twitter的多个IP,从中选择一个可以访问的IP合并到最终的Hosts列表中去。
如何增加列表内容?
发现网站载入长时间没有完成时,可以在网页上点击右键,选择"审查元素"(Chrome)或者安装FireBug插件(Firefox),接着对于没有载入的页面获取它的域名。
比如,没有载入的页面是 https://github.com/davidsun/HostsFile ,那么,获取的域名就是 github.com 。
在获取了域名以后,可以直接在GitHub上提交这些域名,我会定期处理这些请求,并且扩充和更新列表。
脚本如何使用?
脚本是用Python编写的,执行方式为
# python getHostsFile.py <输入文件名>
输入的格式见文件"hostsPool",即,一行一个域名。
--------
By Davidsun (@sunzheng91)
http://pursuer.me
You can’t perform that action at this time.