fix some markdown issues in the readme

To improve coverage
This commit is contained in:
phanirithvij 2020-12-23 07:41:06 +05:30
parent 6fc899c759
commit 49d1af71b4
2 changed files with 85 additions and 43 deletions

View File

@ -7,66 +7,86 @@
[<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)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a200bca59d1b4ca7a9c2cdb564508b47)](https://www.codacy.com/manual/esrrhs/pingtunnel?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=esrrhs/pingtunnel&amp;utm_campaign=Badge_Grade)
[![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)
pingtunnel是把tcp/udp/sock5流量伪装成icmp流量进行转发的工具
pingtunnel 是把 tcp/udp/sock5 流量伪装成 icmp 流量进行转发的工具
[Readme EN](./README_EN.md)
**注意:本工具只是用作学习研究,请勿用于非法用途!!!**
### 注意:本工具只是用作学习研究,请勿用于非法用途!!!
![image](network.jpg)
# 使用
## 使用
### 安装服务端
* 首先准备好一个具有公网ip的服务器假定域名或者公网ip是www.yourserver.com
* 从[releases](https://github.com/esrrhs/pingtunnel/releases)下载对应的安装包如pingtunnel_linux64.zip然后解压以**root**权限执行
- 首先准备好一个具有公网 ip 的服务器,假定域名或者公网 ip 是www.yourserver.com
- 从[releases](https://github.com/esrrhs/pingtunnel/releases)下载对应的安装包,如 pingtunnel_linux64.zip然后解压以**root**权限执行
```
sudo wget (最新release的下载链接)
sudo unzip pingtunnel_linux64.zip
sudo ./pingtunnel -type server
```
* (可选)关闭系统默认的ping
- (可选)关闭系统默认的 ping
```
echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
```
### 安装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如果连不上网出现socks version not supported错误日志说明浏览器的代理不是socks5代理。如果提示非安全连接说明dns有问题勾上浏览器的【使用socks5代理DNS查询】
### 安装 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如果连不上网出现 socks version not supported 错误日志,说明浏览器的代理不是 socks5 代理。如果提示非安全连接,说明 dns 有问题,勾上浏览器的【使用 socks5 代理 DNS 查询】
![image](qtrun.jpg)
### 安装客户端(高玩推荐)
* 从[releases](https://github.com/esrrhs/pingtunnel/releases)下载对应的安装包如pingtunnel_windows64.zip解压
* 然后用**管理员权限**运行,不同的转发功能所对应的命令如下
* 如果看到有ping pong的log说明连接正常
##### 转发sock5
- 从[releases](https://github.com/esrrhs/pingtunnel/releases)下载对应的安装包,如 pingtunnel_windows64.zip解压
- 然后用**管理员权限**运行,不同的转发功能所对应的命令如下
- 如果看到有 ping pong 的 log说明连接正常
#### 转发 sock5
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -sock5 1
```
##### 转发tcp
#### 转发 tcp
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
```
##### 转发udp
#### 转发 udp
```
pingtunnel.exe -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455
```
### 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
```
# 效果
下载centos镜像 [centos mirror](http://mirrors.ocf.berkeley.edu/centos/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-dvd1.iso),对比如下
| | wget | ss | kcp | pingtunnel |
|--------------|----------|------------|------------|------------|
| 阿里云 | 26.6KB/s | 31.8KB/s | 606KB/s |5.64MB/s|
## 效果
下载 centos 镜像 [centos mirror](http://mirrors.ocf.berkeley.edu/centos/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-dvd1.iso),对比如下
| | wget | ss | kcp | pingtunnel |
| ------ | -------- | -------- | ------- | ---------- |
| 阿里云 | 26.6KB/s | 31.8KB/s | 606KB/s | 5.64MB/s |

View File

@ -7,62 +7,84 @@
[<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)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a200bca59d1b4ca7a9c2cdb564508b47)](https://www.codacy.com/manual/esrrhs/pingtunnel?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=esrrhs/pingtunnel&amp;utm_campaign=Badge_Grade)
[![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)
Pingtunnel is a tool that advertises tcp/udp/sock5 traffic as icmp traffic for forwarding.
> Note: This tool is only to be used for study and research, do not use it for illegal purposes.
![image](network.jpg)
# Use
## Usage
### 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 with **root** privileges
- 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
```
sudo wget (link of latest release)
sudo unzip pingtunnel_linux64.zip
sudo ./pingtunnel -type server
```
* (Optional) Disable system default ping
- (Optional) Disable system default ping
```
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
```
### 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, 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.
- 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, 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.
![image](qtrun.jpg)
### Install the client (recommended for high play)
* 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
##### Forward sock5
- 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
#### Forward sock5
```
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -sock5 1
```
##### Forward tcp
#### Forward tcp
```
pingtunnel.exe -type client -l: 4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
```
##### Forward udp
#### 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
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)
| | wget | ss | kcp | pingtunnel |
|--------------|----------|------------|------------|------------|
| AlibabaCloud | 26.6KB/s | 31.8KB/s | 606KB/s |5.64MB/s|
## Test
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)
| | wget | ss | kcp | pingtunnel |
| ------------ | -------- | -------- | ------- | ---------- |
| AlibabaCloud | 26.6KB/s | 31.8KB/s | 606KB/s | 5.64MB/s |