Giter VIP home page Giter VIP logo

go-piping-tunnel's Introduction

piping-tunnel

CI

Tunneling over HTTP with Piping Server

Install for Windows

Download

Install for macOS

brew install nwtgck/piping-tunnel/piping-tunnel

Install for Ubuntu

wget https://github.com/nwtgck/go-piping-tunnel/releases/download/v0.10.1/piping-tunnel-0.10.1-linux-amd64.deb
sudo dpkg -i piping-tunnel-0.10.1-linux-amd64.deb 

Get more executables in the releases.

Help

You can use $PIPING_SERVER env to set default Piping Server.

Tunneling from anywhere with Piping Server

Usage:
  piping-tunnel [flags]
  piping-tunnel [command]

Examples:

Normal:
  piping-tunnel server -p 22 aaa bbb
  piping-tunnel client -p 1022 aaa bbb

Short:
  piping-tunnel server -p 22 mypath
  piping-tunnel client -p 1022 mypath

Multiplexing:
  piping-tunnel server -p 22 --yamux aaa bbb
  piping-tunnel client -p 1022 --yamux aaa bbb

SOCKS proxy like VPN:
  piping-tunnel socks --yamux aaa bbb
  piping-tunnel client -p 1080 --yamux aaa bbb

Environment variable:
  $PIPING_SERVER for default Piping Server


Available Commands:
  client      Run client-host
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  server      Run server-host
  socks       Run SOCKS server

Flags:
      --dns-server string         DNS server (e.g. 1.1.1.1:53)
  -H, --header stringArray        HTTP header
  -h, --help                      help for piping-tunnel
      --http-read-buf-size int    HTTP read-buffer size in bytes (default 4096)
      --http-write-buf-size int   HTTP write-buffer size in bytes (default 4096)
  -k, --insecure                  Allow insecure server connections when using SSL
      --progress                  Show progress (default true)
  -s, --server string             Piping Server URL (default "https://ppng.io")
      --verbose int               Verbose logging level
  -v, --version                   show version

Use "piping-tunnel [command] --help" for more information about a command.

The following help is for server-host.

Run server-host

Usage:
  piping-tunnel server [flags]

Flags:
      --cipher-type string   Cipher type: aes-ctr, openssl-aes-128-ctr, openssl-aes-256-ctr, openpgp  (default "aes-ctr")
      --cs-buf-size uint     Buffer size of client-to-server in bytes (default 4096)
  -h, --help                 help for server
      --host string          Target host (default "localhost")
      --pass string          Passphrase for encryption
      --pbkdf2 string        e.g. {"iter":100000,"hash":"sha256"}
      --pmux                 Multiplex connection by pmux (experimental)
      --pmux-config string   pmux config in JSON (experimental) (default "{\"hb\": true}")
  -p, --port int             TCP port of server host
  -c, --symmetric            Encrypt symmetrically
      --unix-socket string   Unix socket of server host
      --yamux                Multiplex connection by hashicorp/yamux

Global Flags:
      --dns-server string         DNS server (e.g. 1.1.1.1:53)
  -H, --header stringArray        HTTP header
      --http-read-buf-size int    HTTP read-buffer size in bytes (default 4096)
      --http-write-buf-size int   HTTP write-buffer size in bytes (default 4096)
  -k, --insecure                  Allow insecure server connections when using SSL
      --progress                  Show progress (default true)
  -s, --server string             Piping Server URL (default "https://ppng.io")
      --verbose int               Verbose logging level

The following help is for client-host.

Run client-host

Usage:
  piping-tunnel client [flags]

Flags:
      --cipher-type string   Cipher type: aes-ctr, openssl-aes-128-ctr, openssl-aes-256-ctr, openpgp  (default "aes-ctr")
  -h, --help                 help for client
      --pass string          Passphrase for encryption
      --pbkdf2 string        e.g. {"iter":100000,"hash":"sha256"}
      --pmux                 Multiplex connection by pmux (experimental)
      --pmux-config string   pmux config in JSON (experimental) (default "{\"hb\": true}")
  -p, --port int             TCP port of client host
      --sc-buf-size uint     Buffer size of server-to-client in bytes (default 4096)
  -c, --symmetric            Encrypt symmetrically
      --unix-socket string   Unix socket of client host
      --yamux                Multiplex connection by hashicorp/yamux

