update docs, close #424

pull/427/head
ffdfgdfg 2020-03-01 20:35:34 +08:00
parent f522bdb6ee
commit 7f38e1fa0d
4 changed files with 29 additions and 5 deletions

View File

@ -46,6 +46,16 @@ For windows, run cmd as administrator and enter the installation directory ```np
- start up
- default ports
The default configuration file of nps use 8044380808024 ports
80 and 443 ports for host mode default ports
8080 for web management access port
8024 for net bridge port, to communicate between server and client
For linux、darwin ```sudo nps start```
For windows, run cmd as administrator and enter the program directory ```nps.exe start```

View File

@ -50,6 +50,16 @@ nps是一款轻量级、高性能、功能强大的**内网穿透**代理服务
对于windows管理员身份运行cmd进入安装目录 ```nps.exe install```
- 默认端口
nps默认配置文件使用了8044380808024端口
80与443端口为域名解析模式默认端口
8080为web管理访问端口
8024为网桥端口用于客户端与服务器通信
- 启动
对于linux|darwin ```sudo nps start```

View File

@ -14,6 +14,8 @@
**适用范围:** 小程序开发、微信公众号开发、产品演示
**注意域名解析模式为http反向代理不是dns服务器在web上能够轻松灵活配置**
**假设场景:**
- 有一个域名proxy.com有一台公网机器ip为1.1.1.1
- 两个内网开发站点127.0.0.1:81127.0.0.1:82
@ -77,6 +79,8 @@
- 在刚才创建的客户端隧道管理中添加一条http代理填写监听的端口8004保存。
- 在外网环境的本机配置http代理ip为公网服务器ip1.1.1.1),端口为填写的监听端口(8004),即可访问了
**注意对于私密代理与p2p除了统一配置的客户端和服务端还需要一个客户端作为访问端提供一个端口来访问**
## 私密代理
**适用范围:** 无需占用多余的端口、安全性要求较高可以防止其他人连接的tcp服务例如ssh。
@ -95,7 +99,7 @@
**注意:** password为web管理上添加的唯一密钥具体命令可查看web管理上的命令提示
假设10.1.50.2用户名为root现在执行`ssh -p 2000 root@1.1.1.1`即可访问ssh
假设10.1.50.2用户名为root现在执行`ssh -p 2000 root@127.0.0.1`即可访问ssh
## p2p服务

View File

@ -14,18 +14,18 @@
## 与nginx配合
有时候我们还需要在云服务器上运行nginx来保证静态文件缓存等本代理可和nginx配合使用在配置文件中将httpProxyPort设置为非80端口并在nginx中配置代理例如httpProxyPort为8024
有时候我们还需要在云服务器上运行nginx来保证静态文件缓存等本代理可和nginx配合使用在配置文件中将httpProxyPort设置为非80端口并在nginx中配置代理例如httpProxyPort为8010
```
server {
listen 80;
server_name *.proxy.com;
location / {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8024;
proxy_pass http://127.0.0.1:8010;
}
}
```
如需使用https也可在nginx监听443端口并配置ssl并将本代理的httpsProxyPort设置为空关闭https即可例如httpProxyPort为8024
如需使用https也可在nginx监听443端口并配置ssl并将本代理的httpsProxyPort设置为空关闭https即可例如httpProxyPort为8020
```
server {
@ -40,7 +40,7 @@ server {
ssl_prefer_server_ciphers on;
location / {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8024;
proxy_pass http://127.0.0.1:8020;
}
}
```