Skip to content

Commit 4e1b3d7

Browse files
vahidlazioclaude
andcommitted
tune: optimist=1, max elevation=2, STUN enabled by default
- INFLIGHT_OPTIMIST 2→1: reduce initial pipeline depth - MAX_ELEVATED_PER_DEPLOYMENT 30→2: tighten elevation cap - block_stun default true→false: allow STUN/TURN by default Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5a44a7e commit 4e1b3d7

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/bin/ui.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ fn load_form() -> (FormState, Option<String>) {
431431
youtube_via_relay: false,
432432
passthrough_hosts: Vec::new(),
433433
block_quic: true,
434-
block_stun: true,
434+
block_stun: false,
435435
disable_padding: false,
436436
force_http1: false,
437437
tunnel_doh: true,
@@ -695,8 +695,8 @@ struct ConfigWire<'a> {
695695
/// emit only when the user has explicitly disabled the block.
696696
#[serde(skip_serializing_if = "is_true")]
697697
block_doh: bool,
698-
/// Default true. Emit only when the user disables STUN/TURN blocking.
699-
#[serde(skip_serializing_if = "is_true")]
698+
/// Default false. Emit only when the user enables STUN/TURN blocking.
699+
#[serde(skip_serializing_if = "is_false")]
700700
block_stun: bool,
701701
#[serde(skip_serializing_if = "Vec::is_empty")]
702702
fronting_groups: &'a Vec<FrontingGroup>,

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ fn default_tunnel_doh() -> bool { true }
504504
/// Default for `block_quic`: `true`. QUIC over the TCP-based tunnel
505505
/// causes TCP-over-TCP meltdown (<1 Mbps). Browsers fall back to
506506
/// HTTPS/TCP within seconds of the silent UDP drop. Issue #793.
507-
fn default_block_stun() -> bool { true }
507+
fn default_block_stun() -> bool { false }
508508
fn default_block_quic() -> bool { true }
509509

510510
/// Default for `block_doh`: `true` (browser DoH is rejected so the

src/tunnel_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const INFLIGHT_IDLE: usize = 1;
6969

7070
/// Optimistic starting depth — every session gets 2 in-flight polls
7171
/// without needing an elevation permit. Drops to IDLE on first empty.
72-
const INFLIGHT_OPTIMIST: usize = 2;
72+
const INFLIGHT_OPTIMIST: usize = 1;
7373

7474
/// Maximum pipeline depth when data is actively flowing. Ramps up on
7575
/// data-bearing replies, drops back to IDLE after consecutive empties.
@@ -79,7 +79,7 @@ const INFLIGHT_ACTIVE: usize = 4;
7979
const INFLIGHT_COOLDOWN: u32 = 3;
8080

8181
/// Max sessions that can run at elevated pipeline depth per deployment.
82-
const MAX_ELEVATED_PER_DEPLOYMENT: u64 = 30;
82+
const MAX_ELEVATED_PER_DEPLOYMENT: u64 = 2;
8383

8484
/// Adaptive coalesce defaults: after each new op arrives, wait another
8585
/// step for more ops. Resets on every arrival, up to max from the first

0 commit comments

Comments
 (0)