Browse Source

update docs

ffdfgdfg 5 years ago
parent
commit
72c695de4a
8 changed files with 33 additions and 20 deletions
  1. 1 0
      docs/_sidebar.md
  2. 1 4
      docs/api.md
  3. 4 4
      docs/example.md
  4. 15 0
      docs/faq.md
  5. 1 1
      docs/feature.md
  6. 1 1
      docs/install.md
  7. 9 9
      docs/use.md
  8. 1 1
      docs/webapi.md

+ 1 - 0
docs/_sidebar.md

@@ -22,6 +22,7 @@
 
 * 其他
 
+  * [FAQ](faq.md)
   * [贡献](contribute.md)
   * [捐助](donate.md)
   * [致谢](thanks.md)

+ 1 - 4
docs/api.md

@@ -42,7 +42,4 @@ POST /auth/getauthkey
 - 解密串编码方式 十六进制
 
 ## 详细文档
-- **此文档近期可能更新较慢,建议自行抓包**
-
-为方便第三方扩展,在web模式下可利用webAPI进行相关操作,详情见
-[webAPI文档](https://github.com/ehang-io/nps/wiki/webAPI%E6%96%87%E6%A1%A3)
+- **[详见](webapi.md)** (感谢@avengexyz)

+ 4 - 4
docs/example.md

@@ -1,12 +1,12 @@
 # 使用示例
 ## 统一准备工作(必做)
-- 开启服务端,假设公网服务器ip为1.1.1.1,配置文件中`bridge_port`为8284,配置文件中`web_port`为8080
+- 开启服务端,假设公网服务器ip为1.1.1.1,配置文件中`bridge_port`为8024,配置文件中`web_port`为8080
 - 访问1.1.1.1:8080
 - 在客户端管理中创建一个客户端,记录下验证密钥
 - 内网客户端运行(windows使用cmd运行加.exe)
 
 ```shell
-./npc -server=1.1.1.1:8284 -vkey=客户端的密钥
+./npc -server=1.1.1.1:8024 -vkey=客户端的密钥
 ```
 **注意:运行服务端后,请确保能从客户端设备上正常访问配置文件中所配置的`bridge_port`端口,telnet,netcat这类的来检查**
 
@@ -89,7 +89,7 @@
 - 在需要连接ssh的机器上以执行命令
 
 ```
-./npc -server=1.1.1.1:8284 -vkey=vkey -type=tcp -password=secrettest -local_type=secret
+./npc -server=1.1.1.1:8024 -vkey=vkey -type=tcp -password=secrettest -local_type=secret
 ```
 如需指定本地端口可加参数`-local_port=xx`,默认为2000
 
@@ -112,7 +112,7 @@
 - 在使用端机器(本机)执行命令
 
 ```
-./npc -server=1.1.1.1:8284 -vkey=123 -password=p2pssh -target=10.2.50.2:22
+./npc -server=1.1.1.1:8024 -vkey=123 -password=p2pssh -target=10.2.50.2:22
 ```
 如需指定本地端口可加参数`-local_port=xx`,默认为2000
 

+ 15 - 0
docs/faq.md

@@ -0,0 +1,15 @@
+# FAQ
+
+- 服务端无法启动
+
+服务端默认配置启用了8024,8080,80,443端口,端口冲突无法启动,请修改配置
+
+- 客户端无法连接服务端
+
+请检查配置文件中的所有端口是否在安全组,防火墙放行
+请检查vkey是否对应
+请检查版本是否对应
+
+- 服务端配置文件修改无效
+
+install之后,linux配置文件在/etc/nps

+ 1 - 1
docs/feature.md

@@ -167,7 +167,7 @@ npc支持环境变量渲染以适应在某些特殊场景下的要求。
 **在无配置文件启动模式下:**
 设置环境变量
 ```
-export NPC_SERVER_ADDR=1.1.1.1:8284
+export NPC_SERVER_ADDR=1.1.1.1:8024
 export NPC_SERVER_VKEY=xxxxx
 ```
 直接执行./npc即可运行

+ 1 - 1
docs/install.md

@@ -6,7 +6,7 @@
 
 ## 源码安装
 - 安装源码
-```go get -u ehang.io/nps...```
+```go get -u ehang.io/nps```
 - 编译
 
 服务端```go build cmd/nps/nps.go```

+ 9 - 9
docs/use.md

@@ -48,7 +48,7 @@ npc-update.exe update
 #### 全局配置
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 conn_type=tcp
 vkey=123
 username=111
@@ -77,7 +77,7 @@ max_conn|最大连接数,可忽略
 
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 vkey=123
 [web1]
 host=a.proxy.com
@@ -97,7 +97,7 @@ header_xxx|请求header修改或添加,header_proxy表示添加header proxy:np
 
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 vkey=123
 [tcp]
 mode=tcp
@@ -114,7 +114,7 @@ tartget_addr|内网目标
 
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 vkey=123
 [udp]
 mode=udp
@@ -130,7 +130,7 @@ target_addr|内网目标
 
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 vkey=123
 [http]
 mode=httpProxy
@@ -144,7 +144,7 @@ server_port | 在服务端的代理端口
 
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 vkey=123
 [socks5]
 mode=socks5
@@ -160,7 +160,7 @@ multi_account | socks5多账号配置文件(可选),配置后使用basic_usern
 
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 vkey=123
 [secret_ssh]
 mode=secret
@@ -177,7 +177,7 @@ target_addr|内网目标
 
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 vkey=123
 [p2p_ssh]
 mode=p2p
@@ -196,7 +196,7 @@ target_addr|内网目标
 
 ```ini
 [common]
-server_addr=1.1.1.1:8284
+server_addr=1.1.1.1:8024
 vkey=123
 [file]
 mode=file

+ 1 - 1
docs/webapi.md

@@ -47,7 +47,7 @@ POST /client/add/
 | max\_tunnel | 客户端最大隧道数量 空则为不限制 |
 
 ***
-修改客户端(25.4版本有问题暂时不能用)
+修改客户端
 
 ```
 POST /client/edit/