From 65a89455b68469a472db44303ffa9c0e604c1f3a Mon Sep 17 00:00:00 2001 From: Zero <1270128439@qq.com> Date: Thu, 21 May 2026 22:51:54 +0800 Subject: [PATCH] fix: hysteria2 obfs round-trip, subscription identity, log scroll anchoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - hysteria2: parse obfs=salamander + obfs-password from share links into Finalmask udp[], and emit them back when generating share links. Previously dropped on import and never produced on export. - subscription refresh: preserve node Ids by a multi-field identity key (protocol/host/port/network/security/path/credentials/uuid/flow/...) instead of just protocol://host:port. Lowercase case-insensitive fields, queue-match to handle duplicates, and dedupe via reusedIds so two new entries can't share one old Id. - log window: when auto-scroll is OFF and the 500-line ring buffer evicts old lines, shift the scroll offset down by evicted * lineHeight so visible content stays anchored instead of drifting up. - DialogService: set AcceptsReturn before Text on the Finalmask TextBox — single-line Text setter truncates at the first \r. Normalize line endings to \r as well. - ServerDetailControl: guard ShadowRect_Loaded with _shadowsWired so the three AI-service Borders don't each re-add receivers (3*3=9 duplicates). - MainWindow.xaml: child VM bindings and SwitchToSelectedServerCommand are immutable after construction, switch to OneTime; drop redundant Mode=OneWay on the MiniStartStop Command binding. Co-Authored-By: Claude Opus 4.7 --- MainWindow.xaml | 10 ++--- Services/DialogService.cs | 6 ++- Services/NodeLinkParser.cs | 59 ++++++++++++++++++++++++++++- Services/NodeLinkSerializer.cs | 62 +++++++++++++++++++++++++++---- ViewModels/ServerListViewModel.cs | 47 +++++++++++++++++++++-- Views/LogWindow.xaml.cs | 27 +++++++++++++- Views/ServerDetailControl.xaml | 2 +- Views/ServerDetailControl.xaml.cs | 9 ++++- 8 files changed, 200 insertions(+), 22 deletions(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index c799264..f903f83 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -93,7 +93,7 @@ + ViewModel="{x:Bind ViewModel.ServerList, Mode=OneTime}" + SwitchToSelectedServerCommand="{x:Bind ViewModel.SwitchToSelectedServerCommand, Mode=OneTime}" /> @@ -184,11 +184,11 @@ + ViewModel="{x:Bind ViewModel.ServerDetail, Mode=OneTime}" /> + ViewModel="{x:Bind ViewModel.ControlPanel, Mode=OneTime}" />