Skip to content

This tool bypass firewall and filtering that send TCP/UDP traffic over ICMP.

Notifications You must be signed in to change notification settings

gopy-art/proxy2icmp

Repository files navigation

proxy2icmp

GitHub go.mod Go version of a Go module GitHub go.mod Go version of a Go module

this tool bypass firewall and filttering that send TCP/UDP traffic over ICMP.

How it`s work

run a server app for any client app with any(tcp\udp\socks5) protocol on client side.
notice that when use tcp or udp protocols , packets must be forward to target server(local or remote) but it not need for socks5.

image

Quick start

Build Static

  • cd to cmd/proxy2icmp in root directory of project and use go command to compile app as static libs
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o proxy2icmp -ldflags="-extldflags=-static"

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
sudo ./proxy2icmp -type server
  • (Optional) Disable system default ping
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

Install the client

  • Forward socks5
sudo ./proxy2icmp -type client -l :4455 -s www.yourserver.com -sock5 1
  • Forward tcp
sudo ./proxy2icmp -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455 -tcp 1
  • Forward udp
sudo ./proxy2icmp -type client -l :4455 -s www.yourserver.com -t www.yourserver.com:4455

Encryption

to secure messages between client and server you can enable encrytion with -encryption flage.default is off. notice when you want encryption, you must enable it on both server and client.

  • server:
sudo ./proxy2icmp -type server -encryption
  • client:
sudo ./proxy2icmp -type client -encryption -l :4455 -s 192.168.10.123 -t 192.168.10.16:8181 -tcp 1

Example

client:

  • socks5:
sudo ./proxy2icmp -type client -l 0.0.0.0:1080 -s 192.168.10.123 -sock5 1
  • tcp:
sudo ./proxy2icmp -type client -l :4455 -s 192.168.10.123 -t 192.168.10.16:8181 -tcp 1
  • udp:
sudo ./proxy2icmp -type client -l :4455 -s 192.168.10.123 -t 192.168.10.16:1194

server:

sudo ./proxy2icmp -type server

Service

run this app as a service

server side:

./service.sh server

sudo ./service.sh server

client side:

./service.sh client <listenIp> <serverIp> <port> <protocol>

  • socks5:
sudo ./service.sh client 192.168.10.123 192.168.10.16 8443 sock5
  • tcp:
sudo ./service.sh client 192.168.10.123 192.168.10.16 8443 tcp
  • udp:
sudo ./service.sh client 192.168.10.123 192.168.10.16 8443 udp

Server service log

you can see service logs with this👇 command.

sudo journalctl -xefu p2iServer.service

Client service log

you can see service logs with this👇 command.

sudo journalctl -xefu p2iClient.service

Logger

chose write log on stdout or file or devNull.
use -log flage to do this.
stdout(default) = 0 file = 1 devNull = 2

  • server:
sudo ./proxy2icmp -type server -log 2
  • client:
sudo ./proxy2icmp -type client -encryption -l :4455 -s 192.168.10.123 -t 192.168.10.16:8181 -tcp 1 -log 1

(Optional) Disable system default ping

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

Cross compile

after you installing go , you can cross compile this tool to any os and any architecture that go supported:
you can build exe file for linux with this👇 go command statically linked shared librarys.
windows:

  • 386:
GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o proxy2icmp_windows-386.exe -ldflags="-extldflags=-static"
  • arm64:
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o proxy2icmp_windows-amd64.exe -ldflags="-extldflags=-static"

linux:

  • 386:
GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -o proxy2icmp_linux-386 -ldflags="-extldflags=-static"
  • amd64:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o proxy2icmp_linux-amd64 -ldflags="-extldflags=-static"
  • arm64:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o proxy2icmp_linux-arm64 -ldflags="-extldflags=-static"

OR

make build-all

About

This tool bypass firewall and filtering that send TCP/UDP traffic over ICMP.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published