mirror of
https://github.com/therealaleph/MasterHttpRelayVPN-RUST.git
synced 2026-05-17 21:24:48 +03:00
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>
This commit is contained in:
Generated
+1
-1
@@ -2222,7 +2222,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mhrv-rs"
|
name = "mhrv-rs"
|
||||||
version = "1.9.12"
|
version = "1.9.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mhrv-rs"
|
name = "mhrv-rs"
|
||||||
version = "1.9.12"
|
version = "1.9.13"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting"
|
description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<!-- see docs/changelog/v1.1.0.md for the file format: Persian, then `---`, then English. -->
|
||||||
|
• 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.
|
||||||
|
---
|
||||||
|
• 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.
|
||||||
@@ -268,6 +268,11 @@ struct FormState {
|
|||||||
/// User-supplied DoH hostnames added to the built-in default list,
|
/// User-supplied DoH hostnames added to the built-in default list,
|
||||||
/// round-tripped from config.json. See config.rs `bypass_doh_hosts`.
|
/// round-tripped from config.json. See config.rs `bypass_doh_hosts`.
|
||||||
bypass_doh_hosts: Vec<String>,
|
bypass_doh_hosts: Vec<String>,
|
||||||
|
/// PR #763: when true, immediately reject browser DoH CONNECTs so the
|
||||||
|
/// browser falls back to system DNS (tun2proxy virtual DNS — instant).
|
||||||
|
/// Round-tripped from config.json. Desktop UI doesn't expose a toggle
|
||||||
|
/// yet — Android does. See config.rs `block_doh`.
|
||||||
|
block_doh: bool,
|
||||||
/// Multi-edge fronting groups. Round-tripped from config.json so
|
/// Multi-edge fronting groups. Round-tripped from config.json so
|
||||||
/// the UI's Save doesn't drop the user's hand-edited groups —
|
/// the UI's Save doesn't drop the user's hand-edited groups —
|
||||||
/// there is no UI editor for these yet, only file-edited config.
|
/// there is no UI editor for these yet, only file-edited config.
|
||||||
@@ -381,6 +386,7 @@ fn load_form() -> (FormState, Option<String>) {
|
|||||||
disable_padding: c.disable_padding,
|
disable_padding: c.disable_padding,
|
||||||
tunnel_doh: c.tunnel_doh,
|
tunnel_doh: c.tunnel_doh,
|
||||||
bypass_doh_hosts: c.bypass_doh_hosts.clone(),
|
bypass_doh_hosts: c.bypass_doh_hosts.clone(),
|
||||||
|
block_doh: c.block_doh,
|
||||||
fronting_groups: c.fronting_groups.clone(),
|
fronting_groups: c.fronting_groups.clone(),
|
||||||
auto_blacklist_strikes: c.auto_blacklist_strikes,
|
auto_blacklist_strikes: c.auto_blacklist_strikes,
|
||||||
auto_blacklist_window_secs: c.auto_blacklist_window_secs,
|
auto_blacklist_window_secs: c.auto_blacklist_window_secs,
|
||||||
@@ -418,6 +424,7 @@ fn load_form() -> (FormState, Option<String>) {
|
|||||||
disable_padding: false,
|
disable_padding: false,
|
||||||
tunnel_doh: true,
|
tunnel_doh: true,
|
||||||
bypass_doh_hosts: Vec::new(),
|
bypass_doh_hosts: Vec::new(),
|
||||||
|
block_doh: true,
|
||||||
fronting_groups: Vec::new(),
|
fronting_groups: Vec::new(),
|
||||||
// Defaults match `default_auto_blacklist_*` and
|
// Defaults match `default_auto_blacklist_*` and
|
||||||
// `default_request_timeout_secs` in src/config.rs.
|
// `default_request_timeout_secs` in src/config.rs.
|
||||||
@@ -582,6 +589,12 @@ impl FormState {
|
|||||||
// added) so save doesn't drop them.
|
// added) so save doesn't drop them.
|
||||||
tunnel_doh: self.tunnel_doh,
|
tunnel_doh: self.tunnel_doh,
|
||||||
bypass_doh_hosts: self.bypass_doh_hosts.clone(),
|
bypass_doh_hosts: self.bypass_doh_hosts.clone(),
|
||||||
|
// PR #763: block_doh defaults to true (rejects browser DoH so
|
||||||
|
// tun2proxy's virtual DNS handles name lookups, saving the
|
||||||
|
// ~1.5s tunnel round-trip per DNS query). Desktop UI doesn't
|
||||||
|
// expose a toggle yet (Android does), so this is a config-only
|
||||||
|
// round-trip — we keep whatever the user has in config.json.
|
||||||
|
block_doh: self.block_doh,
|
||||||
// Multi-edge fronting groups: file-edited only for now,
|
// Multi-edge fronting groups: file-edited only for now,
|
||||||
// round-tripped through the UI so Save doesn't drop them.
|
// round-tripped through the UI so Save doesn't drop them.
|
||||||
fronting_groups: self.fronting_groups.clone(),
|
fronting_groups: self.fronting_groups.clone(),
|
||||||
@@ -661,6 +674,11 @@ struct ConfigWire<'a> {
|
|||||||
tunnel_doh: bool,
|
tunnel_doh: bool,
|
||||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||||
bypass_doh_hosts: &'a Vec<String>,
|
bypass_doh_hosts: &'a Vec<String>,
|
||||||
|
/// PR #763: default true (= browser DoH rejected, system DNS used).
|
||||||
|
/// Skip when matching default to keep unchanged configs clean —
|
||||||
|
/// emit only when the user has explicitly disabled the block.
|
||||||
|
#[serde(skip_serializing_if = "is_true")]
|
||||||
|
block_doh: bool,
|
||||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||||
fronting_groups: &'a Vec<FrontingGroup>,
|
fronting_groups: &'a Vec<FrontingGroup>,
|
||||||
/// Auto-blacklist tuning + batch timeout (#391, #444, #430). Skip
|
/// Auto-blacklist tuning + batch timeout (#391, #444, #430). Skip
|
||||||
@@ -700,6 +718,10 @@ fn is_false(b: &bool) -> bool {
|
|||||||
!*b
|
!*b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn is_true(b: &bool) -> bool {
|
||||||
|
*b
|
||||||
|
}
|
||||||
|
|
||||||
fn is_zero_u8(v: &u8) -> bool {
|
fn is_zero_u8(v: &u8) -> bool {
|
||||||
*v == 0
|
*v == 0
|
||||||
}
|
}
|
||||||
@@ -744,6 +766,7 @@ impl<'a> From<&'a Config> for ConfigWire<'a> {
|
|||||||
google_ip_validation: c.google_ip_validation,
|
google_ip_validation: c.google_ip_validation,
|
||||||
tunnel_doh: c.tunnel_doh,
|
tunnel_doh: c.tunnel_doh,
|
||||||
bypass_doh_hosts: &c.bypass_doh_hosts,
|
bypass_doh_hosts: &c.bypass_doh_hosts,
|
||||||
|
block_doh: c.block_doh,
|
||||||
fronting_groups: &c.fronting_groups,
|
fronting_groups: &c.fronting_groups,
|
||||||
auto_blacklist_strikes: c.auto_blacklist_strikes,
|
auto_blacklist_strikes: c.auto_blacklist_strikes,
|
||||||
auto_blacklist_window_secs: c.auto_blacklist_window_secs,
|
auto_blacklist_window_secs: c.auto_blacklist_window_secs,
|
||||||
|
|||||||
Reference in New Issue
Block a user