Sfoglia il codice sorgente

docs: 更新默认管理密码为2026并同步测试脚本

yangkaixiang 1 mese fa
parent
commit
06b479af82

+ 3 - 3
docs/03-通信与HTTP_API.md

@@ -47,18 +47,18 @@ Base URL:
 
 1. `--ip`:指定维护地址,默认 `169.254.100.2`
 2. `--port`:指定 HTTP 端口,默认 `48888`
-3. `--password`:指定管理密码,默认 `Dieteng2026`
+3. `--password`:指定管理密码,默认 `2026`
 
 请求头:
 
 ```http
 Content-Type: application/json
-X-Admin-Password: Dieteng2026
+X-Admin-Password: 2026
 ```
 
 当前实现说明:
 
-1. 默认管理密码为 `Dieteng2026`
+1. 默认管理密码为 `2026`
 2. 也可通过 `--password` 启动参数覆盖
 
 ## 2. 通用约定

+ 1 - 1
docs/05-Server模块设计.md

@@ -128,7 +128,7 @@
 
 1. 暂时取消来源 IP 限制
 2. 仅保留密码校验
-3. 当前默认密码为 `Dieteng2026`
+3. 当前默认密码为 `2026`
 
 边界:
 

+ 2 - 2
docs/07-Server首阶段实现清单.md

@@ -105,12 +105,12 @@
 5. Server 版本
 6. HTTP 默认端口 `48888`
 7. 支持 `--ip` 与 `--port` 启动参数
-8. 支持 `--password` 启动参数,默认密码为 `Dieteng2026`
+8. 支持 `--password` 启动参数,默认密码为 `2026`
 
 建议示例:
 
 ```bash
-./nettool-server --ip 169.254.100.2 --port 48888 --password 'Dieteng2026'
+./nettool-server --ip 169.254.100.2 --port 48888 --password '2026'
 ```
 
 ### 5.2 `logger`

+ 2 - 2
docs/08-构建与编译.md

@@ -153,7 +153,7 @@ chmod +x /home/x/nettool-server
 登录远端后执行:
 
 ```bash
-sudo nohup /home/x/nettool-server --ip 169.254.100.2 --port 48888 --password 'Dieteng2026' >/home/x/nettool-server-run.log 2>&1 < /dev/null &
+sudo nohup /home/x/nettool-server --ip 169.254.100.2 --port 48888 --password '2026' >/home/x/nettool-server-run.log 2>&1 < /dev/null &
 ```
 
 说明:
@@ -197,7 +197,7 @@ ssh x@192.168.229.136
 ```bash
 sudo pkill -f nettool-server
 chmod +x /home/x/nettool-server
-sudo nohup /home/x/nettool-server --ip 169.254.100.2 --port 48888 --password 'Dieteng2026' >/home/x/nettool-server-run.log 2>&1 < /dev/null &
+sudo nohup /home/x/nettool-server --ip 169.254.100.2 --port 48888 --password '2026' >/home/x/nettool-server-run.log 2>&1 < /dev/null &
 ss -ltnp | grep 48888
 ```
 

+ 4 - 4
docs/09-使用说明与故障处理.md

@@ -20,7 +20,7 @@
 | Windows 维护网段 | `169.254.x.x/16` |
 | HTTP 端口 | `48888` |
 | UDP 发现端口 | `50000` |
-| 默认管理密码 | `Dieteng2026` |
+| 默认管理密码 | `2026` |
 
 ## 2. 使用前准备
 
@@ -74,7 +74,7 @@ sudo nohup /home/x/nettool-server >/home/x/nettool-server-run.log 2>&1 < /dev/nu
 2. 启动参数都是可选项,不填写时使用默认值。
 3. `--ip` 可选,用于指定维护地址;填写时必须是 `169.254.0.0/16` 范围内的 IPv4 地址。
 4. `--port` 可选,用于指定 HTTP 端口,默认 `48888`。
-5. `--password` 可选,用于指定管理密码,默认 `Dieteng2026`。
+5. `--password` 可选,用于指定管理密码,默认 `2026`。
 6. 如果启动时修改了 `--password`,Windows 客户端连接时必须填写相同密码。
 7. 如果启动时指定了 `--ip`,该地址需要已存在于 Linux 网口上,否则客户端无法通过该地址连接 Server。
 
@@ -121,7 +121,7 @@ NetTool 2026.05.15.1134
 客户端会要求输入管理密码。默认密码为:
 
 ```text
-Dieteng2026
+2026
 ```
 
 连接成功后会打开“设备信息与网口配置”窗口。
@@ -295,7 +295,7 @@ tail -n 100 /home/x/nettool-server-run.log
 在 PowerShell 中执行:
 
 ```powershell
-curl.exe -H "X-Admin-Password: Dieteng2026" http://169.254.100.2:48888/api/health
+curl.exe -H "X-Admin-Password: 2026" http://169.254.100.2:48888/api/health
 ```
 
 正常返回示例:

+ 2 - 2
scripts/linux-negative-test.sh

@@ -3,7 +3,7 @@ set -euo pipefail
 
 HOST="169.254.100.2"
 PORT="48888"
-PASSWORD="Dieteng2026"
+PASSWORD="2026"
 INTERFACE=""
 
 usage() {
@@ -25,7 +25,7 @@ Checks:
 Options:
   --host <ip>         Server host, default: 169.254.100.2
   --port <port>       Server port, default: 48888
-  --password <value>  Correct admin password, default: Dieteng2026
+  --password <value>  Correct admin password, default: 2026
   --interface <name>  Existing target interface, default: suggested_target_interface
   --help              Show this help
 EOF

+ 2 - 2
scripts/linux-smoke-test.sh

@@ -3,7 +3,7 @@ set -euo pipefail
 
 HOST="169.254.100.2"
 PORT="48888"
-PASSWORD="Dieteng2026"
+PASSWORD="2026"
 INTERFACE=""
 IP=""
 PREFIX=""
@@ -36,7 +36,7 @@ Apply and poll task:
 Options:
   --host <ip>           Server host, default: 169.254.100.2
   --port <port>         Server port, default: 48888
-  --password <value>    Admin password, default: Dieteng2026
+  --password <value>    Admin password, default: 2026
   --interface <name>    Target Linux interface, e.g. ens33
   --ip <ipv4>           IPv4 address for validate/apply
   --prefix <cidr>       Prefix length for validate/apply

+ 2 - 2
server/internal/config/config.go

@@ -6,7 +6,7 @@ import (
 	"net"
 )
 
-const ServerVersion = "2026.05.15.1134"
+const ServerVersion = "2026.05.15.1708"
 
 type Config struct {
 	HTTPHost         string
@@ -28,7 +28,7 @@ func Load(args []string) Config {
 		UDPPort:          50000,
 		MaintenanceIP:    "",
 		MaintenanceCIDR:  "",
-		AdminPassword:    "Dieteng2026",
+		AdminPassword:    "2026",
 		ServerVersion:    ServerVersion,
 		DeviceIDFallback: "nettool-device",
 	}