This commit is contained in:
esrrhs 2020-01-07 22:10:28 +08:00
parent e0c5fd7b2f
commit c79b7a2cea
3 changed files with 76 additions and 61 deletions

View File

@ -18,37 +18,55 @@ pingtunnel是把tcp/udp/sock5流量伪装成icmp流量进行转发的工具。
![image](network.jpg)
# Why use this
* 因为网络审查ip会直接被ban但是却可以ping通这时候就可以用这个工具继续连接服务器
* 在咖啡厅或是机场可以连接free wifi但是需要登录跳转验证这时候就可以用这个工具绕过登录上网因为wifi虽然不可以上网但是却可以ping通你的服务器
* 在某些网络tcp的传输很慢但是如果用icmp协议可能因为运营商的设置或是网络拓扑速度会变快实际测试在中国大陆连aws的服务器会有加速效果
# 功能
* 某些服务器的tcp、udp流量被禁止可以通过pingtunnel绕过
* 某些场合如学校、咖啡厅、机场需要登录跳转验证可以通过pingtunnel绕过
* 某些网络tcp传输很慢可以通过pingtunnel加速网络
# Sample
如把本机的:4455的UDP流量转发到www.yourserver.com:4455
* 在www.yourserver.com的服务器上用root权限运行。
# 使用
### 安装服务端
* 首先准备好一个具有公网ip的服务器如AWS上的EC2假定域名或者公网ip是www.yourserver.com
* 从[releases](https://github.com/esrrhs/pingtunnel/releases)下载对应的安装包如pingtunnel_linux64.zip然后解压执行
```
sudo wget https://github.com/esrrhs/pingtunnel/releases/download/1.5/pingtunnel_linux64.zip
sudo unzip pingtunnel_linux64.zip
sudo ./pingtunnel -type server
```
* 在你本地电脑上用管理员权限运行。
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455
```
* 如果看到客户端不停的ping、pong日志输出说明工作正常。
```
ping www.xx.com 2018-12-23 13:05:50.5724495 +0800 CST m=+3.023909301 8 0 1997 2
pong from xx.xx.xx.xx 210.8078ms
```
* 如果想转发tcp流量只需要在客户端加上-tcp的参数。
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
```
* 如果想转发sock5流量只需要在客户端加上-sock5的参数。
### 安装GUI客户端(新手推荐)
* 从[pingtunnel-qt](https://github.com/esrrhs/pingtunnel-qt)下载qt的gui版本
* 双击exe运行修改server如www.yourserver.com、listen port如1080勾上sock5其他设置默认即可然后点击*GO*
* 一切正常界面上会有ping值显示然后可点击X隐藏到状态栏
* 设置浏览器的sock5代理到127.0.0.1:1080
![image](qtrun.jpg)
### 安装客户端
* 从[releases](https://github.com/esrrhs/pingtunnel/releases)下载对应的安装包如pingtunnel_windows64.zip解压
* 然后用管理员权限运行,不同的转发功能所对应的命令如下。
##### 转发sock5
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -sock5 1
```
* 大功告成,然后你就可以开始和本机的:4455端口通信数据都被自动转发到远端如同连接到www.yourserver.com:4455一样。
##### 转发tcp
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
```
##### 转发udp
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455
```
# Test
# 使用Docker
server:
```
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
```
# 效果
测试pingtunnel的加速效果服务器位于aws Korea客户端位于中国大陆。
下载centos镜像 [centos mirror](http://mirror.calgah.com/centos/8/isos/x86_64/CentOS-8-x86_64-1905-dvd1.iso)
@ -65,21 +83,11 @@ pingtunnel.exe -type client -l :4455 -s www.yourserver.com -sock5 1
![image](test.png)
# Download
# 下载
cmd: https://github.com/esrrhs/pingtunnel/releases
QT GUI: https://github.com/esrrhs/pingtunnel-qt
# Docker
server:
```
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
```
# Stargazers over time
[![Stargazers over time](https://starchart.cc/esrrhs/pingtunnel.svg)](https://starchart.cc/esrrhs/pingtunnel)

View File

@ -13,34 +13,51 @@ Pingtunnel is a tool that advertises tcp/udp/sock5 traffic as icmp traffic for f
![image](network.jpg)
# Why use this
* If the server's ip is blocked, all tcp udp packets are forbidden, but it can be pinged. At this point, you can continue to connect to the server with this tool.
* In the coffee shop or airport, you can connect to free wifi, but you need to log in to verify. At this time, you can use this tool to bypass the login, because wifi can not surf the Internet, but you can ping your server.
* In some networks, the transmission of tcp is very slow, but if the icmp protocol is used, the speed may be faster because of the operator's settings or the network topology. After testing, connecting the server of aws from mainland China has an accelerated effect.
# Sample
For example, the UDP traffic of the machine: 4545 is forwarded to www.yourserver.com:4455:
* Run with root privileges on the server at www.yourserver.com
* TCP and UDP traffic of some servers are banned and can be bypassed by pingtunnel.
* In some occasions, such as schools, cafes, and airports, login jump authentication is required, which can be bypassed by pingtunnel.
* In some networks, TCP transmission is very slow. You can speed up the network through pingtunnel.
# 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
* Download the corresponding installation package from [releases](https://github.com/esrrhs/pingtunnel/releases), such as pingtunnel_linux64.zip, then decompress and execute
```
sudo wget https://github.com/esrrhs/pingtunnel/releases/download/1.5/pingtunnel_linux64.zip
sudo unzip pingtunnel_linux64.zip
sudo ./pingtunnel -type server
```
* Run with administrator privileges on your local computer
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455
```
* If you see the client ping, pong log output, it means normal work
```
ping www.xx.com 2018-12-23 13:05:50.5724495 +0800 CST m=+3.023909301 8 0 1997 2
pong from xx.xx.xx.xx 210.8078ms
```
* If you want to forward tcp traffic, you only need to add the -tcp parameter to the client.
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
```
* If you want to forward sock5 traffic, you only need to add the -sock5 parameter to the client.
### 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
* Set the browser's sock5 proxy to 127.0.0.1:1080
![image](qtrun.jpg)
### Install the client
* 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.
##### Forward sock5
```
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -sock5 1
```
* Then you can start communicating with the local: 4455 port, the data is automatically forwarded to the remote, as you connect to www.yourserver.com:4455.
##### Forward tcp
```
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
```
##### Forward udp
```
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -t www.yourserver.com:4455
```
# Use Docker
server:
```
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
```
# Test
Test the acceleration effect of pingtunnel. The server is located in aws Korea and the client is located in mainland China.
@ -63,16 +80,6 @@ cmd: https://github.com/esrrhs/pingtunnel/releases
QT GUI: https://github.com/esrrhs/pingtunnel-qt
# Docker
server:
```
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
```
# Stargazers over time
[![Stargazers over time](https://starchart.cc/esrrhs/pingtunnel.svg)](https://starchart.cc/esrrhs/pingtunnel)

BIN
qtrun.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB