diff --git a/PRIVACY.md b/PRIVACY.md index 9d8bed0..24afd02 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -1,6 +1,6 @@ # Privacy Policy -**Last updated: October 11, 2026** +**Last updated: October 27, 2026** MegaProxy is an Android VPN client for proxy servers you choose. It does not provide a proxy service, require an account, or automatically send usage data or crash reports to the developer. @@ -14,6 +14,8 @@ connect to your servers. Passwords, imported private keys, configuration-subscri For per-app routing, MegaProxy reads the applications visible to it on your device and stores which applications you select. This information is used locally to configure routing, not uploaded as an application inventory. Profile exports can include these routing selections. +Optional strict source validation also uses Android's local socket-owner lookup to check which app owns TCP/UDP traffic. These ownership +checks and their settings stay on the device; they do not send an app inventory to a server. Connection statistics and diagnostic/crash logs are processed locally to display connection status and help troubleshoot failures. Logs contain operational events and error details; @@ -53,9 +55,12 @@ device by public IP for 24 hours, and does not add them to diagnostic logs. When you explicitly start the speed test, MegaProxy contacts `https://h3.speed.cloudflare.com/` through each available route. Cloudflare receives the route's public IP and connection metadata. MegaProxy downloads and uploads the selected 10, 25 or 50 MB per route and displays the exit IP, -country, negotiated protocol, latency and transfer speeds. The speed screen shows a temporary -in-memory log of timing, protocol selection, HTTP status and transfer measurements; it contains -no exit IP or response payloads and is discarded when the screen is closed. +country, negotiated protocol, latency and transfer speeds. Diagnostics shares a bounded +in-memory log between connection and speed tests, including timing, protocol selection, HTTP status +and transfer measurements, without exit IPs or response payloads. Leaving Diagnostics cancels speed +transfers; the shared log remains until the next connection test or process restart. It is copied +or exported only when you choose that action. Diagnostic events are also written to the rotating +local diagnostic log, which you can clear in Settings → Diagnostic log. If you configure a configuration subscription, MegaProxy downloads snapshots from the HTTPS sources you configure or their trusted replacements, automatically at the interval you choose when Android permits background work, diff --git a/README.md b/README.md index 1731af6..85207a8 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ MegaProxy is an open-source Android VPN client for HTTPS, SOCKS5, MASQUE α (HTTP/3) and SSH servers you control or trust, including **HTTPS and SSH jump hosts** for multi-hop connections. -Route all apps or selected apps through your server. +Route all apps or selected apps through your server. Optional **app ownership checks** on Android 10+ +validate TCP/UDP sources. Disabled by default, with [Standard and Advanced levels](docs/en/source-validation.md). No account, ads, analytics or remote telemetry. **Servers and credentials are not included.** ## Installation @@ -33,7 +34,8 @@ install over the existing app to preserve profiles. PR APKs are test builds. 1. Add or import a server profile. 2. Choose global routing or select apps for split tunneling. -3. Run **Test** from the main menu, then **Connect** and approve Android's VPN request. +3. Tap **Connect** and approve Android's VPN request. +4. Open **Diagnostics**: the connection test starts automatically; speed tests unlock after success. Server setup: [MegaProxyServer](https://github.com/andre487/MegaProxyServer). All guides: [English](docs/en/index.md) / [Русский](docs/ru/index.md). @@ -44,13 +46,14 @@ All guides: [English](docs/en/index.md) / [Русский](docs/ru/index.md). - HTTPS CONNECT over HTTP/1.1 or multiplexed HTTP/2; optional HTTP/3 preference with HTTPS fallback. - SOCKS5 TCP/UDP, experimental MASQUE TCP/UDP over HTTP/3 and SSH. - Per-app routing, local-network bypass, optional IPv6 and Android Always-on VPN. -- Optional [strict source validation](docs/en/source-validation.md) on Android 10+: app ownership checks and ping blocking, applied on reconnection. +- Optional [app ownership checks](docs/en/source-validation.md): Standard/Advanced UDP policies, TCP admission and ping blocking; applied on reconnection. - Multiple profiles, import/export, HTTPS configuration subscriptions and automatic failover. - DNS-over-HTTPS, optional plain TCP/UDP DNS, selectable TLS/QUIC/SSH fingerprints and custom JA3. -- Traffic totals/rates, passive TCP/QUIC metrics, connection tests, download/upload speed tests - and VPN visibility with ProxyCheck IP reputation. +- Traffic totals/rates in IEC or SI, passive TCP/QUIC metrics, connection/speed diagnostics + with a shared exportable log, and VPN visibility with ProxyCheck IP reputation. - Local diagnostic logs, encrypted stored credentials, English and Russian interfaces. +[Profiles, routing and Always-on](docs/en/profiles-and-routing.md) · [Diagnostics and measurement limits](docs/en/connection-metrics.md) · [Subscriptions](docs/en/subscriptions.md) · [App updates](docs/en/updates.md). @@ -93,26 +96,24 @@ configured subscriptions and enabled app-update checks can also run in the backg | Subscriptions | Configured HTTPS sources receive their URL/query, optional Basic Auth, app version and `android` client ID; normal MegaProxy routing applies | | App updates | Selected F-Droid or GitHub source; [metadata/download endpoints and consent](docs/en/updates.md#network-and-implementation-details) | -Speed defaults to h3 → h2 → h1; fallback only applies to initial protocol negotiation. -Latency is median time to first byte from three requests, not passive proxy RTT. Leaving the -screen cancels transfers; backgrounding alone does not. Its temporary timing log excludes IPs -and response payloads. [Details](docs/en/connection-metrics.md#test-speed-and-vpn-visibility). +Speed defaults to **h2 with h1 fallback**; h3 is optional. Fallback applies only to initial +negotiation. Latency is median time to first byte from three requests, not passive proxy RTT. +Leaving Diagnostics cancels speed transfers; Home does not. The shared log stays in memory until +the next connection test or process restart; events also enter the rotating local diagnostic log. +[Measurement and log details](docs/en/connection-metrics.md#test-speed-and-vpn-visibility). UDP probes test the proxy path, not every app's routing; fingerprint presets approximate handshakes, not complete browser behaviour. ProxyCheck verdicts and local VPN heuristics are not proof of anonymity. ## Configuration -Import MegaProxy JSON, ProxyList, FoxyProxy JSON or supported SuperProxy text. Portable JSON version 8 -uses stable profile IDs; omitted secrets preserve saved values only for unchanged endpoints and accounts; -explicit empty values clear them. -Unsupported explicit transports are rejected. [Schema and examples](config-schema/) · -[MegaProxyConfig contract](https://github.com/andre487/MegaProxyConfig). +Import MegaProxy JSON, ProxyList, FoxyProxy JSON or supported SuperProxy text. JSON transfers +profiles and portable settings; ProxyList exports standalone HTTPS/MASQUE/SOCKS5 endpoints. +Omitted secrets are kept only for unchanged servers/accounts; exported credentials and URL +tokens are sensitive. Device-local settings, including app ownership checks, stay local. +[Profiles and transfers](docs/en/profiles-and-routing.md) · [Schemas and examples](config-schema/). + Trusted [configuration subscriptions](docs/en/subscriptions.md) refresh owned profiles without replacing local profiles or interrupting current tunnels; changed live settings offer reconnect. -Exported credentials and URL tokens are sensitive. -JSON transfers profiles and portable settings, not a full app backup. MTU, DNS security approvals, -language, traffic units and update preferences stay local. ProxyList exports only standalone -HTTPS/MASQUE/SOCKS5 endpoints; use JSON for SSH, Jump and other settings. ## Limitations diff --git a/docs/en/connection-metrics.md b/docs/en/connection-metrics.md index 05d9753..fbee916 100644 --- a/docs/en/connection-metrics.md +++ b/docs/en/connection-metrics.md @@ -1,5 +1,7 @@ # Connection quality metrics +[Русский](../ru/connection-metrics.md) · [All guides](index.md) + The main screen displays payload totals/rates and passive metrics to the **first proxy**: TCP RTT/retransmits for TCP transports, QUIC RTT/loss declarations for HTTP/3. An established HTTP/3 session identifies the transport before any tunnel payload is sent. @@ -13,8 +15,8 @@ HTTP/3 session identifies the transport before any tunnel payload is sent. while the process runs; deltas are assigned to their observation time. Android suspension can delay observations. No probe traffic or wake lock is added. - Both metrics cover the phone to the **first proxy only**. SSH/HTTP2 channels and - subsequent jump hops are not counted again. Local bypass traffic and standalone - connection diagnostics are excluded from these TCP metrics. + subsequent jump hops are not counted again. SOCKS5 UDP control sockets are included, + not UDP path metrics. Local bypass traffic and standalone diagnostics are excluded. - Retransmits describe the phone's outgoing segments, not a packet-loss percentage. They cannot measure all download losses or the proxy-to-destination path. Zero retransmits does not prove a healthy end-to-end connection. Failed TCP dials @@ -90,12 +92,6 @@ log complete TLS/SSH state objects. HTTP rejection messages use numeric status codes, not server-provided reason text; connection-test providers use indices. -SOCKS5 profiles support TCP CONNECT and UDP ASSOCIATE, with optional credentials -(1–255 UTF-8 bytes each), on port 1080 by default. SOCKS5 adds no encryption or TLS -fingerprint. DNS defaults to DoH through the proxy; see [DNS modes](dns.md). The connection test also checks -end-to-end HTTP/3 over SOCKS5 UDP. TCP metrics cover proxy TCP connections, including -UDP control connections; they do not measure UDP loss or RTT. - ## Test, Speed and VPN visibility Diagnostics and VPN visibility are available in the main menu. Diagnostics starts the connection test on opening; speed checks unlock only after it passes. Speed checks require an explicit start. Both operations share a bounded log at the bottom, with copying and export to a text file. Running another connection test clears the log and locks speed checks until success. The connection test cannot be restarted during a speed check. @@ -122,13 +118,13 @@ it is not SSL-handshake time, an ICMP ping or the main screen's passive RTT. Cloudflare's `h3.speed.cloudflare.com` endpoint is used for protocol-capable measurements. The log records DNS/TCP/TLS/QUIC stages, protocol/fallback, HTTP status, connection reuse, bytes and transfer timing; no response payloads or exit IP are added to the log. -Leaving Diagnostics or recreating its UI cancels speed requests and discards speed results. The shared in-memory log remains until the next connection test or process restart. Home/background alone does not cancel requests. +Leaving Diagnostics or recreating its UI cancels speed requests and discards speed results. The shared in-memory log remains until the next connection test or process restart. Home/background alone does not cancel requests. Events are also copied to the rotating local +diagnostic log; clear or export it separately in **Settings → Diagnostic log**. ProxyCheck success is cached per public IP for 24 hours. Daily quota exhaustion, network failure and unknown response format are distinct states; unavailable routes are shown separately. Tests parse fixtures rather than contacting ProxyCheck. Full endpoint inventory: [README](../../README.md#privacy-and-security). -[Русская версия](../ru/connection-metrics.md) UDP forwarding is available with MASQUE, SOCKS5 and HTTPS when HTTP/3 is negotiated. HTTPS over TCP and SSH block ordinary UDP; DNS has its own routing rules in the diff --git a/docs/en/index.md b/docs/en/index.md index c882073..a4f4f86 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -1,84 +1,52 @@ # MegaProxy documentation -Server configurations and setup instructions have moved to the dedicated -[MegaProxyServer repository](https://github.com/andre487/MegaProxyServer). +[Русский](../ru/index.md) -Client documentation: +MegaProxy connects your Android device to servers you control or trust. Servers and credentials +are not included; server setup lives in [MegaProxyServer](https://github.com/andre487/MegaProxyServer). -- [Configuration subscriptions](subscriptions.md) -- [Strict traffic source validation](source-validation.md) -- [Installation](installation.md) -- [App updates](updates.md) -- [Connection metrics, Test, Speed and VPN visibility](connection-metrics.md) -- [SOCKS5](#socks5) -- [MASQUE α (HTTP/3), experimental](masque.md) -- [HTTPS with Jump](#https-with-jump) +## Start here -Developer documentation: +1. [Install MegaProxy](installation.md), then add or import a [server profile](profiles-and-routing.md). +2. Select all apps or choose apps in **Split tunneling**. Android 10+ also offers optional + [app ownership checks](source-validation.md), off by default. +3. Tap **Connect** and approve Android's VPN request. +4. Open **Diagnostics**: the connection test starts automatically; speed tests unlock after success. -- [Fastlane workflow](fastlane.md) -- [Testing policy and release acceptance](release-testing.md) -- [Release automation](release-automation.md) +## Guides -## SOCKS5 +| Guide | Covers | +| --- | --- | +| [Profiles and routing](profiles-and-routing.md) | HTTPS/SSH/Jump/SOCKS5, app selection, LAN bypass, failover, Always-on, import/export and local settings | +| [App ownership checks](source-validation.md) | Standard/Advanced UDP policies, TCP admission, ping blocking and compatibility limits | +| [DNS](dns.md) | DoH, plain TCP/UDP, routing and local security approvals | +| [MASQUE α](masque.md) | Experimental HTTP/3 setup, fingerprints and interoperability limits | +| [Diagnostics and metrics](connection-metrics.md) | Connection/speed checks, shared log, VPN visibility, passive metrics and MTU | +| [Configuration subscriptions](subscriptions.md) | HTTPS sources, refresh, profile ownership and reconnect notifications | +| [App updates](updates.md) | F-Droid/GitHub selection, daily checks, consent and version/signature rules | -Select **SOCKS5** and enter the server hostname and port (default 1080). Leave both -credentials empty, or enter a username and password of 1–255 UTF-8 bytes each. -SOCKS5 does not encrypt the proxy connection or credentials and does not apply a -browser TLS fingerprint. Application TLS and DoH retain their own encryption. -By default, DNS uses the selected DoH provider over proxied TCP; other UDP uses UDP ASSOCIATE. -The relay must return a reachable IP address and nonzero UDP port. Wildcard relay -addresses use the proxy bootstrap IP; hostname relays are rejected without system DNS. -Local-network bypass, app routing, IPv6 policy, failover and traffic counters apply. -TCP RTT/retransmits describe the first proxy's TCP sockets, including UDP control -connections; these are not measurements of the relayed UDP path. No SOCKS5 Jump -mode is defined. JSON uses `proxy.type: "SOCKS5"`; ProxyList accepts -`socks5://host:1080` and `socks5://user:password@host:1080`. +## SOCKS5 -For GOST, enable UDP explicitly: `gost -L 'socks5://user:password@:1080?udp=true'`. -See [GOST SOCKS5 documentation](https://gost.run/en/tutorials/protocols/socks/). -The proxy's advertised UDP relay must be reachable through its firewall/NAT. +TCP CONNECT and UDP ASSOCIATE with optional credentials. **SOCKS5 does not encrypt the +connection or password.** [Setup and relay limits](profiles-and-routing.md#socks5). ## HTTPS with Jump -Select **HTTPS with Jump** to use two HTTPS CONNECT proxies in sequence: -phone → jump proxy → destination proxy → website. Enter the destination proxy in the main -connection fields and the first hop in **Jump HTTPS proxy**. Both ports default to 443. -The jump proxy must allow CONNECT to the destination proxy hostname and port; it resolves that -hostname. Only the jump proxy is bootstrapped on the phone. Both hops use the selected TLS -fingerprint and support HTTP/1.1 and HTTP/2 CONNECT independently. - -Each hop verifies its own TLS certificate and can use separate Basic Auth credentials. The -optional shared-authentication setting reuses the destination username and password. Certificate -verification exceptions apply only to the selected hop. Connection tests and DoH use the chain; -local-network destinations still follow the existing bypass setting. A failed hop never causes -fallback to a direct connection to the destination proxy. - -JSON schema version 8 stores this mode as `proxy.type: "HTTPS_JUMP"`, with first-hop settings in -`proxy.jump`: `host`, `port`, `sameAuthentication`, `username`, `password`, and -`allowInvalidProxyCertificate`. Export passwords only when needed. Older application versions -reject version 8 files, preventing a chain from being imported as a single proxy. ProxyList -exports support single HTTPS, MASQUE and SOCKS5 proxies and omit chain profiles. - -HTTPS profiles, including HTTPS with Jump, also offer **Prefer HTTP/3 α** (off by default): try MASQUE -on the same host/UDP port, then HTTPS when unavailable. Certificate and -authentication errors remain terminal. HTTPS fallback blocks ordinary UDP and -shows a warning; explicit MASQUE profiles never fall back. JSON stores the -preference in `profiles[].proxy.preferHttp3`. With Jump, both nodes must support -MASQUE and a usable datagram MTU; otherwise the entire chain retains HTTPS. - -[Русская версия](../ru/index.md) - -[DNS: modes, routing and certificates](dns.md). +Two proxies with independent authentication and certificate checks; optional HTTP/3 requires +both hops to support MASQUE. [Setup and fallback](profiles-and-routing.md#https-and-jump). ## Fingerprints and diagnostic logs -The default HTTPS fingerprint currently follows Chrome Android; a future update may -choose a different browser preset. SSH presets control the client banner and the -preferred key-exchange, cipher and MAC ordering. These settings describe the connection -to the proxy, not the browser or other apps inside the tunnel. QUIC presets and manual -JA3 requirements are documented in [MASQUE](masque.md). +Fingerprints describe the proxy connection, not the applications inside it. The persistent +log rotates within a configurable storage limit; the Diagnostics screen has a separate shared +in-memory log. [Controls](profiles-and-routing.md#import-export-and-local-controls) · +[Measured and logged data](connection-metrics.md). -The log size setting limits the combined size of two rotating segments to 1–100 MiB. -Older events are removed as the segments rotate; clearing the log deletes both. -See [connection metrics](connection-metrics.md) for what is measured and logged. +## For developers + +- [Fastlane commands and setup](fastlane.md) +- [Testing policy and release acceptance](release-testing.md) +- [Native benchmarks and their limits](native-benchmarks.md) +- [Release automation](release-automation.md) +- [Artwork and F-Droid graphics](graphics.md) +- [Go dataplane](../../native/README.md) diff --git a/docs/en/installation.md b/docs/en/installation.md index 2dca90a..7a812c0 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -26,9 +26,9 @@ link above or search for MegaProxy (`net.megaproxy487`), and install. Grant F-Dr permission if Android requests it. In MegaProxy, allow notifications for connection controls, add/import a profile, select global or -per-app routing, and tap **Connect**. Confirm Android's VPN request. **Test**, **Speed** and -**VPN visibility** are separate main-menu screens. MegaProxy's prominent split-routing switch -and its app-list checkbox control the same selection; upstream sockets remain protected from loops. +per-app routing, and tap **Connect**. Confirm Android's VPN request. **Diagnostics** starts a connection test on opening and unlocks speed tests after success; both +share an exportable log. **Visibility** is a separate main-menu screen. For app selection and +optional Android 10+ app ownership checks, see [profiles and routing](profiles-and-routing.md). ## Update safely diff --git a/docs/en/native-benchmarks.md b/docs/en/native-benchmarks.md index 2e907b5..19147ba 100644 --- a/docs/en/native-benchmarks.md +++ b/docs/en/native-benchmarks.md @@ -79,6 +79,8 @@ they do not predict that device result. ## Encrypted transport round trips +Transport benchmarks call dialers directly, without either strict source-validation level. + Run these in order to inspect MASQUE, HTTPS and SSH separately: ```sh diff --git a/docs/en/profiles-and-routing.md b/docs/en/profiles-and-routing.md new file mode 100644 index 0000000..de813fc --- /dev/null +++ b/docs/en/profiles-and-routing.md @@ -0,0 +1,119 @@ +# Profiles and routing + +[Русский](../ru/profiles-and-routing.md) · [All guides](index.md) + +## Profiles + +Open **Settings → Profiles** to add, clone, rename, reorder or delete a server profile. +Names, country flags and colors help distinguish servers; long-press and drag to reorder, +or use the move actions. Selecting a different profile while connected reconnects the VPN. + +| Scope | Settings | +| --- | --- | +| Per profile | Transport, server/Jump addresses, credentials and trust, DNS, IPv6, HTTP/3 preference | +| Shared across profiles | App routing, LAN bypass, fingerprints, SSH authentication/keepalive/channel/rotation settings, failover | +| Device-local, not transferred | MTU, strict source validation and level, language, traffic units, update preferences; DNS security approvals stay local to each profile | + +Edits affecting a running connection need reconnection. Subscription changes leave the current +tunnel running and offer **Reconnect**; [subscription ownership and refresh rules](subscriptions.md). + +## Server types + +MegaProxy provides no servers. Obtain a profile from an operator you trust or use +[MegaProxyServer](https://github.com/andre487/MegaProxyServer) to set up your own. + +| Type | Default port | Forwarding | +| --- | --- | --- | +| HTTPS | 443 | TCP through HTTP/1.1 or multiplexed HTTP/2 CONNECT; optional HTTP/3 preference | +| SOCKS5 | 1080 | TCP CONNECT and UDP ASSOCIATE; no proxy-hop encryption | +| MASQUE α | 443 | Experimental TCP and UDP over HTTP/3; [compatibility and limits](masque.md) | +| SSH | 22 | TCP through `direct-tcpip` channels | +| HTTPS / SSH with Jump | 443 / 22 per hop | Phone → jump server → destination proxy → website | + +These are ordinary traffic capabilities; [DNS has separate routing rules](dns.md). +Application TLS remains end-to-end: MegaProxy does not install a CA or decrypt it. + +### HTTPS and Jump + +Enter the destination proxy in the main fields. For **HTTPS with Jump**, enter the first hop +in **Jump HTTPS proxy**. It must allow CONNECT to the destination hostname and port, and +resolves that hostname; only the first hop is bootstrapped on the phone. Each hop has its own +TLS verification and Basic Auth, or can reuse the same credentials. Both apply the selected +TLS fingerprint and negotiate HTTP/1.1 or HTTP/2 independently. A failed hop is never bypassed directly. + +**Prefer HTTP/3 α** is off by default. It tries MASQUE on the same host/UDP port, then HTTPS +if unavailable; authentication and certificate errors are terminal. Jump needs MASQUE and a +usable datagram MTU on both hops, otherwise the entire chain uses HTTPS/TCP. +HTTPS/TCP fallback blocks ordinary UDP and shows a warning. Explicit MASQUE never falls back. + +### SOCKS5 + +Leave both authentication fields empty, or supply a username and password of 1–255 UTF-8 bytes +each. **The proxy connection and credentials are not encrypted**; application TLS and DoH keep +their own encryption. Browser TLS fingerprints do not apply. There is no SOCKS5 Jump mode. + +For GOST, enable UDP: `gost -L 'socks5://user:password@:1080?udp=true'`. +The advertised UDP relay must be reachable through NAT/firewall. A wildcard address uses the +proxy bootstrap IP; a zero port or hostname relay is rejected without system DNS. + +### SSH and Jump + +Use password authentication or import an unencrypted private key. Passphrase-protected keys +are unsupported. Verify the SSH host-key fingerprint with your operator before trusting it; +Jump and destination pins are separate. Disabling host-key or proxy-certificate verification +permits server impersonation. + +**SSH with Jump** reaches the destination SSH server through the first SSH connection, with +separate credentials/keys or shared authentication. In **Settings → Fingerprints**, choose +automatic, password-only or key-only authentication, keepalive interval, maximum channels and +session rotation by time/traffic. Rotation waits until active channels finish. SSH presets +change the client banner and algorithm preferences, not the applications inside the tunnel. + +## Routing and app ownership checks + +In **Settings → Split tunneling**, choose all apps or select the apps that should use the VPN. +MegaProxy's own switch and its app-list checkbox are the same selection. MegaProxy is included +by default; excluding it later is preserved and makes its diagnostics, subscriptions and other +requests follow the ordinary network. LAN bypass sends supported local traffic directly; +it is not a fallback after proxy failure. IPv6 is enabled per profile. + +**Strict source validation** optionally checks which app owns TCP/UDP traffic on Android 10+. +It defaults to off and applies on reconnection. Standard caches UDP permission for up to one +second per live flow; Advanced checks every outgoing datagram. Both check new TCP connections +and block unknown owners and TUN ping. It can delay TCP setup, slow UDP or disrupt apps; +[source-check behavior and limits](source-validation.md). **Visibility** shows the active level. + +## Failover and Always-on + +**Settings → Failover** can try selected profiles or all profiles after repeated connection +failures; it defaults to off. Keep at least two eligible profiles. Authentication, certificate +and configuration errors do not trigger switching. Automatic switching can change the public +IP and apparent country; the notification identifies the active profile. +[Failure detection limits](connection-metrics.md). + +Choose a startup profile in **Settings → Always-on VPN**, then enable Always-on and, if needed, +**Block connections without VPN** in Android's VPN settings. Changing the startup profile +while Always-on is active reconnects immediately. Android/OEM background limits and explicit +force-stop still apply. Use **Settings → Battery settings** if Android restricts background VPN work. + +## Import, export and local controls + +Import MegaProxy JSON, ProxyList, FoxyProxy JSON or supported SuperProxy text. Import reports +ignored browser-only or unknown fields. JSON version 8 preserves stable profile IDs and portable +settings; explicit unsupported transports are rejected. ProxyList exports only standalone +HTTPS/MASQUE/SOCKS5 endpoints; use JSON for SSH, Jump and other settings. + +Passwords and SSH private keys are optional export choices. Omitted secrets preserve existing +values only for the same endpoint/account; explicit empty values clear them. URL query tokens +remain in JSON even when passwords are omitted. Exported credentials/keys are readable: protect +the file. A JSON export is not a full app backup. [Schemas and examples](../../config-schema/). + +**Settings → Traffic units** selects IEC (default, powers of 1024: KiB/MiB) or SI (1000: KB/MB) +for totals and speeds; traffic-limit inputs remain in MiB. Language is selected separately +from the system locale used for numbers and dates. **MTU** is device-local and applies on +reconnection; [MTU choices](connection-metrics.md#vpn-interface-mtu). + +**Diagnostic log** can be inspected, exported or cleared, with a rotating 1–100 MiB storage +limit. Feedback can attach it using the mail app you choose; review before sending. +[Diagnostics, speed and visibility](connection-metrics.md#test-speed-and-vpn-visibility) describe +the shared test log and measurement limits; [privacy policy](../../PRIVACY.md). diff --git a/docs/en/source-validation.md b/docs/en/source-validation.md index e12db30..29de8cd 100644 --- a/docs/en/source-validation.md +++ b/docs/en/source-validation.md @@ -1,47 +1,43 @@ -# Strict source validation +# App ownership checks -[Русский](../ru/source-validation.md) · [Documentation](index.md) +[Русский](../ru/source-validation.md) · [All guides](index.md) -In **Split tunneling**, optional **Strict source validation** requires Android 10+ and -applies when the VPN reconnects. It is local to the device, defaults to off and is not -included in profile exports or subscriptions. With it off, the native stack retains its -original transport and link handlers: no UID queries, validation caches or packet checks. +**Strict source validation** checks which app owns TCP/UDP traffic before forwarding it. +Enable it in **Settings → Split tunneling** on Android 10+. It defaults to off, applies on +reconnection and stays on this device: exports and subscriptions cannot enable it. +With it off, the original native path has no UID queries, validation caches or added packet checks. -Both levels check TCP ownership once before proxy/direct-LAN forwarding, adding latency -when a connection is established, rather than repeating ownership checks on TCP data. -UDP, including DNS, is checked at admission. Choose the UDP policy: +## Levels and cost -| Level | UDP ownership checks | Tradeoff | +Both levels check TCP ownership once at connection admission, including direct-LAN traffic; +they can delay connection setup but do not repeat ownership checks on TCP data. +UDP, including DNS, is checked at admission and then according to the selected level: + +| Level | Outgoing UDP checks | Tradeoff | | --- | --- | --- | -| Standard (initial choice) | Admission and the first outgoing datagram after a fixed 1-second interval | Fewer Android API calls; a reused port may temporarily inherit an old permission | -| Advanced | Admission and every outgoing datagram | Earlier detection of owner changes; more CPU work and latency | - -The Standard cache belongs only to the specific live flow. It is not shared by source port, -destination or subsequent flows. Cache hits do not extend the deadline; no background timer -is needed. Expired permission must be rechecked before forwarding the next datagram. A denied -flow is closed. This deliberately allows a stale-owner window of up to 1 second between -checks and does not offer the same protection as Advanced. Neither level makes ownership -lookup and forwarding an atomic kernel operation. - -Unknown owners and lookup exceptions are denied when checked. Split mode accepts only the -selected application UIDs; global mode requires an identifiable owner. Packages sharing a UID -cannot be distinguished. Slow new-flow lookups run outside the shared TUN loop with at most -64 concurrent admissions. At most 8 ownership lookups can enter Android/JNI concurrently, -shared across active and retiring sessions; excess requests fail closed. The query budget -is initialized only when protection is enabled. Numeric UDP addresses are prepared once -per flow. The ICMP filter reads only short headers for ordinary packets; unusually long -extension chains use one packet copy rather than repeatedly coalescing growing prefixes. -Strict UDP relays close both TUN and upstream when either direction fails, so a denied -source cannot retain an idle proxy association until the normal UDP timeout. Both levels may disrupt apps or traffic -without a visible owner, such as tethering. No direct retry bypasses a denial. - -The selected level is also device-local and applies on reconnection. Existing enabled settings -without a level migrate to Advanced, preserving their previous behavior; fresh opt-in uses -Standard. Visibility reports the actual running level, including when a level change is pending. - -IPv4/IPv6 Echo (ping) is blocked before the userspace stack; ordinary ICMP errors retain -normal processing. Fragmented ICMP and IPv6 fragments with an unidentifiable transport are -also dropped. The physical network's ICMP is unaffected. The app's TCP/HTTP diagnostics -continue working. **Visibility** reports the active tunnel's protection and whether a -reconnect is needed. This is a session status, not an attack test from another application, -and does not hide VPN interfaces or other system-visible VPN signals. +| Standard (initial choice) | First datagram after each fixed 1-second interval | Fewer Android API calls; stale permission may last up to 1 second | +| Advanced | Every datagram | Earlier detection of owner changes; more CPU work and latency | + +Standard caches permission only for that live flow, not for other destinations or later flows. +Cache hits do not extend the deadline. The next datagram after expiry requires a new check; +a denied flow is closed. **Standard does not offer the same protection as Advanced.** Neither +makes owner lookup and forwarding an atomic kernel operation. + +## Blocking and compatibility + +Unknown owners and lookup errors are denied when checked. Split routing accepts only selected +app UIDs; global routing requires an identifiable owner. Apps sharing a UID cannot be distinguished. +Both levels can disrupt traffic without a visible owner, such as tethering. No direct retry +bypasses a denial. Lookups run outside the shared TUN loop, limited to 64 concurrent admissions +and 8 Android/JNI queries shared across active and retiring sessions; excess requests are denied. + +Both levels block IPv4/IPv6 Echo (ping) in the TUN path, fragmented ICMP and IPv6 fragments with +an unidentifiable transport. Ordinary ICMP errors keep normal processing; the physical network's +ICMP is unaffected. TCP/HTTP diagnostics continue working. + +## Check the active protection + +**Visibility** shows the running level and whether a reconnect is needed, rather than merely +the saved setting. This is a session status, not an attack test from another app, and does not +hide VPN interfaces or other system-visible VPN signals. Changing the level also requires +reconnection. Previously enabled settings without a level retain Advanced; fresh opt-in uses Standard. diff --git a/docs/en/updates.md b/docs/en/updates.md index ed0e654..fafefe2 100644 --- a/docs/en/updates.md +++ b/docs/en/updates.md @@ -4,7 +4,7 @@ Open **Settings → App updates** to check manually, choose the update source, or disable automatic checks. Automatic checking is enabled by default; automatic APK downloading and silent installation -are not. These features apply to releases containing this update mechanism, not older installed APKs. +are not. ## How the source is selected @@ -22,8 +22,8 @@ Repository-link support is checked only in the installer package; an unrelated i client does not change the source. This is a capability heuristic, not proof of the APK's origin. Clients without these handlers need manual source selection. The installer identifies an app, not the original download website. Installing an APK downloaded -from the F-Droid website through a browser also selects GitHub initially. This is a default choice, -not proof of the APK's origin. Source changes do not bypass signature checks. +from the F-Droid website through a browser also selects GitHub initially. Source changes do not +bypass signature checks. ## Automatic checks and notifications diff --git a/docs/ru/connection-metrics.md b/docs/ru/connection-metrics.md index 0dbf190..6c4eac1 100644 --- a/docs/ru/connection-metrics.md +++ b/docs/ru/connection-metrics.md @@ -1,5 +1,7 @@ # Метрики качества соединения +[English](../en/connection-metrics.md) · [Все руководства](index.md) + Главный экран показывает объёмы/скорости полезных данных и пассивные метрики до **первого прокси**: TCP RTT/ретрансляции для TCP и QUIC RTT/объявленные потери для HTTP/3. Установленная HTTP/3-сессия определяет протокол ещё до передачи данных по туннелю. @@ -13,8 +15,9 @@ TCP RTT/ретрансляции для TCP и QUIC RTT/объявленные сокеты раз в секунду; прирост относится ко времени наблюдения. Приостановка процесса Android может задержать замер. Пробный трафик и wake lock не добавляются. - Обе метрики относятся только к участку **телефон → первый прокси**. Каналы SSH/HTTP2 - и последующие промежуточные серверы повторно не учитываются. Прямой локальный - трафик и отдельная диагностика соединения исключены из этих TCP-метрик. + и последующие промежуточные серверы повторно не учитываются. Управляющие TCP-сокеты + SOCKS5 UDP входят в эти метрики, но не измеряют путь UDP. Прямой локальный трафик + и отдельная диагностика соединения исключены. - Ретрансляции относятся к исходящим сегментам телефона, а не к проценту потерь. Они не измеряют все потери при скачивании и участок прокси → сайт. Ноль повторов не доказывает исправность всего пути. Неудачные TCP-подключения, не вернувшие @@ -91,12 +94,6 @@ HTTP выводится числовой статус без произволь проверки соединения обозначаются индексами. -Профили SOCKS5 поддерживают TCP CONNECT и UDP ASSOCIATE, с необязательными логином -и паролем (по 1–255 байт UTF-8) и портом 1080 по умолчанию. SOCKS5 не добавляет -шифрование или отпечаток TLS. По умолчанию DNS использует DoH через прокси; см. [режимы DNS](dns.md). Тест соединения также -проверяет HTTP/3 через UDP SOCKS5. Метрики TCP относятся к TCP-соединениям с прокси, -включая управляющие соединения UDP; они не измеряют потери или RTT UDP. - ## Тест, Скорость и Видимость VPN В главном меню доступны «Диагностика» и «Видимость VPN». При открытии «Диагностики» запускается тест соединения; после его успеха становится доступна проверка скорости, запускаемая вручную. Обе операции пишут в общий ограниченный журнал внизу экрана: его можно копировать и экспортировать в текстовый файл. Повторный тест очищает журнал и блокирует проверку скорости до успеха. Во время замера скорости повторный тест недоступен. @@ -113,6 +110,8 @@ HTTP выводится числовой статус без произволь он выбран; при обновлении он однократно добавляется в существующие списки приложений. Последующее явное исключение сохраняется. +В узких окнах «Скорость» показывает результаты основной сети и VPN отдельными блоками; в широких — сравнительной таблицей. Предпочитаемая версия HTTP допускает переход на младшие версии; правила описаны ниже. + Скорость использует 10/25/50 десятичных MB в каждом направлении каждого маршрута (10 000 000/25 000 000/50 000 000 байт). Два маршрута и оба направления могут расходовать до четырёх выбранных объёмов плюс overhead. По умолчанию выбран h2 с переходом на h1. @@ -123,16 +122,15 @@ HTTP выводится числовой статус без произволь Для измерений с выбором протокола используется `h3.speed.cloudflare.com`. Лог содержит DNS/TCP/TLS/QUIC, протокол/fallback, HTTP status, повторное соединение, байты и время передачи, без ответа сервиса и выходного IP. -Уход из «Диагностики» или пересоздание её интерфейса отменяет замер скорости и удаляет его результаты. Общий журнал в памяти сохраняется до следующего теста соединения или перезапуска процесса. Home/сворачивание само по себе не отменяет запросы. +Уход из «Диагностики» или пересоздание её интерфейса отменяет замер скорости и удаляет его результаты. Общий журнал в памяти сохраняется до следующего теста соединения или перезапуска процесса. Home/сворачивание само по себе не отменяет запросы. События также пишутся в постоянный журнал с ротацией; +очистить или экспортировать его можно отдельно в **Настройки → Диагностический журнал**. Успех ProxyCheck кешируется на 24 часа для каждого публичного IP. Дневной лимит, ошибка сети и неизвестный формат — разные состояния; недоступные маршруты показываются отдельно. Тесты используют фикстуры, не запросы к ProxyCheck. Все адреса: [README](../../README.md#privacy-and-security). -[English version](../en/connection-metrics.md) -В узких окнах «Скорость» показывает результаты основной сети и VPN отдельными блоками; в широких — сравнительной таблицей. Предпочитаемая версия HTTP допускает переход на младшие версии; правила описаны ниже. UDP передаётся через MASQUE, SOCKS5 и HTTPS при согласованном HTTP/3. HTTPS поверх TCP и SSH блокируют обычный UDP; для DNS действуют отдельные правила diff --git a/docs/ru/index.md b/docs/ru/index.md index 697a958..a4be407 100644 --- a/docs/ru/index.md +++ b/docs/ru/index.md @@ -1,80 +1,52 @@ # Документация MegaProxy -Серверные конфигурации и инструкции по настройке перенесены в отдельный репозиторий -[MegaProxyServer](https://github.com/andre487/MegaProxyServer). +[English](../en/index.md) -Документация клиента: +MegaProxy подключает Android к вашим или доверенным серверам. Серверы и данные доступа +не предоставляются; серверная настройка — в [MegaProxyServer](https://github.com/andre487/MegaProxyServer). -- [Подписка на конфигурацию](subscriptions.md) -- [Строгая проверка источника трафика](source-validation.md) -- [DNS: режимы, маршрутизация и перенос настроек](dns.md) -- [Установка](installation.md) -- [Обновления приложения](updates.md) -- [Метрики соединения, Тест, Скорость и Видимость VPN](connection-metrics.md) -- [SOCKS5](#socks5) -- [MASQUE α (HTTP/3), экспериментальная поддержка](masque.md) -- [HTTPS через Jump](#https-через-jump) +## С чего начать -JSON переносит профили и переносимые настройки, а не полный бэкап приложения. MTU, разрешения -небезопасного DNS, язык, единицы трафика и настройки обновлений остаются локальными. -ProxyList экспортирует только одиночные HTTPS/MASQUE/SOCKS5-прокси; для SSH, Jump и остальных -настроек используйте JSON. Пароли и ключи включаются отдельно; токены URL подписки остаются в JSON. +1. [Установите MegaProxy](installation.md), добавьте или импортируйте [профиль сервера](profiles-and-routing.md). +2. Выберите все приложения или укажите нужные в **Раздельном туннелировании**. На Android 10+ + доступна необязательная [проверка приложения-источника](source-validation.md), по умолчанию выключенная. +3. Нажмите **Подключиться** и подтвердите запрос VPN от Android. +4. Откройте **Диагностику**: тест подключения начнётся автоматически, после успеха станет доступен тест скорости. -Документация для разработчиков: +## Руководства -- [Работа с Fastlane](fastlane.md) -- [Регламент тестирования и приёмка релиза](release-testing.md) -- [Автоматизация релиза](release-automation.md) - -## HTTPS через Jump - -Режим **HTTPS через Jump** соединяет два обычных HTTPS CONNECT-прокси: -телефон → промежуточный прокси → конечный прокси → сайт. В основных полях укажите конечный -прокси, а в разделе промежуточного — первое звено. Порт по умолчанию для обоих — 443. -Промежуточный прокси должен разрешать CONNECT к имени и порту конечного прокси; он же разрешает -его имя. На телефоне разрешается только имя промежуточного прокси. - -Оба звена используют выбранный TLS-профиль и независимо поддерживают HTTP/1.1 и HTTP/2 CONNECT. -Проверка сертификата и данные Basic Auth настраиваются отдельно для каждого звена; можно -использовать одинаковые имя пользователя и пароль. Проверка подключения и DoH идут через -цепочку. Доступ к локальной сети определяется существующей настройкой обхода. При отказе -звена приложение не подключается к конечному прокси напрямую. - -Цепочки сохраняются в JSON версии 8 (`proxy.type: "HTTPS_JUMP"`, первое звено — `proxy.jump`). -Старые версии приложения отклоняют этот формат, чтобы не превратить цепочку в одиночный прокси. -Экспорт ProxyList пропускает цепочки, поскольку поддерживает одиночные HTTPS/MASQUE/SOCKS5-прокси. - - -[English version](../en/index.md) +| Руководство | Содержание | +| --- | --- | +| [Профили и маршрутизация](profiles-and-routing.md) | HTTPS/SSH/Jump/SOCKS5, выбор приложений, обход LAN, failover, Always-on, импорт/экспорт и локальные настройки | +| [Проверка приложения-источника](source-validation.md) | Стандартный/расширенный уровни UDP, допуск TCP, блокировка ping и ограничения совместимости | +| [DNS](dns.md) | DoH, обычный TCP/UDP, маршрутизация и локальные разрешения безопасности | +| [MASQUE α](masque.md) | Экспериментальный HTTP/3, настройка, отпечатки и ограничения совместимости | +| [Диагностика и метрики](connection-metrics.md) | Тесты подключения/скорости, общий лог, видимость VPN, пассивные метрики и MTU | +| [Подписки на конфигурацию](subscriptions.md) | HTTPS-источники, обновления, владение профилями и уведомления о переподключении | +| [Обновления приложения](updates.md) | Выбор F-Droid/GitHub, ежедневные проверки, согласие, версии и подписи | ## SOCKS5 -Выберите тип **SOCKS5**, задайте хост и порт (по умолчанию 1080). Авторизация -необязательна: оба поля пустые либо логин и пароль по 1–255 байт UTF-8 каждый. -Поддерживаются TCP CONNECT и UDP ASSOCIATE. По умолчанию DNS использует выбранный DoH через -прокси; кнопка «Тест» также проверяет HTTP/3 через UDP. Действуют маршрутизация -приложений, IPv6, обход локальных сетей, failover и статистика. +TCP CONNECT и UDP ASSOCIATE с необязательной авторизацией. **SOCKS5 не шифрует соединение +и пароль.** [Настройка и ограничения релея](profiles-and-routing.md#socks5). -SOCKS5 не шифрует соединение с прокси, включая пароль, и не использует отпечаток -TLS. TLS приложений и DoH сохраняют собственное шифрование. Jump для SOCKS5 не -предусмотрен. JSON использует `proxy.type: "SOCKS5"`; списки прокси — -`socks5://host:1080` или `socks5://user:password@host:1080`. - -В GOST UDP включается явно: `gost -L 'socks5://user:password@:1080?udp=true'`. -Объявленный сервером IP и порт UDP-релея должны быть доступны через NAT/firewall. -Нулевой IP заменяется адресом прокси; ответ с именем релея отклоняется без системного -DNS. См. [документацию GOST](https://gost.run/en/tutorials/protocols/socks/). +## HTTPS через Jump -[DNS: режимы, маршрутизация и сертификаты](dns.md). +Два прокси с отдельной авторизацией и проверкой сертификатов; для HTTP/3 нужен MASQUE на +обоих звеньях. [Настройка и fallback](profiles-and-routing.md#https-и-jump). ## Отпечатки и диагностический журнал -Отпечаток HTTPS по умолчанию сейчас соответствует Chrome Android; в будущих версиях -может быть выбран другой браузер. Профиль SSH задаёт баннер клиента и порядок предпочтения -алгоритмов обмена ключами, шифрования и MAC. Эти настройки относятся к соединению с прокси, -а не к браузеру и другим приложениям внутри туннеля. Отпечатки QUIC и требования к ручному -JA3 описаны в [руководстве MASQUE](masque.md). +Отпечатки описывают соединение с прокси, а не приложения внутри туннеля. Постоянный журнал +ротируется в заданном объёме; у экрана «Диагностика» отдельный общий журнал в памяти. +[Управление](profiles-and-routing.md#импорт-экспорт-и-локальные-настройки) · +[Измеряемые и журналируемые данные](connection-metrics.md). -Размер журнала ограничивает общий объём двух сегментов с ротацией: 1–100 MiB. -При ротации старые события удаляются; очистка журнала удаляет оба сегмента. -Подробности измерений и событий — в [описании метрик соединения](connection-metrics.md). +## Для разработчиков + +- [Команды и настройка Fastlane](fastlane.md) +- [Регламент тестирования и приёмка релиза](release-testing.md) +- [Бенчмарки ядра и границы измерений](native-benchmarks.md) +- [Автоматизация релиза](release-automation.md) +- [Графика приложения и F-Droid](graphics.md) +- [Сетевое ядро Go](../../native/README.md) diff --git a/docs/ru/installation.md b/docs/ru/installation.md index aecef9e..f35dc77 100644 --- a/docs/ru/installation.md +++ b/docs/ru/installation.md @@ -27,8 +27,9 @@ В MegaProxy разрешите уведомления для управления соединением, добавьте/импортируйте профиль, выберите глобальную маршрутизацию или приложения и нажмите **Подключиться**. Подтвердите запрос VPN. -**Тест**, **Скорость**, **Видимость VPN** — отдельные экраны главного меню. Заметный переключатель -MegaProxy в split routing и галочка приложения меняют один выбор; upstream sockets защищены от зацикливания. +**Диагностика** запускает тест подключения при открытии и после успеха открывает тест скорости; +у них общий экспортируемый журнал. **Видимость VPN** — отдельный экран главного меню. Выбор +приложений и необязательная проверка источника на Android 10+: [профили и маршрутизация](profiles-and-routing.md). ## Безопасное обновление diff --git a/docs/ru/native-benchmarks.md b/docs/ru/native-benchmarks.md index 5eca048..33f2ba4 100644 --- a/docs/ru/native-benchmarks.md +++ b/docs/ru/native-benchmarks.md @@ -80,6 +80,8 @@ go tool pprof -top -alloc_space test-results/native/profile/mobile.test test-res ## Передача через зашифрованные транспорты +Бенчмарки транспортов вызывают dialer напрямую, без обоих уровней строгой проверки источника. + Запускайте по порядку, чтобы исследовать MASQUE, HTTPS и SSH отдельно: ```sh diff --git a/docs/ru/profiles-and-routing.md b/docs/ru/profiles-and-routing.md new file mode 100644 index 0000000..3f012d3 --- /dev/null +++ b/docs/ru/profiles-and-routing.md @@ -0,0 +1,123 @@ +# Профили и маршрутизация + +[English](../en/profiles-and-routing.md) · [Все руководства](index.md) + +## Профили + +В **Настройки → Профили** можно добавить, клонировать, переименовать, переместить или удалить +профиль сервера. Имена, флаги стран и цвета помогают различать серверы. Для сортировки удерживайте +и перетаскивайте профиль или используйте действия перемещения. Выбор другого профиля при +работающем VPN переподключает его. + +| Область | Настройки | +| --- | --- | +| Профиль | Транспорт, адреса сервера/Jump, авторизация и доверие, DNS, IPv6, предпочтение HTTP/3 | +| Общие для профилей | Маршрутизация приложений, обход LAN, отпечатки, авторизация/keepalive/каналы/ротация SSH, failover | +| Локальные, не переносятся | MTU, строгая проверка источника и её уровень, язык, единицы трафика, обновления; разрешения небезопасного DNS остаются локальными для профиля | + +Изменения работающего соединения требуют переподключения. Обновление подписки сохраняет текущий +туннель и предлагает **Переподключить**; [владение профилями и правила подписок](subscriptions.md). + +## Типы серверов + +MegaProxy не предоставляет серверы. Получите профиль у доверенного оператора или настройте +свой сервер через [MegaProxyServer](https://github.com/andre487/MegaProxyServer). + +| Тип | Порт по умолчанию | Передача трафика | +| --- | --- | --- | +| HTTPS | 443 | TCP через HTTP/1.1 или мультиплексированный HTTP/2 CONNECT; опциональное предпочтение HTTP/3 | +| SOCKS5 | 1080 | TCP CONNECT и UDP ASSOCIATE; без шифрования соединения с прокси | +| MASQUE α | 443 | Экспериментальная передача TCP и UDP через HTTP/3; [совместимость и ограничения](masque.md) | +| SSH | 22 | TCP через каналы `direct-tcpip` | +| HTTPS / SSH через Jump | 443 / 22 для каждого звена | Телефон → промежуточный сервер → конечный прокси → сайт | + +Это возможности обычного трафика; [для DNS действуют отдельные правила](dns.md). +TLS приложений остаётся сквозным: MegaProxy не устанавливает CA и не расшифровывает его. + +### HTTPS и Jump + +В основных полях задайте конечный прокси. Для **HTTPS через Jump** укажите первое звено в +разделе промежуточного HTTPS-прокси. Оно должно разрешать CONNECT к имени и порту конечного +прокси и само разрешает его имя; на телефоне разрешается только имя первого звена. Для каждого +звена настраиваются проверка TLS и Basic Auth либо используются одинаковые данные авторизации. +Оба применяют выбранный отпечаток TLS и независимо согласуют HTTP/1.1 или HTTP/2. +При отказе звено никогда не обходится прямым подключением. + +**Предпочитать HTTP/3 α** по умолчанию выключено. Сначала пробуется MASQUE на том же хосте/UDP-порту, +при недоступности — HTTPS; ошибки авторизации и сертификата завершают подключение. Для Jump +нужны MASQUE и подходящий MTU датаграмм на обоих звеньях, иначе вся цепочка использует HTTPS/TCP. +При переходе на HTTPS/TCP обычный UDP блокируется с предупреждением. Явный MASQUE не использует fallback. + +### SOCKS5 + +Оставьте оба поля авторизации пустыми или задайте логин и пароль по 1–255 байт UTF-8 каждый. +**Соединение с прокси и пароль не шифруются**; TLS приложений и DoH сохраняют собственное шифрование. +Браузерные отпечатки TLS не применяются. Jump для SOCKS5 не предусмотрен. + +В GOST включите UDP: `gost -L 'socks5://user:password@:1080?udp=true'`. +Объявленный UDP-релей должен быть доступен через NAT/firewall. Нулевой адрес заменяется адресом +прокси; нулевой порт или имя релея отклоняются без системного DNS. + +### SSH и Jump + +Используйте пароль или импортируйте приватный ключ без парольной защиты. Зашифрованные ключи +не поддерживаются. Перед доверием сравните отпечаток SSH-ключа сервера с данными оператора; +для Jump и конечного сервера доверие хранится отдельно. Отключение проверки ключа SSH или +сертификата прокси допускает подмену сервера. + +**SSH через Jump** достигает конечного SSH-сервера через первое SSH-соединение, с отдельными +паролями/ключами или общей авторизацией. В **Настройки → Цифровые отпечатки** выбираются автоматическая, +только парольная или только ключевая авторизация, интервал keepalive, лимит каналов и ротация +сеанса по времени/трафику. Ротация ждёт завершения активных каналов. Профиль SSH меняет баннер +клиента и предпочтение алгоритмов, а не приложения внутри туннеля. + +## Маршрутизация и проверка приложения-источника + +В **Настройки → Раздельное туннелирование** выберите все приложения или укажите нужные. +Переключатель MegaProxy и его флажок в списке — один выбор. MegaProxy включён по умолчанию; +явное исключение сохраняется, и его диагностика, подписки и другие запросы идут по обычной сети. +Обход LAN отправляет поддерживаемый локальный трафик напрямую и не является fallback при отказе +прокси. IPv6 включается отдельно в профиле. + +**Строгая проверка источника** по желанию проверяет владельца TCP/UDP-трафика на Android 10+. +По умолчанию выключена и применяется при переподключении. Стандартный уровень кеширует разрешение +UDP до секунды для живого потока, расширенный проверяет каждую исходящую датаграмму. Оба проверяют +новые TCP-соединения, блокируют неизвестных владельцев и ping в TUN. Возможны задержки установки +TCP-соединений, замедление UDP и нарушения работы приложений; [поведение и ограничения](source-validation.md). +**Видимость VPN** показывает работающий уровень. + +## Резервные подключения и Always-on + +**Настройки → Переключение при сбое** позволяют пробовать выбранные или все профили после +повторных сбоев соединения; по умолчанию отключены. Нужны хотя бы два подходящих профиля. +Ошибки авторизации, сертификата и конфигурации не вызывают переключение. Автоматическая смена +может изменить внешний IP и видимую страну; уведомление показывает активный профиль. +[Ограничения определения сбоев](connection-metrics.md). + +В **Настройки → Постоянный VPN** выберите стартовый профиль, затем включите Always-on и при +необходимости **Блокировать соединения без VPN** в настройках VPN Android. Смена стартового +профиля при работающем Always-on переподключает его сразу. Ограничения Android/производителя +на фоновую работу и явная принудительная остановка продолжают действовать. Если Android ограничивает +VPN в фоне, откройте **Настройки → Настройки батареи**. + +## Импорт, экспорт и локальные настройки + +Импортируйте MegaProxy JSON, ProxyList, FoxyProxy JSON или поддерживаемый текст SuperProxy. +Импорт сообщает об игнорируемых браузерных и неизвестных полях. JSON версии 8 сохраняет постоянные +ID профилей и переносимые настройки; явно неподдерживаемый транспорт отклоняется. ProxyList +экспортирует только одиночные HTTPS/MASQUE/SOCKS5-прокси; для SSH, Jump и остальных настроек нужен JSON. + +Пароли и приватные ключи SSH включаются в экспорт отдельно. Пропущенные секреты сохраняют +прежние значения только для того же сервера/аккаунта; явно пустые очищают их. Токены в URL +остаются в JSON даже без паролей. Экспортированные пароли/ключи читаемы: защищайте файл. +JSON — не полный бэкап приложения. [Схемы и примеры](../../config-schema/). + +**Настройки → Единицы трафика** переключают IEC (по умолчанию, степени 1024: KiB/MiB) и SI +(1000: KB/MB) для объёмов и скорости; поля лимитов трафика остаются в MiB. Язык выбирается +отдельно от системной локали чисел и дат. **MTU** хранится локально и применяется при +переподключении; [выбор MTU](connection-metrics.md#mtu-vpn-интерфейса). + +**Диагностический журнал** можно просмотреть, экспортировать и очистить; ротация ограничивает +хранение объёмом 1–100 MiB. Обратная связь прикладывает его через выбранное почтовое приложение; +просмотрите отчёт перед отправкой. [Диагностика, скорость и видимость](connection-metrics.md#тест-скорость-и-видимость-vpn) +описывают общий журнал тестов и ограничения измерений; [политика конфиденциальности](../../PRIVACY.md). diff --git a/docs/ru/source-validation.md b/docs/ru/source-validation.md index a51ccfc..c9c7845 100644 --- a/docs/ru/source-validation.md +++ b/docs/ru/source-validation.md @@ -1,50 +1,43 @@ -# Строгая проверка источника +# Проверка приложения-источника -[English](../en/source-validation.md) · [Документация](index.md) +[English](../en/source-validation.md) · [Все руководства](index.md) -В **Раздельном туннелировании** доступна опция **Строгая проверка источника** для Android 10+. -Применяется при переподключении VPN, по умолчанию выключена, хранится локально и не входит -в экспорт профилей и подписки. При выключенной опции нативный стек использует прежние -обработчики: без запросов UID, кешей проверки и дополнительных проверок пакетов. +**Строгая проверка источника** проверяет владельца TCP/UDP-трафика перед передачей. +Включается в **Настройки → Раздельное туннелирование** на Android 10+. По умолчанию выключена, +применяется при переподключении и остаётся на устройстве: экспорт и подписки не могут её включить. +При выключенной опции прежний нативный путь не содержит запросов UID, кешей проверки и дополнительных проверок пакетов. -Оба уровня проверяют владельца TCP один раз до выхода через прокси или напрямую в LAN. -Это добавляет задержку при установлении соединения; повторных проверок на TCP-данных нет. -UDP, включая DNS, проверяется при создании потока. Для UDP доступны два уровня: +## Уровни и накладные расходы -| Уровень | Проверка владельца UDP | Компромисс | +Оба уровня проверяют владельца TCP один раз при создании соединения, включая прямой выход в LAN. +Это может задержать установление соединения, но повторных проверок на TCP-данных нет. +UDP, включая DNS, проверяется при создании потока и далее по выбранному уровню: + +| Уровень | Проверки исходящего UDP | Компромисс | | --- | --- | --- | -| Стандартный (первоначальный выбор) | При создании потока и на первой исходящей датаграмме после фиксированного интервала 1 секунду | Меньше запросов Android API; повторно использованный порт может временно наследовать прежнее разрешение | -| Расширенный | При создании потока и на каждой исходящей датаграмме | Быстрее обнаруживает смену владельца; больше нагрузка и задержка | - -Кеш стандартного уровня принадлежит только конкретному живому потоку: он не разделяется -по исходному порту, между адресатами или следующими потоками. Попадания в кеш не продлевают -срок; фоновый таймер не нужен. После истечения срока следующая датаграмма требует новой -проверки до передачи. При отказе поток закрывается. Между проверками сознательно допускается -окно устаревшего разрешения до 1 секунды; этот уровень не равнозначен расширенному. -Ни один уровень не делает запрос владельца и передачу атомарной операцией ядра. - -Неизвестный владелец и ошибка API при проверке блокируются. В split-режиме разрешены только -выбранные UID; в глобальном требуется определимый владелец. Приложения с общим UID -неразличимы. Медленные проверки новых потоков идут вне общего цикла TUN с ограничением -64 одновременных допусков. Не более 8 запросов владельца одновременно входят в Android/JNI; -лимит общий для активных и завершающихся сеансов. Лишние запросы блокируются. Бюджет -запросов создаётся только при включении защиты. Числовые адреса UDP готовятся один раз -для потока. Для обычных пакетов фильтр ICMP читает только короткие заголовки; необычно -длинная цепочка расширений использует одну копию пакета вместо повторного объединения -растущих префиксов. -При ошибке любого направления строгий UDP-relay закрывает TUN и upstream, чтобы отказ -владельцу не удерживал простаивающую ассоциацию с прокси до обычного UDP-таймаута. Оба уровня могут нарушать работу -приложений и трафика без определимого владельца, например раздачи интернета. -Прямого обхода блокировки нет. - -Уровень тоже хранится локально и применяется при переподключении. Ранее включённая опция -без указанного уровня переносится в расширенный режим с сохранением поведения; -при первом включении выбирается стандартный. Видимость показывает фактически работающий -уровень, в том числе когда его смена ещё ожидает переподключения. - -Echo (ping) IPv4/IPv6 блокируется до userspace-стека; обычные ошибки ICMP обрабатываются -штатно. Фрагментированный ICMP и IPv6-фрагменты с неопределимым транспортом также блокируются. -ICMP физического соединения не затрагивается. TCP/HTTP-диагностика приложения продолжает -работать. **Проверка видимости** показывает защиту текущего туннеля и необходимость -переподключения. Это статус сеанса, а не проверка атаки из другого приложения; -он не скрывает VPN-интерфейсы и другие системные признаки VPN. +| Стандартный (первоначальный выбор) | Первая датаграмма после каждого фиксированного интервала 1 секунду | Меньше запросов Android API; устаревшее разрешение может действовать до 1 секунды | +| Расширенный | Каждая датаграмма | Быстрее обнаруживает смену владельца; больше нагрузка и задержка | + +Стандартный уровень кеширует разрешение только для живого потока, а не для других адресатов +или следующих потоков. Попадания в кеш не продлевают срок. После истечения срока следующая +датаграмма требует новой проверки; при отказе поток закрывается. **Стандартный уровень не +равнозначен расширенному по защите.** Ни один не делает запрос владельца и передачу атомарной операцией ядра. + +## Блокировка и совместимость + +Неизвестный владелец и ошибка API при проверке блокируются. При раздельной маршрутизации разрешены +только выбранные UID; в глобальном режиме требуется определимый владелец. Приложения с общим UID +неразличимы. Оба уровня могут мешать трафику без определимого владельца, например раздаче интернета. +Прямого обхода отказа нет. Запросы идут вне общего цикла TUN: не более 64 одновременных допусков +и 8 запросов Android/JNI для активных и завершающихся сеансов; превышение лимита блокируется. + +Оба уровня блокируют Echo (ping) IPv4/IPv6 в TUN, фрагментированный ICMP и IPv6-фрагменты +с неопределимым транспортом. Обычные ошибки ICMP обрабатываются штатно; ICMP физического +соединения не затрагивается. TCP/HTTP-диагностика продолжает работать. + +## Как проверить работающую защиту + +**Видимость VPN** показывает действующий уровень и необходимость переподключения, а не +только сохранённую настройку. Это статус сеанса, не тест атаки из другого приложения; он не +скрывает VPN-интерфейсы и другие системные признаки VPN. Смена уровня тоже требует переподключения. +Ранее включённая опция без уровня сохраняет расширенный режим; при первом включении выбирается стандартный. diff --git a/docs/ru/updates.md b/docs/ru/updates.md index 613ed2c..c5cbbe3 100644 --- a/docs/ru/updates.md +++ b/docs/ru/updates.md @@ -4,8 +4,7 @@ Откройте **Настройки → Обновления приложения**, чтобы проверить новую версию, выбрать источник или отключить автоматическую проверку. Автопроверка включена по умолчанию; автоматическое скачивание -APK и установка без подтверждения не включены. Этот механизм работает в релизах, содержащих его, -а не в ранее установленных старых APK. +APK и установка без подтверждения не включены. ## Выбор источника @@ -22,8 +21,8 @@ APK и установка без подтверждения не включен Поддержка ссылок проверяется только у установщика: наличие другого клиента F-Droid на устройстве не меняет источник. Это эвристика возможностей, не доказательство происхождения APK. Для клиентов без этих обработчиков нужен ручной выбор. Имя установщика не указывает сайт скачивания. APK с сайта F-Droid, открытый -через браузер, также первоначально получает источник GitHub. Это выбор по умолчанию, а не -доказательство происхождения APK. Смена источника не отменяет проверку подписи. +через браузер, также первоначально получает источник GitHub. Смена источника не отменяет +проверку подписи. ## Автопроверка и уведомления diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index b55d024..4b680f8 100644 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -1,7 +1,13 @@ -

