Giter Site home page Giter Site logo

goflyway's Introduction

goflyway v2 - a local port forwarder built on HTTP

master is the active develop branch and containing v2 code, for the stable v1 release (though it was once called v2.0), please refer to v1.0 branch.

goflyway v2 is a special tool to forward local ports to a remote server securly, just like ssh -L.

goflyway uses pure HTTP POST requests to relay TCP connections. There is no CONNECT involved nor needed because goflyway is designed mainly for those people who are behind a CONNECT-less HTTP proxy or want to accelerate connections through static CDNs.

However pure HTTP requesting is definitely a waste of bandwidth if you already have a better network environment, so use -w to turn on WebSocket relay, or -K to turn on KCP relay if possible.

Usage

Forward localhost:1080 to server:1080 through server:80

    Server: ./goflyway :80
    Client: ./goflyway -L 1080::1080 server:80 -p password

Forward localhost:1080 to server2:1080 through server:80 using WebSocket

    Server: ./goflyway :80
    Client: ./goflyway -w -L 1080:server2:1080 server:80 -p password

Dynamically forward localhost:1080 to server:80

    Server: ./goflyway :80
    Client: ./goflyway -D 1080 server:80 -p password

HTTP reverse proxy or static file server on the same port:

    ./goflyway :80 -P http://127.0.0.1:8080 
    ./goflyway :80 -P /var/www/html

Write Buffer

In HTTP mode when server received some data it can't just send them to the client directly because HTTP is not bi-directional, instead the server must wait until the client requests them, which means these data will be stored in memory for some time.

You can use -W bytes to limit the maximum bytes a server can buffer (for each connection), by default it is 1048576 (1M). If the buffer reaches the limit, the following bytes will be blocked until the buffer has free space for them.

goflyway's People

Contributors

ali5h avatar coyove avatar ishanray avatar jostyee avatar seemethere avatar

Watchers

 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.