2020-01-04 15:01:26 +03:00
# Pingtunnel
[<img src="https://img.shields.io/github/license/esrrhs/pingtunnel"> ](https://github.com/esrrhs/pingtunnel )
[<img src="https://img.shields.io/github/languages/top/esrrhs/pingtunnel"> ](https://github.com/esrrhs/pingtunnel )
2020-01-06 05:42:53 +03:00
[![Go Report Card ](https://goreportcard.com/badge/github.com/esrrhs/pingtunnel )](https://goreportcard.com/report/github.com/esrrhs/pingtunnel)
2020-01-04 15:01:26 +03:00
[<img src="https://img.shields.io/github/v/release/esrrhs/pingtunnel"> ](https://github.com/esrrhs/pingtunnel/releases )
[<img src="https://img.shields.io/github/downloads/esrrhs/pingtunnel/total"> ](https://github.com/esrrhs/pingtunnel/releases )
[<img src="https://img.shields.io/docker/pulls/esrrhs/pingtunnel"> ](https://hub.docker.com/repository/docker/esrrhs/pingtunnel )
[<img src="https://img.shields.io/github/workflow/status/esrrhs/pingtunnel/Go"> ](https://github.com/esrrhs/pingtunnel/actions )
2020-01-08 06:22:51 +03:00
[![Codacy Badge ](https://api.codacy.com/project/badge/Grade/a200bca59d1b4ca7a9c2cdb564508b47 )](https://www.codacy.com/manual/esrrhs/pingtunnel?utm_source=github.com& utm_medium=referral& utm_content=esrrhs/pingtunnel& utm_campaign=Badge_Grade)
2020-01-04 15:01:26 +03:00
2020-10-31 18:08:41 +03:00
Pingtunnel is a tool that advertises tcp/udp/sock5 traffic as icmp traffic for forwarding.
2020-10-31 18:10:21 +03:00
2020-01-04 15:01:26 +03:00
![image ](network.jpg )
2020-01-07 17:10:28 +03:00
# Use
### Install server
* First prepare a server with a public IP, such as EC2 on AWS, assuming the domain name or public IP is www.yourserver.com
2020-01-08 05:49:48 +03:00
* Download the corresponding installation package from [releases ](https://github.com/esrrhs/pingtunnel/releases ), such as pingtunnel_linux64.zip, then decompress and execute with **root** privileges
2020-01-04 15:01:26 +03:00
```
2020-01-08 05:42:49 +03:00
sudo wget (link of latest release)
2020-01-07 17:10:28 +03:00
sudo unzip pingtunnel_linux64.zip
2020-01-04 15:01:26 +03:00
sudo ./pingtunnel -type server
```
2020-01-08 05:38:33 +03:00
* (Optional) Disable system default ping
```
2020-09-30 12:39:13 +03:00
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
2020-01-08 05:38:33 +03:00
```
2020-01-07 17:10:28 +03:00
### Install GUI client (recommended by novices)
* Download the gui version of qt from [pingtunnel-qt ](https://github.com/esrrhs/pingtunnel-qt )
* Double-click the exe to run, modify the server (such as www.yourserver.com), listen port (such as 1080), tick sock5, other settings can be default, and then click *GO*
* Everything is normal, there will be a ping value on the interface, and then you can click X to hide it in the status bar
2020-10-31 18:08:41 +03:00
* Set the browser's sock5 proxy to 127.0.0.1:1080, If you do not connect to the Internet, a socks version not supported error log appears, indicating that the browser's proxy is not a socks5 proxy.If it prompts a non-secure connection, it means there is a problem with dns. Check "Use socks5 proxy DNS query" on the browser.
2020-10-31 18:10:21 +03:00
2020-01-07 17:10:28 +03:00
![image ](qtrun.jpg )
2020-01-08 05:35:57 +03:00
### Install the client (recommended for high play)
2020-01-07 17:10:28 +03:00
* Download the corresponding installation package from [releases ](https://github.com/esrrhs/pingtunnel/releases ), such as pingtunnel_windows64.zip, and decompress it
2020-01-08 05:49:48 +03:00
* Then run with **administrator** privileges. The commands corresponding to different forwarding functions are as follows.
2020-01-08 05:33:02 +03:00
* If you see a log of ping pong, the connection is normal
2020-01-07 17:10:28 +03:00
##### Forward sock5
2020-01-04 15:01:26 +03:00
```
2020-01-07 17:10:28 +03:00
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -sock5 1
2020-01-04 15:01:26 +03:00
```
2020-01-07 17:10:28 +03:00
##### Forward tcp
2020-01-04 15:01:26 +03:00
```
2020-01-07 17:10:28 +03:00
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
2020-01-04 15:01:26 +03:00
```
2020-01-07 17:10:28 +03:00
##### Forward udp
2020-01-04 15:01:26 +03:00
```
2020-01-07 17:10:28 +03:00
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -t www.yourserver.com:4455
2020-01-04 15:01:26 +03:00
```
2020-01-07 17:10:28 +03:00
2020-01-08 05:35:57 +03:00
### Use Docker
2020-01-07 17:10:28 +03:00
server:
2020-01-04 15:01:26 +03:00
```
2020-01-07 17:10:28 +03:00
docker run --name pingtunnel-server -d --privileged --network host --restart = always esrrhs / pingtunnel ./pingtunnel -type server -key 123456
```
client:
```
docker run --name pingtunnel-client -d --restart = always -p 1080: 1080 esrrhs / pingtunnel ./pingtunnel -type client -l: 1080 -s www.yourserver.com -sock5 1 -key 123456
2020-01-04 15:01:26 +03:00
```
# Test
2020-06-27 11:22:06 +03:00
download the centos image [centos mirror ](http://mirrors.ocf.berkeley.edu/centos/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-dvd1.iso )
2020-10-31 18:12:08 +03:00
| | wget | ss | kcp | pingtunnel |
2020-05-07 13:14:40 +03:00
|--------------|----------|------------|------------|------------|
| AlibabaCloud | 26.6KB/s | 31.8KB/s | 606KB/s |5.64MB/s|