VPN client for your HTTPS, SOCKS5, MASQUE α (HTTP/3) or SSH server. Supports HTTPS/SSH jump hosts with separate credentials per hop, split tunneling and DoH.

+

Open-source VPN client for your HTTPS, SOCKS5, MASQUE α (HTTP/3) or SSH server. HTTPS/SSH Jump supports two hops with separate authentication and trust checks. Servers and credentials are not included.

-

Profiles, import/export, configuration subscriptions, automatic failover, connection and speed tests, VPN visibility and IP reputation.

+

Optional app ownership checks on Android 10+: Standard and Advanced levels check TCP/UDP sources and block ping inside the VPN. Off by default; applies on reconnection. May delay TCP setup, slow UDP or disrupt apps whose owner cannot be identified.

-

No account, ads or analytics. Credentials are encrypted at rest; logs stay local unless shared. Diagnostics contact external services.

+ -

Servers are not included. SOCKS5 does not encrypt its connection or credentials. MASQUE is experimental.

+

No account, ads or analytics. Passwords and private keys are encrypted at rest; logs stay local unless shared. Diagnostics, enabled app-update checks and configured subscriptions contact external services. SOCKS5 does not encrypt its connection or credentials. MASQUE is experimental.

diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt index cf2315b..73391b5 100644 --- a/fastlane/metadata/android/en-US/short_description.txt +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -1 +1 @@ -VPN with HTTPS/SSH jump hosts, SOCKS5, MASQUE and split tunneling +VPN with HTTPS/SSH Jump, SOCKS5, MASQUE and optional app ownership checks diff --git a/fastlane/metadata/android/ru-RU/full_description.txt b/fastlane/metadata/android/ru-RU/full_description.txt index a7bb9e4..f6f98b3 100644 --- a/fastlane/metadata/android/ru-RU/full_description.txt +++ b/fastlane/metadata/android/ru-RU/full_description.txt @@ -1,7 +1,13 @@ -

VPN-клиент для вашего HTTPS-, SOCKS5-, MASQUE α (HTTP/3)- или SSH-сервера. Jump host для HTTPS/SSH с отдельной авторизацией узлов, выбор приложений и DoH.

+

Открытый VPN-клиент для вашего HTTPS-, SOCKS5-, MASQUE α (HTTP/3)- или SSH-сервера. HTTPS/SSH через Jump поддерживает два звена с отдельной авторизацией и проверкой доверия. Серверы и данные доступа не предоставляются.

-

Профили, импорт/экспорт, подписки на конфигурацию, резервные подключения, тесты соединения и скорости, видимость VPN и репутация IP.

+

Необязательная проверка приложения-источника на Android 10+: стандартный и расширенный уровни проверяют источники TCP/UDP и блокируют ping внутри VPN. По умолчанию выключена, применяется при переподключении. Может задерживать установление TCP-соединений, замедлять UDP и мешать приложениям с неопределимым владельцем трафика.

-

Без регистрации, рекламы и аналитики. Пароли и ключи зашифрованы при хранении; журналы локальны до отправки по вашему выбору. Диагностика обращается к внешним сервисам.

+ -

Серверы не предоставляются. SOCKS5 не шифрует соединение и пароль. MASQUE экспериментален.

+

