natproxy
1.0.0
Natproxy is an intranet penetration tool that can connect a personal computer or server in a LAN to the public network, and supports TCP/UDP traffic forwarding and upper-layer TCP protocols, such as SSH, HTTP/HTTPS, etc.
The main branch is a custom protocol
proto3 protocol needs to switch proto3 branch
Download and build
git clone https://github.com/PonKing66/natproxy
cd natproxy
mvn clean package -Dmaven.test.skip=true
Run steps
Detailed configuration
Proxy client configuration
server :
host : 127.0.0.1 # 代理服务器 IP
port : 20001 # 代理服务器端口
client :
key : 721b2e485683bd87c32f3c208f787a626c7397a759146a93be30e15ad3193084 # 认证客户端 key
Proxy server configuration
server :
port : 20001 # 代理服务器端口
keys :
- 721b2e485683bd87c32f3c208f787a626c7397a759146a93be30e15ad3193084 # 合法登录客户端 Key,与代理客户端配置中的相同
proxy :
- host : 192.168.31.96 # 目标服务器 IP
intranetPort : 22 # 被代理端口(目标服务器端口)
extranetPort : 22222 # 代理服务器暴露端口(用户访问端口)
type : tcp # 代理转发协议
key : 721b2e485683bd87c32f3c208f787a626c7397a759146a93be30e15ad3193084 # 指定开启代理客户端
- host : 192.168.31.96
intranetPort : 3306
extranetPort : 33006
type : tcp
key : 721b2e485683bd87c32f3c208f787a626c7397a759146a93be30e15ad3193084
- host : 192.168.31.96
intranetPort : 44444
extranetPort : 55555
type : udp
key : 721b2e485683bd87c32f3c208f787a626c7397a759146a93be30e15ad3193084
Special thanks to p2p-nat for the reference and inspiration