Skip to the content.

Pingtunnel

codecov

Pingtunnel is a network tool that tunnels TCP/UDP/SOCKS5 traffic over ICMP Echo (Ping) packets to bypass strict network firewalls or throttled TCP/UDP traffic.

⚠️ Note: This tool is strictly intended for study and research purposes. Do not use it for any illegal purpose.

image


🌟 Features


πŸš€ Quick Start

Sample files ship with the repository. Just fill in your server IP and a strong password:

1. Server config (config-server.json)

{
  "type": "server",
  "password": "YOUR_STRONG_PASSWORD_HERE",
  "encrypt": "chacha20",
  "icmp_listen": "0.0.0.0"
}

Start the server (requires root / administrator privileges):

sudo ./pingtunnel config-server.json
# or: sudo ./pingtunnel -c config-server.json

2. Client config (SOCKS5 proxy mode, config-client-socks5.json)

{
  "type": "client",
  "listen": "127.0.0.1:1080",
  "server": "YOUR_SERVER_IP",
  "socks5": true,
  "password": "YOUR_STRONG_PASSWORD_HERE",
  "encrypt": "chacha20"
}

Start the client:

./pingtunnel config-client-socks5.json
# or: ./pingtunnel -c config-client-socks5.json

Then set your browser or system proxy to SOCKS5 127.0.0.1:1080.


Option 2: Command line (CLI)

1. Start the server

Run on a machine with a public IP:

sudo ./pingtunnel -type server -password YOUR_STRONG_PASSWORD_HERE

(Optional) Disable the Linux kernel’s default ICMP echo replies to avoid interference:

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

2. Start the client


🐳 Docker

Run the server

docker run --name pingtunnel-server -d \
  --restart=always \
  --privileged \
  --network host \
  esrrhs/pingtunnel ./pingtunnel -type server -password YOUR_STRONG_PASSWORD_HERE

Run with a mounted config file

docker run --name pingtunnel-server -d \
  --restart=always \
  --privileged \
  --network host \
  -v /etc/pingtunnel/server.json:/app/server.json:ro \
  esrrhs/pingtunnel ./pingtunnel /app/server.json

πŸ“– Detailed Usage and Tuning Guide

For more advanced options and topologies (server-side secondary proxy, port forwarding, SOCKS5 authentication, flow control and congestion tuning), see: πŸ‘‰ USAGE.md - Pingtunnel Usage and Configuration Guide