Без регистрации, рекламы и аналитики. Пароли и приватные ключи зашифрованы при хранении, журналы локальны до отправки по вашему выбору. Диагностика, включённые проверки обновлений и настроенные подписки обращаются к внешним сервисам. SOCKS5 не шифрует соединение и пароль. MASQUE экспериментален.

diff --git a/fastlane/metadata/android/ru-RU/short_description.txt b/fastlane/metadata/android/ru-RU/short_description.txt index e525b99..0131590 100644 --- a/fastlane/metadata/android/ru-RU/short_description.txt +++ b/fastlane/metadata/android/ru-RU/short_description.txt @@ -1 +1 @@ -VPN с jump host для HTTPS/SSH, SOCKS5, MASQUE и выбором приложений +VPN: HTTPS/SSH Jump, SOCKS5, MASQUE и контроль приложения-источника diff --git a/native/README.md b/native/README.md index 6c8bfa6..b8056f9 100644 --- a/native/README.md +++ b/native/README.md @@ -7,10 +7,11 @@ HTTPS with Jump nests a second HTTPS CONNECT transport inside the first, with in verification, authentication and HTTP/2 sessions. Only the jump is dialed directly; it resolves the destination proxy hostname. Application traffic counters exclude the intermediate tunnel. SSH with Jump creates a nested SSH client through the jump session. SSH transports support TCP; -DNS is carried over DoH, while arbitrary UDP (including QUIC) is intentionally blocked. +arbitrary UDP (including QUIC) is blocked. DNS defaults to DoH; optional plain TCP/UDP DNS +follows the separate [DNS routing rules](../docs/en/dns.md). `Start` borrows the JVM-owned TUN descriptor for the call and duplicates it with CLOEXEC on entry. Go closes only its own duplicate; Java retains responsibility for the descriptor it passed. -The bridge passes the Android TUN MTU explicitly (currently 1400). Generated gomobile types are +The bridge passes the configured Android TUN MTU explicitly (default 1400). Generated gomobile types are compile-time JVM dependencies, so signature changes must compile on both sides. Use the supported Fastlane commands from the repository root: