Giter VIP home page Giter VIP logo

portmap's Introduction

Golang内网端口映射实现

Rust实现参考:https://github.com/pysrc/breaknet

bilibili地址:https://www.bilibili.com/video/BV1TD4y1d7s4/

原理示例

配置说明

json配置文件中含"-"的为非必配字段

{
    "server": {
        "key": "helloworld", // 客户端与服务端必须对应,且用于数据加密
        "port": 8808, // 服务端控制端口
        "-limit-port": [ // 留给客户端选择的端口范围
            9100,
            9110
        ]
    },
    "client": {
        "key": "helloworld", // 客户端与服务端必须对应,且用于数据加密
        "server": "127.0.0.1:8808", // 服务端IP与端口
        "map": [ // 内网映射到服务端的规则
            {
                "inner": "127.0.0.1:6379", // 内网地址
                "outer": 9100 // 映射到服务端的端口
            },
            {
                "inner": "127.0.0.1:6379",
                "outer": 9101
            }
        ]
    }
}

portmap's People

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.