Coder Social home page Coder Social logo

haixuxu / go-gwk Goto Github PK

View Code? Open in Web Editor NEW
25.0 1.0 2.0 80 KB

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

License: MIT License

Go 90.85% Shell 9.15%
expose frp gwk nat ngrok proxy reverse-proxy tunnel

go-gwk's Introduction

gwk

Gwk is a tool that helps you expose your local servers or services to the internet, even in a private network. It supports both TCP and subdomain modes.

Download

Download

build

bash package.sh

usage

serverHost default is gank.75cos.com

# example 1 , detault dispatch to 127.0.0.1:8080
gwk

client more example

# example 2
gwk  --port 8080
# example 3
gwk  --subdomain testabc001 --port 8000
# example 4
gwk  -c client.json

develop

  1. generate root CA
bash ./scripts/gen_rootca.sh
  1. generate domain cert
bash ./scripts/gen_certbyca.sh
  1. move certs to etc directory

client

go run ./bin/gwk/main.go  -c etc/client.json

client.json

{
  "serverHost": "gank007.com",
  "serverPort": 4443,
  "tunnels": {
    "tcp001": {
      "protocol": "tcp",
      "localPort": 5000,
      "remotePort": 7200
    },
    "tcp002": {
      "protocol": "tcp",
      "localPort": 5000,
      "remotePort": 7500
    },
    "webapp02": {
      "protocol": "web",
      "localPort": 4900,
      "subdomain": "app02"
    },
    "webappmob": {
      "protocol": "web",
      "localPort": 9000,
      "subdomain": "mob"
    }
  }
}

setup a gwk server

go run ./bin/gwkd/main.go  -c etc/server.json

server.json

{
  "serverHost": "gank007.com",
  "serverPort": 4443,
  "httpAddr": 8080,
  "httpsAddr": 8043,
  "tlsCA":"./scripts/certs/rootCA.crt",
  "tlsCrt":"./scripts/certs/gank007.com/my.crt",
  "tlsKey":"./scripts/certs/gank007.com/my.key.pem"
}

go-gwk's People

Contributors

haixuxu avatar

Stargazers

 avatar Roc-zhou avatar  avatar Chuck avatar Bogdan U avatar iuu avatar Flex avatar  avatar  avatar aLong avatar 云帆 avatar  avatar  avatar 二丫讲梵 avatar qizhenghai avatar ... avatar Urk Bio avatar A.Lick avatar ECH2O avatar 王金平 avatar Heeler-Deer avatar stlomib avatar  avatar  avatar 咸鱼 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.