mirror of
https://github.com/therealaleph/MasterHttpRelayVPN-RUST.git
synced 2026-05-17 21:24:48 +03:00
v1.1.5: merge upstream safety fixes + Telegram default = file + link only (#60)
Contains the three safety fixes from PRs #48/#49/#50 and the Persian README RTL polishing from #58, all squashed into main. Merge details already in their individual PR comments; summary: #48: reject truncated Content-Length relay responses (previously silently accepted whatever bytes arrived before EOF) #49: reject truncated or malformed (missing CRLF) chunked-encoding relay responses (same class of silent-acceptance bug) #50: restrict the SNI-rewrite tunnel dispatch to port 443. Plain HTTP (:80) targets that happened to match google.com / hosts override were being steered into the TLS tunnel and blocking waiting for a ClientHello that would never arrive. #58: trailing-whitespace line-breaks on Persian bullet lists in README so the RTL rendering doesn't collapse consecutive items into a single paragraph. Test suite grew from 54 to 58 passing (three new negative tests for the relay-reader correctness fixes + one SNI-rewrite port filter). Telegram CI notify default switched to file-plus-link: - script gains a `--with-changelog` flag; default OFF - workflow only passes it when `vars.TELEGRAM_INCLUDE_CHANGELOG=true` - every routine release now posts just the APK + short caption (title + SHA-256 + repo URL + release URL) with no long body To include bullets for a given release again: gh variable set TELEGRAM_INCLUDE_CHANGELOG --body true The existing `vars.TELEGRAM_NOTIFY_ENABLED` job-level gate remains — changelog toggle is orthogonal to enable/disable. Also closes PR #55 without merging; ads/analytics domains were being lumped under a YouTube-specific toggle, and the PR committed per- machine \`.cargo/config.toml\` + zig-cc cross-compile helpers that would have broken CI on actual Windows / macOS runners.
This commit is contained in:
committed by
GitHub
parent
f45bc2f420
commit
5a108f73cb
@@ -159,7 +159,16 @@ def main() -> int:
|
|||||||
ap.add_argument("--apk", required=True)
|
ap.add_argument("--apk", required=True)
|
||||||
ap.add_argument("--version", required=True)
|
ap.add_argument("--version", required=True)
|
||||||
ap.add_argument("--repo", required=True)
|
ap.add_argument("--repo", required=True)
|
||||||
ap.add_argument("--changelog", required=True)
|
ap.add_argument("--changelog", required=True,
|
||||||
|
help="Path to docs/changelog/vX.Y.Z.md; only read when --with-changelog is passed.")
|
||||||
|
# Default: just the APK + short caption (title + SHA-256 + repo URL +
|
||||||
|
# release URL). The per-release Persian/English blockquote reply is
|
||||||
|
# opt-in via `--with-changelog` so routine releases don't flood the
|
||||||
|
# channel with bullet-point bodies. To re-enable for a specific tag:
|
||||||
|
# set the repo variable TELEGRAM_INCLUDE_CHANGELOG=true before pushing
|
||||||
|
# the tag (the workflow converts that into --with-changelog).
|
||||||
|
ap.add_argument("--with-changelog", action="store_true",
|
||||||
|
help="Include the Persian+English changelog as a reply-threaded message.")
|
||||||
args = ap.parse_args()
|
args = ap.parse_args()
|
||||||
|
|
||||||
token = os.environ.get("BOT_TOKEN", "")
|
token = os.environ.get("BOT_TOKEN", "")
|
||||||
@@ -180,6 +189,10 @@ def main() -> int:
|
|||||||
doc_mid = send_document(token, chat_id, args.apk, caption)
|
doc_mid = send_document(token, chat_id, args.apk, caption)
|
||||||
print(f"sendDocument OK, message_id={doc_mid}")
|
print(f"sendDocument OK, message_id={doc_mid}")
|
||||||
|
|
||||||
|
if not args.with_changelog:
|
||||||
|
print("Changelog reply disabled (default). Pass --with-changelog to include.")
|
||||||
|
return 0
|
||||||
|
|
||||||
fa, en = parse_changelog(args.changelog)
|
fa, en = parse_changelog(args.changelog)
|
||||||
if not fa and not en:
|
if not fa and not en:
|
||||||
print(f"No changelog at {args.changelog}, skipping reply.")
|
print(f"No changelog at {args.changelog}, skipping reply.")
|
||||||
|
|||||||
@@ -402,6 +402,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||||
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
|
INCLUDE_CHANGELOG: ${{ vars.TELEGRAM_INCLUDE_CHANGELOG }}
|
||||||
# Python over curl/bash so we don't have to fight curl's -F
|
# Python over curl/bash so we don't have to fight curl's -F
|
||||||
# value-interpretation rules. curl treats `-F "caption=<..."`
|
# value-interpretation rules. curl treats `-F "caption=<..."`
|
||||||
# as "read the caption from file named ..." when the value
|
# as "read the caption from file named ..." when the value
|
||||||
@@ -424,8 +425,18 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# --with-changelog is opt-in. Default post is just the APK
|
||||||
|
# plus a short caption with the SHA-256, repo URL, and release
|
||||||
|
# URL — no long body. To include the Persian/English bullets
|
||||||
|
# for a specific tag, set the repo variable
|
||||||
|
# TELEGRAM_INCLUDE_CHANGELOG=true before pushing that tag.
|
||||||
|
INCLUDE_CHANGELOG_FLAG=""
|
||||||
|
if [ "${INCLUDE_CHANGELOG:-}" = "true" ]; then
|
||||||
|
INCLUDE_CHANGELOG_FLAG="--with-changelog"
|
||||||
|
fi
|
||||||
python3 .github/scripts/telegram_release_notify.py \
|
python3 .github/scripts/telegram_release_notify.py \
|
||||||
--apk "$APK" \
|
--apk "$APK" \
|
||||||
--version "$VER" \
|
--version "$VER" \
|
||||||
--repo "$GITHUB_REPOSITORY" \
|
--repo "$GITHUB_REPOSITORY" \
|
||||||
--changelog "docs/changelog/v${VER}.md"
|
--changelog "docs/changelog/v${VER}.md" \
|
||||||
|
$INCLUDE_CHANGELOG_FLAG
|
||||||
|
|||||||
Generated
+1
-1
@@ -2186,7 +2186,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mhrv-rs"
|
name = "mhrv-rs"
|
||||||
version = "1.1.4"
|
version = "1.1.5"
|
||||||
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.1.4"
|
version = "1.1.5"
|
||||||
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"
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ android {
|
|||||||
applicationId = "com.therealaleph.mhrv"
|
applicationId = "com.therealaleph.mhrv"
|
||||||
minSdk = 24 // Android 7.0 — covers 99%+ of live devices.
|
minSdk = 24 // Android 7.0 — covers 99%+ of live devices.
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 114
|
versionCode = 115
|
||||||
versionName = "1.1.4"
|
versionName = "1.1.5"
|
||||||
|
|
||||||
// Ship all four mainstream Android ABIs:
|
// Ship all four mainstream Android ABIs:
|
||||||
// - arm64-v8a — 95%+ of real-world Android phones since 2019
|
// - arm64-v8a — 95%+ of real-world Android phones since 2019
|
||||||
|
|||||||
Reference in New Issue
Block a user