mirror of
https://github.com/therealaleph/MasterHttpRelayVPN-RUST.git
synced 2026-05-18 06:44:35 +03:00
e7326ee5af
Move from yyoyoian-pixel/tun2proxy fork (with patched JNI signature) to canonical tun2proxy 0.7.21 from crates.io with feature flag "udpgw". Cargo.toml [patch.crates-io] section removed entirely. The Android side now resolves tun2proxy_run_with_cli_args at runtime via dlsym from libtun2proxy.so, which is the upstream maintainer's recommended path for callers that need full CLI flexibility. mhrv-rs builds the CLI string in MhrvVpnService and passes it through Native.runTun2proxy → src/android_jni.rs → dlsym → tun2proxy. Future tun2proxy upgrades are now a single Cargo version bump. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.9 KiB
1.9 KiB
• حذف نیاز به فورک tun2proxy (#271): v1.7.0 از یه فورک شخصی tun2proxy (با پارامتر udpgw_server در JNI) استفاده میکرد چون upstream هنوز feature flag udpgw رو منتشر نکرده بود. حالا که tun2proxy 0.7.21 رسماً روی crates.io با feature flag udpgw در دسترسه + maintainer toolchain CLI API رو بهعنوان مسیر صحیح برای کاربران Android معرفی کرد، فورک رو حذف میکنیم. روش جدید: mhrv-rs از طریق dlsym در زمان اجرا تابع tun2proxy_run_with_cli_args رو از libtun2proxy.so resolve میکنه و CLI args ساده میفرسته (--proxy socks5://127.0.0.1:1081 --tun-fd <fd> --udpgw-server 198.18.0.1:7300 ...). نه فورک، نه [patch.crates-io]، نه commit SHA. وقتی tun2proxy update میشه، فقط نسخهٔ crates.io رو bump میکنیم. ممنون از @yyoyoian-pixel
• Drop the tun2proxy fork dependency (#271): v1.7.0 used a personal fork of tun2proxy (with a udpgw_server parameter added to the JNI signature) because upstream hadn't published the udpgw feature flag yet. With tun2proxy 0.7.21 now on crates.io with udpgw feature flag, and the upstream maintainer pointing callers at the C-style CLI API as the recommended path for Android, we drop the fork. New approach: mhrv-rs resolves tun2proxy_run_with_cli_args from libtun2proxy.so at runtime via dlsym and passes a simple CLI string (--proxy socks5://127.0.0.1:1081 --tun-fd <fd> --udpgw-server 198.18.0.1:7300 ...). No fork, no [patch.crates-io], no pinned SHA. Future tun2proxy upgrades are a single Cargo version bump. Thanks @yyoyoian-pixel