0.0.6 • Published 8 months ago

portmp v0.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

portmp -> port mapping

npm version

Introduction

  • port mapping
  • A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
  • Support TCP & UDP.
  • local port forward, remote port forward.

Usage

Install the plugin with NPM:

$ npm install -g portmp
then
$ portmp -h

As Server

$ portmp server
will gen a server.json in your `pwd`

As Client

$ portmp client
will gen a client.json in your `pwd`

Config File:

// server.json
{
  "port": 7666,
  "validKeys": [
    "userkey1",
    "userkey2"
  ]
}
// client.json
{
  "address": "127.0.0.1",
  "port": 7666,
  "authKey": "userkey1",
  "forwardInfos": [
    {
      "note": "for test",
      "isLocalForward": true,
      "type": "tcp",
      "targetAddr": "127.0.0.1",
      "targetPort": 46464,
      "fromPort": 56565
    },
    {
      "note": "for test",
      "isLocalForward": false,
      "type": "udp",
      "targetAddr": "127.0.0.1",
      "targetPort": 46464,
      "fromPort": 56565
    }
  ]
}
0.0.6

8 months ago

0.0.5

8 months ago

0.0.3

8 months ago

0.0.1

8 months ago