fix: reqTimeout misuse in MakeRequest + hk_lm level MTProxy ClientHello obfuscation#308
Open
joyccn wants to merge 1 commit into
Open
fix: reqTimeout misuse in MakeRequest + hk_lm level MTProxy ClientHello obfuscation#308joyccn wants to merge 1 commit into
joyccn wants to merge 1 commit into
Conversation
- MakeRequest now uses m.reqTimeout instead of m.connConfig.Timeout - Auto-retry requests after reconnect triggered by 5 consecutive timeouts feat: hk_lm level obfuscation for MTProxy ClientHello - Variable-length ClientHello (100-400 byte random padding) - Multiple key shares: X25519 + P-256 (matches modern browsers) - 10 grease values in realistic positions (up from 7) - Additional extensions: Application Settings (h2), Compress Certificate, PSK modes, Signature Algorithms, Status Request, SCTs - Proper TLS record framing with correct length fields
Owner
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context Timeout RPC Fixes
MakeRequest timeout fix —
MakeRequestwas usingconnConfig.Timeout(TCP connect timeout) instead ofreqTimeout(request timeout). Now consistently usesreqTimeout.Auto-retry after reconnect — 5 consecutive timeouts within 60s trigger a reconnect, then the request is automatically retried on the new connection (depth-limited, instead of returning an error).
hk_lm Level Obfuscation for MTProxy ClientHello
Major improvements to the fake TLS ClientHello to make it harder to fingerprint:
New extensions: Application Settings (h2), Compress Certificate, PSK Key Exchange Modes, Signature Algorithms, Status Request, Signed Certificate Timestamps, Grease extensions at realistic positions.
Record layer now uses proper calculated length fields instead of hardcoded values.
Verification
go build ./...— OKgo vet ./...— OKgo test ./internal/transport/— 14/14 PASS (unit tests for ParseMTProxySecret, generateFakeTlsHello, HMAC verification, multiple key shares, structure validation)