Giter Club home page Giter Club logo

moonlight's Introduction

moonlight

moonlight is a reverse port forwarding tool written by python. You can run several clients connected to same server in the intranet network and the server can balance requests between these clients.

intranet network              public network host
                               ----------------
intranet01                     |              |
    client1  <-------------->  |              |
    client2  <-------------->  |    server    |
                               | 1.1.1.1:9001 |    
intranet02                     |              |
    client3  <-------------->  |              |
                               ----------------

install

python -m pip install moonlightpy

run

server config.yaml

"addr": "0.0.0.0"
"port": 9001
"rules": [
  "intranet01,192.168.0.134,22,0.0.0.0,13422",
  "intranet02,192.168.0.132,22,0.0.0.0,13222"
]

server & clients

# run server on one public network host (e.g. 1.1.1.1)
 python -m moonlightpy server ./config.yaml
 
 # run clients on some intranet hosts 
 python -m moonlightpy client intranet01 1.1.1.1 9001

Now you can access the 192.168.0.134:22 from 1.1.1.1:13422 and 192.168.0.132:22 from 1.1.1.1:13222

moonlight's People

Contributors

xitongsys 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.