fix: keep modern Android phone links on fast bands

This commit is contained in:
zhy200308
2026-08-13 09:15:11 +08:00
parent ccaaab7002
commit b5014aea5b
6 changed files with 267 additions and 114 deletions
+7 -4
View File
@@ -99,7 +99,7 @@ The sender returns `206 Partial Content`, the matching `Content-Range`, and the
For both direct-transfer directions, the Windows listener may accept connections non-blockingly for shutdown responsiveness, but each accepted file socket is switched to blocking I/O with explicit timeouts before reading or writing request bodies. This prevents `WSAEWOULDBLOCK (10035)` from turning an in-progress parallel transfer into an HTTP 500 failure.
## 6. Android → Android (`QFTPHONE2`, v0.5.0-dev4)
## 6. Android → Android (`QFTPHONE2`, v0.5.0-dev5)
The sender starts an authenticated local HTTP service and encodes only session,
port, sender identity and optional dedicated-network credentials in the QR. The
@@ -117,9 +117,12 @@ The manifest contains a bounded ordered list of `name`, `size`, `sha256` and a
server-generated fixed download path. The receiver does not accept arbitrary
paths from the QR or manifest: entry `N` must use `/qft/phone/download/N`.
Android prefers a 2.4 GHz WPA2 Wi-Fi Direct group-owner AP that accepts legacy
Wi-Fi stations. An OEM P2P failure falls back to LocalOnlyHotspot, then literal
private IPv4 endpoints on the current LAN. WPA2/WPA3
Android 10+ first creates a WPA2 Wi-Fi Direct group-owner AP with automatic band
selection, normally allowing a 5 GHz link. If no authenticated peer arrives in
12 seconds, the sender recreates the group on 2.4 GHz with the exact same SSID
and passphrase, so an older receiver's pending scan continues without a new QR.
An OEM P2P failure falls back to LocalOnlyHotspot, then literal private IPv4
endpoints on the current LAN. WPA2/WPA3
credentials are distinguished in `w[2]`. The receiver reuses the existing Range
ledger, retries and SHA-256-before-publish behavior for every file, processing
items in manifest order. Phone senders use one deterministic Range worker to