Skip to content

Commit 5a108f7

Browse files
authored
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.
1 parent f45bc2f commit 5a108f7

5 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/scripts/telegram_release_notify.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,16 @@ def main() -> int:
159159
ap.add_argument("--apk", required=True)
160160
ap.add_argument("--version", required=True)
161161
ap.add_argument("--repo", required=True)
162-
ap.add_argument("--changelog", required=True)
162+
ap.add_argument("--changelog", required=True,
163+
help="Path to docs/changelog/vX.Y.Z.md; only read when --with-changelog is passed.")
164+
# Default: just the APK + short caption (title + SHA-256 + repo URL +
165+
# release URL). The per-release Persian/English blockquote reply is
166+
# opt-in via `--with-changelog` so routine releases don't flood the
167+
# channel with bullet-point bodies. To re-enable for a specific tag:
168+
# set the repo variable TELEGRAM_INCLUDE_CHANGELOG=true before pushing
169+
# the tag (the workflow converts that into --with-changelog).
170+
ap.add_argument("--with-changelog", action="store_true",
171+
help="Include the Persian+English changelog as a reply-threaded message.")
163172
args = ap.parse_args()
164173

165174
token = os.environ.get("BOT_TOKEN", "")
@@ -180,6 +189,10 @@ def main() -> int:
180189
doc_mid = send_document(token, chat_id, args.apk, caption)
181190
print(f"sendDocument OK, message_id={doc_mid}")
182191

192+
if not args.with_changelog:
193+
print("Changelog reply disabled (default). Pass --with-changelog to include.")
194+
return 0
195+
183196
fa, en = parse_changelog(args.changelog)
184197
if not fa and not en:
185198
print(f"No changelog at {args.changelog}, skipping reply.")

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ jobs:
402402
env:
403403
BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
404404
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
405+
INCLUDE_CHANGELOG: ${{ vars.TELEGRAM_INCLUDE_CHANGELOG }}
405406
# Python over curl/bash so we don't have to fight curl's -F
406407
# value-interpretation rules. curl treats `-F "caption=<..."`
407408
# as "read the caption from file named ..." when the value
@@ -424,8 +425,18 @@ jobs:
424425
exit 1
425426
fi
426427
428+
# --with-changelog is opt-in. Default post is just the APK
429+
# plus a short caption with the SHA-256, repo URL, and release
430+
# URL — no long body. To include the Persian/English bullets
431+
# for a specific tag, set the repo variable
432+
# TELEGRAM_INCLUDE_CHANGELOG=true before pushing that tag.
433+
INCLUDE_CHANGELOG_FLAG=""
434+
if [ "${INCLUDE_CHANGELOG:-}" = "true" ]; then
435+
INCLUDE_CHANGELOG_FLAG="--with-changelog"
436+
fi
427437
python3 .github/scripts/telegram_release_notify.py \
428438
--apk "$APK" \
429439
--version "$VER" \
430440
--repo "$GITHUB_REPOSITORY" \
431-
--changelog "docs/changelog/v${VER}.md"
441+
--changelog "docs/changelog/v${VER}.md" \
442+
$INCLUDE_CHANGELOG_FLAG

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.1.4"
3+
version = "1.1.5"
44
edition = "2021"
55
description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting"
66
license = "MIT"

android/app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ android {
1414
applicationId = "com.therealaleph.mhrv"
1515
minSdk = 24 // Android 7.0 — covers 99%+ of live devices.
1616
targetSdk = 34
17-
versionCode = 114
18-
versionName = "1.1.4"
17+
versionCode = 115
18+
versionName = "1.1.5"
1919

2020
// Ship all four mainstream Android ABIs:
2121
// - arm64-v8a — 95%+ of real-world Android phones since 2019

0 commit comments

Comments
 (0)