1
0

3 Коммиты 46dd5bf4de ... 02417795a6

Автор SHA1 Сообщение Дата
  yangkaixiang 02417795a6 docs: 更新默认管理密码为 hvAC2026#% 1 месяц назад
  yangkaixiang d8f88789c2 feat(ui): 将设备连接方式改为按钮点击 1 месяц назад
  yangkaixiang 06b479af82 docs: 更新默认管理密码为2026并同步测试脚本 1 месяц назад

+ 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`:指定管理密码,默认 `hvAC2026#%`
 
 请求头:
 
 ```http
 Content-Type: application/json
-X-Admin-Password: Dieteng2026
+X-Admin-Password: hvAC2026#%
 ```
 
 当前实现说明:
 
-1. 默认管理密码为 `Dieteng2026`
+1. 默认管理密码为 `hvAC2026#%`
 2. 也可通过 `--password` 启动参数覆盖
 
 ## 2. 通用约定

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

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

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

@@ -105,12 +105,12 @@
 5. Server 版本
 6. HTTP 默认端口 `48888`
 7. 支持 `--ip` 与 `--port` 启动参数
-8. 支持 `--password` 启动参数,默认密码为 `Dieteng2026`
+8. 支持 `--password` 启动参数,默认密码为 `hvAC2026#%`
 
 建议示例:
 
 ```bash
-./nettool-server --ip 169.254.100.2 --port 48888 --password 'Dieteng2026'
+./nettool-server --ip 169.254.100.2 --port 48888 --password 'hvAC2026#%'
 ```
 
 ### 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 'hvAC2026#%' >/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 'hvAC2026#%' >/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` |
+| 默认管理密码 | `hvAC2026#%` |
 
 ## 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` 可选,用于指定管理密码,默认 `hvAC2026#%`。
 6. 如果启动时修改了 `--password`,Windows 客户端连接时必须填写相同密码。
 7. 如果启动时指定了 `--ip`,该地址需要已存在于 Linux 网口上,否则客户端无法通过该地址连接 Server。
 
@@ -121,7 +121,7 @@ NetTool 2026.05.15.1134
 客户端会要求输入管理密码。默认密码为:
 
 ```text
-Dieteng2026
+hvAC2026#%
 ```
 
 连接成功后会打开“设备信息与网口配置”窗口。
@@ -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: hvAC2026#%" 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="hvAC2026#%"
 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: hvAC2026#%
   --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="hvAC2026#%"
 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: hvAC2026#%
   --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.1719"
 
 type Config struct {
 	HTTPHost         string
@@ -28,7 +28,7 @@ func Load(args []string) Config {
 		UDPPort:          50000,
 		MaintenanceIP:    "",
 		MaintenanceCIDR:  "",
-		AdminPassword:    "Dieteng2026",
+		AdminPassword:    "hvAC2026#%",
 		ServerVersion:    ServerVersion,
 		DeviceIDFallback: "nettool-device",
 	}

+ 12 - 2
windows/NetTool.Client/MainWindow.xaml

@@ -184,7 +184,7 @@
                                            FontSize="13"
                                            FontWeight="SemiBold"
                                            Foreground="#111827"
-                                           Text="发现设备(双击连接)" />
+                                           Text="发现设备" />
                                 <Button x:Name="SearchDevicesButton"
                                         Grid.Column="3"
                                         MinHeight="32"
@@ -215,7 +215,6 @@
                                        Style="{StaticResource DiscoveryListViewStyle}"
                                        ItemContainerStyle="{StaticResource DiscoveryListViewItemStyle}"
                                        LostKeyboardFocus="DiscoveredDevicesListView_OnLostKeyboardFocus"
-                                       MouseDoubleClick="DiscoveredDevicesListView_OnMouseDoubleClick"
                                        SizeChanged="DiscoveredDevicesListView_OnSizeChanged">
                                 <ListView.View>
                                     <GridView ColumnHeaderContainerStyle="{StaticResource DiscoveryColumnHeaderStyle}">
@@ -240,6 +239,17 @@
                                                 </DataTemplate>
                                             </GridViewColumn.CellTemplate>
                                         </GridViewColumn>
+                                        <GridViewColumn x:Name="DeviceActionColumn" Width="88" Header="操作">
+                                            <GridViewColumn.CellTemplate>
+                                                <DataTemplate>
+                                                    <Button MinHeight="26"
+                                                            Margin="8,0"
+                                                            Padding="12,0"
+                                                            Click="ConnectDeviceButton_OnClick"
+                                                            Content="连接" />
+                                                </DataTemplate>
+                                            </GridViewColumn.CellTemplate>
+                                        </GridViewColumn>
                                     </GridView>
                                 </ListView.View>
                             </ListView>

+ 8 - 6
windows/NetTool.Client/MainWindow.xaml.cs

@@ -204,7 +204,7 @@ public partial class MainWindow : Window
                 return;
             }
 
-            SetStatus($"已发现 {_discoveredDevices.Count} 台设备,请双击 IP 连接。", StatusMessageType.Success, true);
+            SetStatus($"已发现 {_discoveredDevices.Count} 台设备,请点击右侧连接。", StatusMessageType.Success, true);
         }
         catch (OperationCanceledException)
         {
@@ -272,9 +272,9 @@ public partial class MainWindow : Window
         SetStatus($"已发现 {_discoveredDevices.Count} 台设备,搜索仍在继续。", StatusMessageType.Success, true);
     }
 
-    private async void DiscoveredDevicesListView_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
+    private async void ConnectDeviceButton_OnClick(object sender, RoutedEventArgs e)
     {
-        if (!_isBusy && DiscoveredDevicesListView.SelectedItem is DiscoveredDevice device)
+        if (!_isBusy && sender is Button { DataContext: DiscoveredDevice device })
         {
             await ConnectToDeviceAsync(device);
         }
@@ -288,9 +288,11 @@ public partial class MainWindow : Window
             return;
         }
 
-        DeviceIpColumn.Width = Math.Max(130, availableWidth * 0.26);
-        DeviceHostnameColumn.Width = Math.Max(150, availableWidth * 0.30);
-        DeviceMacColumn.Width = Math.Max(180, availableWidth - DeviceIpColumn.Width - DeviceHostnameColumn.Width);
+        DeviceActionColumn.Width = 88;
+        var contentWidth = Math.Max(0, availableWidth - DeviceActionColumn.Width);
+        DeviceIpColumn.Width = Math.Max(130, contentWidth * 0.26);
+        DeviceHostnameColumn.Width = Math.Max(150, contentWidth * 0.30);
+        DeviceMacColumn.Width = Math.Max(180, contentWidth - DeviceIpColumn.Width - DeviceHostnameColumn.Width);
     }
 
     private void DiscoveredDevicesListView_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)

+ 1 - 1
windows/NetTool.Client/NetTool.Client.csproj

@@ -8,7 +8,7 @@
     <UseWPF>true</UseWPF>
     <AssemblyName>NetTool.Client</AssemblyName>
     <RootNamespace>NetTool.Client</RootNamespace>
-    <InformationalVersion>2026.05.15.1134</InformationalVersion>
+    <InformationalVersion>2026.05.15.1713</InformationalVersion>
   </PropertyGroup>
 
 </Project>