@jack2006/pangolin
Version:
pangolin 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.
66 lines (50 loc) • 1.97 kB
Markdown
# pangolin
#### 介绍
pangolin 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 pangolin
#### 使用说明
1. ```
const { ActiveServer, ClientServer } = require('pangolin');
(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](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)