v0.2.1: fix PRI/HTTP2-preface leak + shrink SNI-rewrite list

Two bug fixes surfaced in user testing:

1. Invalid HTTP methods forwarded to Apps Script
   - Browser/xray sent HTTP/2 PRI preface through our MITM despite ALPN
     being set to http/1.1 only (some clients ignore ALPN).
   - Our parser accepted 'PRI' as a method and forwarded to Apps Script,
     which rejected it: 'Exception: parameter provided with invalid value: method'.
   - Fix: validate method against the standard list (GET/POST/PUT/DELETE/
     HEAD/OPTIONS/PATCH/TRACE/CONNECT) at parse time. Non-matching requests
     close the connection cleanly instead of forwarding garbage.

2. YouTube video playback broken by over-broad SNI-rewrite list
   - Previous list included googlevideo.com, ytimg.com, doubleclick.net,
     etc. -- but these are served from SEPARATE CDN pools, NOT from
     Google's 216.239.38.120 frontend. Rewriting sent traffic to the
     wrong backend, which Google dropped.
   - Shrunk to a conservative list that's actually served from the
     main Google frontend: youtube.com, youtu.be, youtube-nocookie.com,
     fonts.googleapis.com. Everything else falls through to MITM+relay
     (slower but actually works).
   - YouTube video chunks now route through Apps Script which is slow
     and quota-limited. This is a known limitation inherent to the
     approach; same issue exists in the original Python version.
This commit is contained in:
therealaleph
2026-04-21 19:34:02 +03:00
parent ea5c6ca9a4
commit 33bba7a0f7
3 changed files with 28 additions and 14 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "mhrv-rs"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting"
license = "MIT"