forked from ehang-io/nps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
193 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
|
||
|
||
[GitHub](https://github.com/cnlh/nps/) | ||
[开始使用](#docsify) | ||
[开始使用](#nps) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
# 获取用户真实ip | ||
# 说明 | ||
## 获取用户真实ip | ||
|
||
在域名代理模式中,可以通过request请求 header 中的 X-Forwarded-For 和 X-Real-IP 来获取用户真实 IP。 | ||
|
||
**本代理前会在每一个http(s)请求中添加了这两个 header。** | ||
|
||
# 热更新支持 | ||
## 热更新支持 | ||
对于绝大多数配置,在web管理中的修改将实时使用,无需重启客户端或者服务端 | ||
|
||
# 客户端地址显示 | ||
## 客户端地址显示 | ||
在web管理中将显示客户端的连接地址 | ||
|
||
# 流量统计 | ||
## 流量统计 | ||
可统计显示每个代理使用的流量,由于压缩和加密等原因,会和实际环境中的略有差异 | ||
|
||
# 当前客户端带宽 | ||
## 当前客户端带宽 | ||
可统计每个客户端当前的带宽,可能和实际有一定差异,仅供参考。 | ||
|
||
# 客户端与服务端版本对比 | ||
## 客户端与服务端版本对比 | ||
为了程序正常运行,客户端与服务端的核心版本必须一致,否则将导致客户端无法成功连接致服务端。 | ||
|
||
# Linux系统限制 | ||
## Linux系统限制 | ||
默认情况下linux对连接数量有限制,对于性能好的机器完全可以调整内核参数以处理更多的连接。 | ||
`tcp_max_syn_backlog` `somaxconn` | ||
酌情调整参数,增强网络性能 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# 捐助 | ||
如果您觉得nps对你有帮助,欢迎给予我们一定捐助,也是帮助nps更好的发展。 | ||
# 支付宝 | ||
|
||
## 支付宝 | ||
 | ||
# 微信 | ||
## 微信 | ||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# 统一准备工作(必做) | ||
# 使用示例 | ||
## 统一准备工作(必做) | ||
- 开启服务端,假设公网服务器ip为1.1.1.1,配置文件中`bridge_port`为8284,配置文件中`web_port`为8080 | ||
- 访问1.1.1.1:8080 | ||
- 在客户端管理中创建一个客户端,记录下验证密钥 | ||
|
@@ -9,7 +10,7 @@ | |
``` | ||
**注意:运行服务端后,请确保能从客户端设备上正常访问配置文件中所配置的`bridge_port`端口,telnet,netcat这类的来检查** | ||
|
||
# 域名解析 | ||
## 域名解析 | ||
|
||
**适用范围:** 小程序开发、微信公众号开发、产品演示 | ||
|
||
|
@@ -24,9 +25,9 @@ | |
|
||
现在访问(http|https://)`a.proxy.com`,`b.proxy.com`即可成功 | ||
|
||
**https:** 如需使用https请进行相关配置,详见 [使用https](#使用https) | ||
**https:** 如需使用https请进行相关配置,详见 [使用https](##使用https) | ||
|
||
# tcp隧道 | ||
## tcp隧道 | ||
|
||
|
||
**适用范围:** ssh、远程桌面等tcp连接场景 | ||
|
@@ -38,7 +39,7 @@ | |
- 在刚才创建的客户端隧道管理中添加一条tcp隧道,填写监听的端口(8001)、内网目标ip和目标端口(10.1.50.101:22),保存。 | ||
- 访问公网服务器ip(1.1.1.1),填写的监听端口(8001),相当于访问内网ip(10.1.50.101):目标端口(22),例如:`ssh -p 8001 [email protected]` | ||
|
||
# udp隧道 | ||
## udp隧道 | ||
|
||
**适用范围:** 内网dns解析等udp连接场景 | ||
|
||
|
@@ -49,7 +50,7 @@ | |
- 在刚才创建的客户端的隧道管理中添加一条udp隧道,填写监听的端口(53)、内网目标ip和目标端口(10.1.50.102:53),保存。 | ||
- 修改需要使用的dns地址为1.1.1.1,则相当于使用10.1.50.102作为dns服务器 | ||
|
||
# socks5代理 | ||
## socks5代理 | ||
|
||
|
||
**适用范围:** 在外网环境下如同使用vpn一样访问内网设备或者资源 | ||
|
@@ -64,7 +65,7 @@ | |
**注意** | ||
经过socks5代理,当收到socks5数据包时socket已经是accept状态。表现是扫描端口全open,建立连接后短时间关闭。若想同内网表现一致,建议远程连接一台设备。 | ||
|
||
# http正向代理 | ||
## http正向代理 | ||
|
||
**适用范围:** 在外网环境下使用http正向代理访问内网站点 | ||
|
||
|
@@ -76,7 +77,7 @@ | |
- 在刚才创建的客户端隧道管理中添加一条http代理,填写监听的端口(8004),保存。 | ||
- 在外网环境的本机配置http代理,ip为公网服务器ip(1.1.1.1),端口为填写的监听端口(8004),即可访问了 | ||
|
||
# 私密代理 | ||
## 私密代理 | ||
|
||
**适用范围:** 无需占用多余的端口、安全性要求较高可以防止其他人连接的tcp服务,例如ssh。 | ||
|
||
|
@@ -97,9 +98,9 @@ | |
假设10.1.50.2用户名为root,现在执行`ssh -p 2000 [email protected]`即可访问ssh | ||
|
||
|
||
# p2p服务 | ||
## p2p服务 | ||
|
||
**适用范围:** 大流量传输场景,流量不经过公网服务器,但是由于p2p穿透和nat类型关系较大,不保证100%成功,支持大部分nat类型。[nat类型检测](#nat类型检测) | ||
**适用范围:** 大流量传输场景,流量不经过公网服务器,但是由于p2p穿透和nat类型关系较大,不保证100%成功,支持大部分nat类型。[nat类型检测](##nat类型检测) | ||
|
||
**假设场景:** | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.