KANIKIG

KANIKIG

just for fun | 兴趣使然 Ph.D. in Engineering|❤️ #NFT $ETH| [Twitter](https://twitter.com/kanikig2)|[Github](https://github.com/KANIKIG)|[Telegram channel](https://t.me/kanikigtech)

Currently the most stable! Use Gost tunnel for transferring to build Telegram proxy.

image

Preface#

Reading this article requires some knowledge of Linux and understanding of Linux commands.

This article is completely original, please indicate the source when reprinting.

Why use tunnel relay to build?#

The existing several commonly used Telegram proxy methods have the following problems:

  • Direct socks connection: easily blocked
  • Direct mtproto connection: basically easily blocked
  • mtproto+tls: can effectively resist blocking, but due to the situation of direct connection, the delay is generally high
  • mtproto+relay: mtp traffic is recognized in China, and NAT vendors generally prohibit the use of mtp

So is there a way to avoid all of the above problems? That is to use tunnel relay to build a socks proxy.

The basic principle is as follows:

Build a socks proxy on a foreign landing machine, and use gost on the domestic relay machine to establish an encrypted tunnel to bypass the Great Firewall (tunnel is currently the best form of resistance to blocking).

Building tutorial#

Example#

The following example is based on the following assumptions:

  • Domestic NAT:
    • IP: A.A.A.A
    • Internal port: 11360
    • External port: 49698 (some vendors support mapping of internal and external ports to be consistent, here is an example of inconsistency, please manually create the mapping)
  • Landing socks5:
    • Landing IP: B.B.B.B
    • Socks port: 7891
    • Socks username: 123456
    • Socks password: 654321

Please correspond your own parameters to the examples one by one, do not copy them.

Install gost#

68747470733a2f2f692e6c6f6c692e6e65742f323032302f31322f31342f713735504f367332444d4963554b422e706e67.png

I have modified and enhanced the original EasyGost script, adding many features. You can see the project page for specific features:

Project Address

One-click script:

wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/KANIKIG/Multi-EasyGost/master/gost.sh && chmod +x gost.sh && ./gost.sh

To run this script again, just enter ./gost.sh and press Enter.

We run this script on both the landing machine and the domestic NAT and select 1 to install gost.

iShot2021-01-1809.35.59.png

For the domestic machine installation, please select the domestic acceleration source, otherwise it will be very slow to pull from GitHub.

Domestic NAT configuration#

We use the script to add gost encryption forwarding

# Run the script
./gost.sh

Then follow the instructions to operate. I fill in according to the previous example, please correspond on your own. The tunnel transmission type can be selected arbitrarily, but the relay and landing must be consistent.

iShot2021-01-1809.46.55.png

iShot2021-01-1809.51.34.png

Note that the destination port here should not be the landing socks port, it should be any other available port outside of it, only used to decrypt tunnel traffic. You can see the next step for details. I selected 443 in the previous text. If port 443 on the landing machine is occupied by a website, you can change it to any other port without affecting security.

Landing machine configuration#

The script has built-in one-click installation of socks proxy (built-in in gost)

# Run the script
./gost.sh

iShot2021-01-1809.39.54.png

After installation, use Telegram to directly connect to this socks proxy to ensure that the direct connection is working before proceeding with tunnel forwarding. (Once confirmed, close it. Socks without encryption will be blocked quickly)

Next, connect the tunnel landing end according to the instructions. I fill in according to the previous example, please correspond on your own.

iShot2021-01-1809.50.03.png

iShot2021-01-1809.51.59.png

Note that the traffic entry and the destination port filled in the domestic machine must be consistent, the IP is filled with 127.0.0.1, which is the local IP. The destination port here is the port on which the socks proxy listens.

TG connection test#

Fill in as follows

Screenshot_2020-08-01-23-22-14.jpg

If it is found to be not working, please carefully check the correspondence between your own parameters and the examples.

Postscript#

Personal experience shows that the latency is very low, and the video loading speed is very fast. It is basically close to using WeChat in China.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.