Home > Article > Development Tools > How to connect to github naked
GitHub is a platform that allows developers to store, manage, and share code. It is widely used in open source communities and team collaboration. For developers, mastering how to use GitHub needs to start from getting started. This article will introduce in detail how to connect to GitHub naked, allowing you to use this platform faster.
1. What is nudity?
Naked connection refers to connecting to GitHub without using any proxy. In China, due to various well-known reasons, accessing foreign websites requires the use of proxies or circumvention tools. However, naked connection uses a direct connection method. At this time, what you need to skip is domestic DNS resolution and IP blocking to obtain better speed and stability.
2. Why do you want to be naked?
3. How to connect naked?
Use the hosts file to resolve certain domain names to specified IP addresses. For example, we can resolve GitHub's domain name to its official IP address.
The steps are as follows:
(1) Obtain the IP address of GitHub
Open the CMD command line window and enter the following command: ping github.com
Then Will return something similar to the following:
Pinging github.com [192.30.255.112] with 32 bytes of data:
Reply from 192.30.255.112: bytes=32 time=28ms TTL=52
Reply from 192.30.255.112: bytes=32 time=25ms TTL=52
Reply from 192.30.255.112: bytes=32 time=25ms TTL=52
Reply from 192.30.255.112: bytes=32 time=27ms TTL=52
indicates that the IP address corresponding to the github.com domain name is 192.30.255.112.
(2) Modify the hosts file
Open the hosts file (path: C:\Windows\System32\drivers\etc\hosts) and add the following content to the last line:
192.30.255.112 github.com
After saving, open the web page and you can access the GitHub website.
DNSPod is a domestic DNS resolution service provider. When realizing non-naked access, it provides "intelligent DNS resolution" Services can save parsing time and increase speed. For naked connections, DNSPod also provides similar services.
The steps are as follows:
(1) Register a DNSPod account
First you need to register a DNSPod account. You can use your own mobile phone number to register, or you can register through other methods. .
(2) Configure DNSPod
Log in to the DNSPod account and configure the domain name:
Select "Add domain name", enter the domain name that needs to be resolved (such as github.com), and then select "Add records manually".
Here we need to add two records:
A record: Add A record, fill in the domain name, and the IP address of the GitHub server: 185.199.108.153/154/155/156
CNAME record: Add a CNAME record and fill in a CNAME record for com.mcbox.net. If not, create one yourself. For example (url-cdn.tnit.com), add a CNAME as: github.global.ssl.fastly.net
Two records need to be added separately. The complete configuration is shown in the figure below:
(3) Modify the computer DNS
In the network settings of the computer, modify the DNS server address and change the DNS server address provided by DNSPod (for example: 119.29. 29.29) Set as the DNS server address of this machine. As shown in the figure below:
After the modification is completed, refresh the web page and you can quickly access GitHub.
The above is the method of naked connection to GitHub. I hope this article is helpful to you and enjoy a smoother GitHub experience!
The above is the detailed content of How to connect to github naked. For more information, please follow other related articles on the PHP Chinese website!