An open API service indexing awesome lists of open source software.

https://github.com/leecjson/damproxy

A reverse proxy tool which can let WAN server's data flows to LAN server. support TCP, HTTP, SSH or other protocols based on TCP.
https://github.com/leecjson/damproxy

Last synced: 12 months ago
JSON representation

A reverse proxy tool which can let WAN server's data flows to LAN server. support TCP, HTTP, SSH or other protocols based on TCP.

Awesome Lists containing this project

README

          

可以将公网(WAN)主机流量转到内网(LAN)主机的反向代理工具库,实现了内网穿透。采用多链接+配对的方式实现,支持TCP、HTTP、SSH协议等。

A reverse proxy tool which can let WAN server's data flows to LAN server. support TCP, HTTP, SSH or others protocol based on TCP.

# Getting started
Prepare a WAN server and a LAN server. Follow the steps on both of servers.
1. Download and install Node.js(>=12.0.0).
2. Install damproxy
```bash
$ npm i damproxy -g
```

# WAN Server
Simple usage, forward data from port 80 and 443 to LAN server:
```bash
$ damproxy listen --forward-ports 80 443
```
Full options:
```bash
$ damproxy listen --host 0.0.0.0 --port 8991 --pwd mypassword --forward-ports 80@17080 443@17443
```
### Options
#### --host
Host for LAN server connection, default 0.0.0.0.
#### --port
Port for LAN server connection, default 8991.
#### --pwd
Set the password to identify LAN server. Should less than 32 characters.
#### --forward-ports
Specify the port that will receive data from real client, then it will forward to the LAN server via the secondary port as outbound port. 80@17080 means receive data from 80 and forward to LAN server that output via 17080. Defaults the secondary port will automatically provided. May specify it in whitelist situation.


# LAN Server
Simple usage, connect to WAN server
```bash
$ damproxy connect --host x.x.x.x --forward-ports 80
```
Full options:
```bash
$ damproxy connect --host x.x.x.x --port 8991 --pwd mypassword --forward-ports 80 443@20443 22@192.168.0.102:22
```
### Options
#### --host
WAN server's host to connect.
#### --port
WAN server's port to connect, default 8991.
#### --pwd
Send the password to WAN server. Should less than 32 characters.
#### --forward-ports
Whitelist of forwarding port and specify a redirect address. It formed by A@B:C which means allowing data from WAN server's port A and send it to B:C. 80 equivalent to 80@127.0.0.1:80 and 80:8080 equivalent to 80@127.0.0.1:8080.