Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Type
/
to 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 }}
Uh oh!
There was an error while loading.
Please reload this page
.
HIT-Coder
/
HostsFile
Public
forked from
davidsun/HostsFile
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
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.