Home  >  Article  >  Development Tools  >  How to connect to github naked

How to connect to github naked

PHPz
PHPzOriginal
2023-03-31 11:14:191180browse

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?

  1. Fast speed: Using naked connection, you can directly access GitHub's server, skipping the proxy's parsing and transfer, and the access speed is faster.
  2. High security: Using naked connections, you can prevent third-party proxy servers from stealing your GitHub account and password, ensuring the security of your account.
  3. Strong stability: Using naked connections, you can avoid the indirect impact of the proxy server and do not need to consider the stability of the proxy server.

3. How to connect naked?

  1. Modify the hosts file

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.

  1. Use DNSPod for quick access

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn