Git Product home page Git Product logo

goflyway's Introduction

goflyway, HTTP tunnel in Go

goflyway is a tunnel proxy helping you fly across the wall. It is based entirely on HTTP protocol without any other 3rd party libraries.

δΈ­ζ–‡

Build & Run

Download the binary from releases, on your VPS, launch the server by:

./goflyway -k=KEY

where KEY is the password, then at local run the client to connect:

./goflyway -up=VPS_IP:8100 -k=KEY

Set your Internet proxy to 127.0.0.1:8100 (HTTP or SOCKS5 protocol) and enjoy.

Build from source

Get the lastest release of golang and setup a correct GOPATH, then:

go get -u github.com/coyove/goflyway/cmd/goflyway
cd $GOPATH/bin
./goflyway -k=KEY

Use a docker image

If you want to do it through Docker, run:

make -f docker.Makefile clean build

Docker image can be built with:

make build_image

Key

KEY in goflyway is merely a password, but if you are not using the same one (intentional or mistyping) server uses, you get banned.

Once on the blacklist, all requests you sent will be discarded and there is no auto discharge, you have to either manually restart the server and try again (check your key first), or click "Unlock Me" in the goflyway console (again, please check your key).

Console

There is a simple web console for client built inside goflyway: http://127.0.0.1:8100/?goflyway-console.

UDP

We have an experimental SOCKS5 UDP relay, turn it on (both at client and server):

./goflyway YOUR_OTHER_COMMANDS -u 8731

note that the listening port (8731 in this example) should be identical at both sides.

goflyway (only) uses TCP to relay UDP, which is bound to be slow. Use the flag -udp-tcp N and increase N progressively (default 1) to tweak the performance.

UDP relay is only tested under a limited number of programs (Skype, Discord, etc.) using SocksCap64, problem reports are welcome. (BTW, dnscrypt is not working)

Reverse proxy

The goflyway server is actually an HTTP server with special proxy functions, so you can indeed use it as a normal HTTP server without problems. Just pass -proxy-pass http://xxx.xxx.xxx.xxx:xx to the server and it will act as a reverse proxy.

     +---------+                          +-----------------+
     | browser |-.                      .-| your web server |
     +---------+  \    +----------+    /  +-----------------+
                   }==>| goflyway |==={   
+--------------+  /    +----------+    \  +----------------+
| proxy client |-'                      '-| GFWed websites |
+--------------+                          +----------------+

Speed

When comes to speed, goflyway is nearly identical to shadowsocks. But HTTP has (quite large) overheads and goflyway will hardly be faster than those solutions running on their own protocols. (If your ISP deploys QoS, maybe goflyway gets some kinda faster.)

However HTTP is much much easier to write and debug, I think this trade-off is absolutely acceptable. If you need more speed, try KCPTUN, BBR, ServerSpeeder...

Android

Currently there is no client on Android, here is a workaround:

  1. Install Termux and launch it
  2. pkg install golang
  3. go run main.go -k=KEY -up=VPS_IP:8100
  4. Connect to your WIFI and set its proxy to 127.0.0.1:8100

Works on my XZP Android 7.0

goflyway's People

Contributors

coyove avatar ali5h avatar seemethere avatar ishanray avatar

Watchers

James Cloos avatar  avatar

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.