2018-12-20 10:09:16 +03:00
# Pingtunnel
2020-01-01 11:25:02 +03:00
2020-01-01 11:54:54 +03:00
[<img src="https://img.shields.io/github/license/esrrhs/pingtunnel"> ](https://github.com/esrrhs/pingtunnel )
2020-01-03 04:03:49 +03:00
[<img src="https://img.shields.io/github/languages/top/esrrhs/pingtunnel"> ](https://github.com/esrrhs/pingtunnel )
2020-01-06 05:42:34 +03:00
[![Go Report Card ](https://goreportcard.com/badge/github.com/esrrhs/pingtunnel )](https://goreportcard.com/report/github.com/esrrhs/pingtunnel)
2020-01-01 11:33:40 +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 )
2020-01-01 11:54:54 +03:00
[<img src="https://img.shields.io/github/workflow/status/esrrhs/pingtunnel/Go"> ](https://github.com/esrrhs/pingtunnel/actions )
2020-01-01 11:25:02 +03:00
2022-05-15 06:34:20 +03:00
Pingtunnel is a tool that sends TCP/UDP traffic over ICMP.
2019-11-05 16:09:36 +03:00
2021-11-16 07:19:44 +03:00
## Note: This tool is only to be used for study and research, do not use it for illegal purposes
2020-10-31 18:09:55 +03:00
2019-11-01 17:38:09 +03:00
![image ](network.jpg )
2019-10-27 15:09:51 +03:00
2021-11-16 07:19:44 +03:00
## Usage
2020-12-23 05:11:06 +03:00
2022-05-15 06:34:20 +03:00
### Install the server
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
- First prepare a server with a public IP, such as EC2 on AWS, assuming the domain name or public IP is www.yourserver.com
- 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-12-23 05:11:06 +03:00
2018-12-20 10:09:16 +03:00
```
2021-11-16 07:19:44 +03:00
sudo wget (link of latest release)
2020-01-07 17:10:28 +03:00
sudo unzip pingtunnel_linux64.zip
2018-12-20 10:09:16 +03:00
sudo ./pingtunnel -type server
```
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
- (Optional) Disable system default ping
2020-12-23 05:11:06 +03:00
2020-01-08 05:38:33 +03:00
```
2021-11-16 07:19:44 +03:00
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
2020-01-08 05:38:33 +03:00
```
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
### Install the client
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
- Download the corresponding installation package from [releases ](https://github.com/esrrhs/pingtunnel/releases ), such as pingtunnel_windows64.zip, and decompress it
- Then run with **administrator** privileges. The commands corresponding to different forwarding functions are as follows.
- If you see a log of ping pong, the connection is normal
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
#### Forward sock5
2020-12-23 05:11:06 +03:00
2018-12-20 10:09:16 +03:00
```
2021-11-16 07:19:44 +03:00
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -sock5 1
2018-12-20 10:09:16 +03:00
```
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
#### Forward tcp
2020-12-23 05:11:06 +03:00
2018-12-23 08:09:33 +03:00
```
2021-11-16 07:19:44 +03:00
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
2018-12-23 08:09:33 +03:00
```
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
#### Forward udp
2020-12-23 05:11:06 +03:00
2018-12-23 08:09:33 +03:00
```
2021-11-16 07:19:44 +03:00
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -t www.yourserver.com:4455
2018-12-23 08:09:33 +03:00
```
2020-01-07 17:10:28 +03:00
2021-11-16 07:19:44 +03:00
### Use Docker
It can also be started directly with docker, which is more convenient. Same parameters as above
2021-04-01 06:49:07 +03:00
- server:
2019-10-28 11:54:09 +03:00
```
2022-01-27 10:16:25 +03:00
docker run --name pingtunnel-server -d --privileged --network host --restart=always esrrhs/pingtunnel ./pingtunnel -type server -key 123456
2020-01-07 17:10:28 +03:00
```
2021-04-01 06:49:07 +03:00
- client:
2020-01-07 17:10:28 +03:00
```
2022-01-27 10:16:25 +03:00
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
2019-10-28 11:54:09 +03:00
```
2019-10-27 15:27:52 +03:00
2021-11-16 07:19:44 +03:00
## Test
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
download the centos image [centos mirror ](http://centos.s.uw.edu/centos/8.4.2105/isos/x86_64/CentOS-8.4.2105-x86_64-dvd1.iso )
2020-12-23 05:11:06 +03:00
2021-11-16 07:19:44 +03:00
| | wget | ss | kcp | pingtunnel |
| ------------ | -------- | -------- | ------- | ---------- |
| AlibabaCloud | 26.6KB/s | 31.8KB/s | 606KB/s | 5.64MB/s |
2021-11-16 07:20:44 +03:00