Skip to content

Commit 607d23c

Browse files
therealalephclaude
andcommitted
hotfix: v1.9.13 — fix mhrv-rs-ui compile breakage from missing block_doh field
Both v1.9.11 and v1.9.12 release CI runs failed because PR #763 added a new `block_doh: bool` field to `Config` but didn't update `src/bin/ui.rs::FormState::to_config()` which builds Config via a struct literal — caught by `cargo build --features ui --bin mhrv-rs-ui` only, not by the lib `cargo test` I'd run during PR review. Added the field to FormState (round-trip from Config), to ConfigWire (skip_serializing_if = "is_true" so default-true configs stay clean), and a new is_true helper. Verified mhrv-rs-ui release build green locally before pushing. Net effect: v1.9.13 ships everything v1.9.11 and v1.9.12 were supposed to ship (DoH block by default, TLS pool refill loop, github.io fronting group, parallel_relay safe-method gating) plus this UI fix. No additional behavior change. Tests: 180 lib + 35 tunnel-node + UI release-mode build all green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9a21bc4 commit 607d23c

4 files changed

Lines changed: 29 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mhrv-rs"
3-
version = "1.9.12"
3+
version = "1.9.13"
44
edition = "2021"
55
description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting"
66
license = "MIT"

docs/changelog/v1.9.13.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!-- see docs/changelog/v1.1.0.md for the file format: Persian, then `---`, then English. -->
2+
• Hotfix v1.9.11 / v1.9.12 build failure: PR [#763](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/pull/763) فیلد جدید `block_doh` به `Config` اضافه کرد ولی `src/bin/ui.rs::FormState` (که Config رو با struct literal می‌سازه) به‌روز نشد، در نتیجه `mhrv-rs-ui` در CI با `error[E0063]: missing field 'block_doh'` کامپایل نشد. هر دو release CI v1.9.11 و v1.9.12 fail شدن — هیچ binary منتشر نشد. این release همان تغییرات رو با fix UI ship می‌کنه. **پیامد محصول:** v1.9.13 = v1.9.11 + v1.9.12 + UI compile fix. تست: 180 lib + 35 tunnel-node + UI release-mode build همه green.
3+
---
4+
• Hotfix v1.9.11 / v1.9.12 build failure: PR [#763](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/pull/763) added a new `block_doh` field to `Config` but didn't update `src/bin/ui.rs::FormState` (which constructs `Config` via a struct literal), so `mhrv-rs-ui` failed to compile in CI with `error[E0063]: missing field 'block_doh'`. Both v1.9.11 and v1.9.12 release CI runs failed and shipped no binaries. This release is the same set of changes with the UI compile fix included. **Product impact:** v1.9.13 = v1.9.11 + v1.9.12 + UI compile fix. Tests: 180 lib + 35 tunnel-node + UI release-mode build all green.

src/bin/ui.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ struct FormState {
268268
/// User-supplied DoH hostnames added to the built-in default list,
269269
/// round-tripped from config.json. See config.rs `bypass_doh_hosts`.
270270
bypass_doh_hosts: Vec<String>,
271+
/// PR #763: when true, immediately reject browser DoH CONNECTs so the
272+
/// browser falls back to system DNS (tun2proxy virtual DNS — instant).
273+
/// Round-tripped from config.json. Desktop UI doesn't expose a toggle
274+
/// yet — Android does. See config.rs `block_doh`.
275+
block_doh: bool,
271276
/// Multi-edge fronting groups. Round-tripped from config.json so
272277
/// the UI's Save doesn't drop the user's hand-edited groups —
273278
/// there is no UI editor for these yet, only file-edited config.
@@ -381,6 +386,7 @@ fn load_form() -> (FormState, Option<String>) {
381386
disable_padding: c.disable_padding,
382387
tunnel_doh: c.tunnel_doh,
383388
bypass_doh_hosts: c.bypass_doh_hosts.clone(),
389+
block_doh: c.block_doh,
384390
fronting_groups: c.fronting_groups.clone(),
385391
auto_blacklist_strikes: c.auto_blacklist_strikes,
386392
auto_blacklist_window_secs: c.auto_blacklist_window_secs,
@@ -418,6 +424,7 @@ fn load_form() -> (FormState, Option<String>) {
418424
disable_padding: false,
419425
tunnel_doh: true,
420426
bypass_doh_hosts: Vec::new(),
427+
block_doh: true,
421428
fronting_groups: Vec::new(),
422429
// Defaults match `default_auto_blacklist_*` and
423430
// `default_request_timeout_secs` in src/config.rs.
@@ -582,6 +589,12 @@ impl FormState {
582589
// added) so save doesn't drop them.
583590
tunnel_doh: self.tunnel_doh,
584591
bypass_doh_hosts: self.bypass_doh_hosts.clone(),
592+
// PR #763: block_doh defaults to true (rejects browser DoH so
593+
// tun2proxy's virtual DNS handles name lookups, saving the
594+
// ~1.5s tunnel round-trip per DNS query). Desktop UI doesn't
595+
// expose a toggle yet (Android does), so this is a config-only
596+
// round-trip — we keep whatever the user has in config.json.
597+
block_doh: self.block_doh,
585598
// Multi-edge fronting groups: file-edited only for now,
586599
// round-tripped through the UI so Save doesn't drop them.
587600
fronting_groups: self.fronting_groups.clone(),
@@ -661,6 +674,11 @@ struct ConfigWire<'a> {
661674
tunnel_doh: bool,
662675
#[serde(skip_serializing_if = "Vec::is_empty")]
663676
bypass_doh_hosts: &'a Vec<String>,
677+
/// PR #763: default true (= browser DoH rejected, system DNS used).
678+
/// Skip when matching default to keep unchanged configs clean —
679+
/// emit only when the user has explicitly disabled the block.
680+
#[serde(skip_serializing_if = "is_true")]
681+
block_doh: bool,
664682
#[serde(skip_serializing_if = "Vec::is_empty")]
665683
fronting_groups: &'a Vec<FrontingGroup>,
666684
/// Auto-blacklist tuning + batch timeout (#391, #444, #430). Skip
@@ -700,6 +718,10 @@ fn is_false(b: &bool) -> bool {
700718
!*b
701719
}
702720

721+
fn is_true(b: &bool) -> bool {
722+
*b
723+
}
724+
703725
fn is_zero_u8(v: &u8) -> bool {
704726
*v == 0
705727
}
@@ -744,6 +766,7 @@ impl<'a> From<&'a Config> for ConfigWire<'a> {
744766
google_ip_validation: c.google_ip_validation,
745767
tunnel_doh: c.tunnel_doh,
746768
bypass_doh_hosts: &c.bypass_doh_hosts,
769+
block_doh: c.block_doh,
747770
fronting_groups: &c.fronting_groups,
748771
auto_blacklist_strikes: c.auto_blacklist_strikes,
749772
auto_blacklist_window_secs: c.auto_blacklist_window_secs,

0 commit comments

Comments
 (0)