From 69273a94ccc1a91a04dc043ccef108d806ef4912 Mon Sep 17 00:00:00 2001 From: zhao xin Date: Tue, 5 Nov 2019 11:07:28 +0800 Subject: [PATCH 01/13] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea3e73e..0319bb3 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ pingtunnel.exe -type client -l :4455 -s www.yourserver.com -sock5 1 # Download cmd: https://github.com/esrrhs/pingtunnel/releases -qt: https://github.com/esrrhs/pingtunnel-qt +QT GUI: https://github.com/esrrhs/pingtunnel-qt # Usage 通过伪造ping,把tcp/udp/sock5流量通过远程服务器转发到目的服务器上。用于突破某些运营商封锁TCP/UDP流量。 @@ -121,4 +121,4 @@ qt: https://github.com/esrrhs/pingtunnel-qt Set the forwarding filter in the sock5 mode. The default is full forwarding. For example, setting the CN indicates that the Chinese address is not forwarded. -s5ftfile sock5模式转发过滤的数据文件,默认读取当前目录的GeoLite2-Country.mmdb - The data file in sock5 filter mode, the default reading of the current directory GeoLite2-Country.mmdb \ No newline at end of file + The data file in sock5 filter mode, the default reading of the current directory GeoLite2-Country.mmdb From 1b02df4a4d47f89b61f3020f9385bd3e77da9493 Mon Sep 17 00:00:00 2001 From: zhao xin Date: Tue, 5 Nov 2019 21:09:36 +0800 Subject: [PATCH 02/13] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0319bb3..92e0eec 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Pingtunnel pingtunnel是把tcp/udp/sock5流量伪装成icmp流量进行转发的工具。用于突破网络封锁,或是绕过WIFI网络的登陆验证,或是在某些网络加快网络传输速度。 + +**注意:本工具只是用作学习研究,请勿用于非法用途**
Pingtunnel is a tool that advertises tcp/udp/sock5 traffic as icmp traffic for forwarding. Used to break through the network blockade, or to bypass the WIFI network login verification, or speed up network transmission speed on some networks. ![image](network.jpg) From 3050373508bdeb3d34fb7a82bb5032db2896c468 Mon Sep 17 00:00:00 2001 From: zhao xin Date: Tue, 5 Nov 2019 21:15:41 +0800 Subject: [PATCH 03/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92e0eec..f627053 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Pingtunnel pingtunnel是把tcp/udp/sock5流量伪装成icmp流量进行转发的工具。用于突破网络封锁,或是绕过WIFI网络的登陆验证,或是在某些网络加快网络传输速度。 -**注意:本工具只是用作学习研究,请勿用于非法用途** +**注意:本工具只是用作学习研究,请勿用于非法用途!**
Pingtunnel is a tool that advertises tcp/udp/sock5 traffic as icmp traffic for forwarding. Used to break through the network blockade, or to bypass the WIFI network login verification, or speed up network transmission speed on some networks. ![image](network.jpg) From 8651c222c4dbb66dc9f509e4fd91a4a309c9036e Mon Sep 17 00:00:00 2001 From: esrrhs Date: Tue, 12 Nov 2019 17:11:30 +0800 Subject: [PATCH 04/13] add --- main.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/main.go b/main.go index 53aece1..28f6143 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "errors" "flag" "fmt" "github.com/esrrhs/go-engine/src/geoip" @@ -100,6 +101,23 @@ Usage: func main() { + defer func() { + if r := recover(); r != nil { + var err error + switch x := r.(type) { + case string: + err = errors.New(x) + case error: + err = x + default: + err = errors.New("Unknown panic") + } + if err != nil { + loggo.Error("crash %s", err) + } + } + }() + t := flag.String("type", "", "client or server") listen := flag.String("l", "", "listen addr") target := flag.String("t", "", "target addr") From 0b0a9cdc6a31efa56e688635970c89def918739f Mon Sep 17 00:00:00 2001 From: esrrhs Date: Wed, 13 Nov 2019 16:54:55 +0800 Subject: [PATCH 05/13] add --- main.go | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/main.go b/main.go index 28f6143..742eccc 100644 --- a/main.go +++ b/main.go @@ -1,9 +1,9 @@ package main import ( - "errors" "flag" "fmt" + "github.com/esrrhs/go-engine/src/common" "github.com/esrrhs/go-engine/src/geoip" "github.com/esrrhs/go-engine/src/loggo" "github.com/esrrhs/go-engine/src/pingtunnel" @@ -101,22 +101,7 @@ Usage: func main() { - defer func() { - if r := recover(); r != nil { - var err error - switch x := r.(type) { - case string: - err = errors.New(x) - case error: - err = x - default: - err = errors.New("Unknown panic") - } - if err != nil { - loggo.Error("crash %s", err) - } - } - }() + defer common.CrashLog() t := flag.String("type", "", "client or server") listen := flag.String("l", "", "listen addr") From c2ff8fa632782ee6fc6fa7bc051d6a52b24fd33a Mon Sep 17 00:00:00 2001 From: zhao xin Date: Thu, 14 Nov 2019 12:08:18 +0800 Subject: [PATCH 06/13] Create go.yml --- .github/workflows/go.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..14bd4f2 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,28 @@ +name: Go +on: [push] +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: go build -v . From 4986c989e3146192937609a5112de8d158d383f8 Mon Sep 17 00:00:00 2001 From: zhao xin Date: Thu, 5 Dec 2019 14:45:26 +0800 Subject: [PATCH 07/13] Set theme jekyll-theme-hacker --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..fc24e7a --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-hacker \ No newline at end of file From d11d7c4b871884a9e635c100b48c7aa111828c12 Mon Sep 17 00:00:00 2001 From: zhao xin Date: Fri, 27 Dec 2019 10:45:40 +0800 Subject: [PATCH 08/13] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f627053..6834c3a 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ cmd: https://github.com/esrrhs/pingtunnel/releases QT GUI: https://github.com/esrrhs/pingtunnel-qt +# Stargazers over time + +[![Stargazers over time](https://starchart.cc/esrrhs/pingtunnel.svg)](https://starchart.cc/esrrhs/pingtunnel) + # Usage 通过伪造ping,把tcp/udp/sock5流量通过远程服务器转发到目的服务器上。用于突破某些运营商封锁TCP/UDP流量。 By forging ping, the tcp/udp/sock5 traffic is forwarded to the destination server through the remote server. Used to break certain operators to block TCP/UDP traffic. From 0d61b60eaa7578427ea79c8c35b84417ea3e1a6c Mon Sep 17 00:00:00 2001 From: zhao xin Date: Fri, 27 Dec 2019 10:51:20 +0800 Subject: [PATCH 09/13] Update go.yml --- .github/workflows/go.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 14bd4f2..2bea31e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,4 +25,6 @@ jobs: fi - name: Build - run: go build -v . + run: + go build -v . + ./pingtunnel From 1a994d448a37039e8d0145806cb39b2b3b86496e Mon Sep 17 00:00:00 2001 From: zhao xin Date: Fri, 27 Dec 2019 10:54:11 +0800 Subject: [PATCH 10/13] Update go.yml --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2bea31e..cdc15b8 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,6 +25,6 @@ jobs: fi - name: Build - run: + run: | go build -v . ./pingtunnel From 9e62422db6d7777ba181095c4c185ce3ddf13432 Mon Sep 17 00:00:00 2001 From: zhao xin Date: Fri, 27 Dec 2019 11:03:03 +0800 Subject: [PATCH 11/13] Create Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3fa58ff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM golang:onbuild +EXPOSE 8080 From 371dd4baa00203f9e06674e3d76370e32ef78cec Mon Sep 17 00:00:00 2001 From: zhao xin Date: Fri, 27 Dec 2019 11:37:14 +0800 Subject: [PATCH 12/13] Update Dockerfile --- Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3fa58ff..9e1ab87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,9 @@ -FROM golang:onbuild -EXPOSE 8080 +FROM golang AS build-env + +RUN go get -u github.com/esrrhs/pingtunnel +RUN go get -u github.com/esrrhs/pingtunnel/... +RUN go install github.com/esrrhs/pingtunnel + +FROM debian +COPY --from=build-env /go/bin/pingtunnel . +WORKDIR ./ From fa445c7d89e5c5c4db395683ed22d31388adcf4d Mon Sep 17 00:00:00 2001 From: zhao xin Date: Fri, 27 Dec 2019 12:24:58 +0800 Subject: [PATCH 13/13] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 6834c3a..9f67411 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,17 @@ 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)