fix(flutter): show Junk/TCP-Frag controls only when transport is UoT

Junk packets and TCP fragmentation only take effect on the UoT (TCP)
transport — the UDP path applies neither — so showing them (with an
implicit "UoT only" caveat) while UDP is selected was misleading. The
whole DPI OBFUSCATION section is now gated on transportMode == 'uot' and
appears/disappears reactively when the Transport dropdown changes
(setDialogState already rebuilds the dialog).
This commit is contained in:
ospab 2026-07-12 02:04:09 +03:00
parent 5fcc0ba7f4
commit 108ab8468b
1 changed files with 32 additions and 29 deletions

View File

@ -265,11 +265,13 @@ class _SettingsScreenState extends State<SettingsScreen> {
if (v != null) setDialogState(() => transportMode = v);
},
),
// Junk packets and TCP fragmentation only take effect on the
// UoT (TCP) transport the UDP path applies neither so the
// whole section is hidden under UDP instead of shown with a
// "UoT only" caveat. Reactive: switching Transport above calls
// setDialogState, which rebuilds this and shows/hides it.
if (transportMode == 'uot') ...[
const Divider(height: 32),
// Junk packets + TCP fragmentation moved into their own
// modals (tap to configure) this dialog was carrying too
// many fields at once; these two are advanced/occasional
// settings, not something every profile edit needs to see.
const Text('DPI OBFUSCATION', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13, color: Colors.white54, letterSpacing: 1.0)),
const SizedBox(height: 12),
Row(
@ -299,6 +301,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
],
),
],
],
),
),
actions: [