Global Flags:
      --dns-server string         DNS server (e.g. 1.1.1.1:53)
  -H, --header stringArray        HTTP header
      --http-read-buf-size int    HTTP read-buffer size in bytes (default 4096)
      --http-write-buf-size int   HTTP write-buffer size in bytes (default 4096)
  -k, --insecure                  Allow insecure server connections when using SSL
      --progress                  Show progress (default true)
  -s, --server string             Piping Server URL (default "https://ppng.io")
      --verbose int               Verbose logging level

The following help is for SOCKS proxy.

Run SOCKS server

Usage:
  piping-tunnel socks [flags]

Flags:
      --cipher-type string   Cipher type: aes-ctr, openssl-aes-128-ctr, openssl-aes-256-ctr, openpgp  (default "aes-ctr")
  -h, --help                 help for socks
      --pass string          Passphrase for encryption
      --pbkdf2 string        e.g. {"iter":100000,"hash":"sha256"}
      --pmux                 Multiplex connection by pmux (experimental)
      --pmux-config string   pmux config in JSON (experimental) (default "{\"hb\": true}")
  -c, --symmetric            Encrypt symmetrically
      --yamux                Multiplex connection by hashicorp/yamux

Global Flags:
      --dns-server string         DNS server (e.g. 1.1.1.1:53)
  -H, --header stringArray        HTTP header
      --http-read-buf-size int    HTTP read-buffer size in bytes (default 4096)
      --http-write-buf-size int   HTTP write-buffer size in bytes (default 4096)
  -k, --insecure                  Allow insecure server connections when using SSL
      --progress                  Show progress (default true)
  -s, --server string             Piping Server URL (default "https://ppng.io")
      --verbose int               Verbose logging level

References

The idea of tunneling over Piping Server was proposed by @Cryolite. Thanks!

Related work

go-piping-tunnel's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar nwtgck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-piping-tunnel's Issues

Dependabot can't parse your go.mod

Dependabot couldn't parse the go.mod found at /go.mod.

The error Dependabot encountered was:

go: writing go.mod cache: open /opt/go/gopath/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20180905080454-ebe1bf3edb33.mod597955619.tmp: no space left on device
go: writing go.mod cache: write /opt/go/gopath/pkg/mod/cache/download/golang.org/x/tools/@v/v0.0.0-20190114222345-bf090417da8b.mod207216516.tmp: no space left on device
go: writing go.mod cache: write /opt/go/gopath/pkg/mod/cache/download/honnef.co/go/tools/@v/v0.0.0-20190102054323-c2f93a96b099.mod965984740.tmp: no space left on device
go: writing go.mod cache: write /opt/go/gopath/pkg/mod/cache/download/golang.org/x/net/@v/v0.0.0-20181114220301-adae6a3d119a.mod509498098.tmp: no space left on device
go: writing go.mod cache: write /opt/go/gopath/pkg/mod/cache/download/dmitri.shuralyov.com/gpu/mtl/@v/v0.0.0-20190408044501-666a987793e9.mod135764476.tmp: no space left on device
go: failed to write version list: write /opt/go/gopath/pkg/mod/cache/download/golang.org/x/sync/@v/list171208825.tmp: no space left on device

View the update logs.

The arg "--progress" not work

[root@almalinux9-test ~]# ./piping-tunnel server --port 22 --yamux --insecure --progress false --server https://192.168.1.2 abcd 1234
Error: the number of paths should be one or two
the number of paths should be one or two[root@almalinux9-test ~]#

[ERR] yamux: Failed to read header: invalid content-type: text/html; charset=utf-8

If the server or client shutdown, the clienet or server will shutdown also, log show [ERR] yamux: Failed to read header: invalid content-type: text/html; charset=utf-8, it won't connect auto. So the go-piping-tunnel not suitable for long time running in backgroud. Please fix. Thanks.

# serer
piping-tunnel server --port 1234 --yamux --server https://piping.example.com mypaht1 mypaht2

# client
piping-tunnel client --port 1234 --yamux --server https://piping.example.com mypaht1 mypaht2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.