pangoliner

1.5.2 • Public • Published

pangoliner

介绍

pangoliner is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. As of now, it supports tcp & udp, as well as http and https protocols, where requests can be forwarded to internal services by domain name.

软件架构

proxyServer: socket.io server端 proxyClient: socket.io client端 local server

安装教程

  1. npm install pangoliner

使用说明

  1. const { ActiveServer, ClientServer } = require('pangoliner');
    (new ActiveServer({port: 27})).start();
    
    const client = new ClientServer({
        host: '127.0.0.1',
        port: 27,
        binds: {
            wall: {
                local_port: 8080,
                remote_port: 10004
            },
            www: {
                local_port: 8090,
                remote_port: 9080
            },//本地服务名=>端口映射
            sock5: {
                local_port: 1081,
                remote_port: 1091
            }
        }
    });
    
    client.init();
    
    setTimeout(function() {
        client.removeBinds(['www']);
        client.addBinds({hello: {
            local_port: 8081,
            remote_port: 9081}});
        }, 5000);
    

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

特技

  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/

启动服务端

  1. 开启服务端 usage: pangoliner -s -p 29 Arguments: -s or --server run as a server -p or --port the port to be listened

  2. 开启客户端 usage: pangoliner -c -h 10.9.2.233 -p 29 -b www:80:8080,ftp:21:21 Arguments: -h or --host run as a server -p or --port the port to be listened -b or --binds bind the local ports to the remote ports

带加密:

服务端命令:pangoliner -s -p 8080 -e aes-128-cbc -k 751f621ea5c8f930 -iv 2624750004598718

客户端命令: pangoliner -c -h 127.0.0.1 -p 8080 -b www:8081:8082 -e aes-128-cbc -k 751f621ea5c8f930 -iv 2624750004598718

Package Sidebar

Install

npm i pangoliner

Weekly Downloads

0

Version

1.5.2

License

ISC

Unpacked Size

32.9 kB

Total Files

14

Last publish

Collaborators

  • jack2006