10 KiB
Build and validation status
This source bundle contains the DragonTCP + tunnel-only SSH + embedded UDPGW + Android SOCKS5 integration.
Validated in the integration environment
gofmtclean for the modified Go sources.go test ./...passes for all DragonTCP packages using local API-compatible compile/test stubs forgolang.org/x/crypto/sshandbcryptbecause this sandbox cannot reach the public Go module mirror.go vet ./...passes under the same compile-only dependency stub setup.- Android
ProxyClient.kt,SocketProtector.kt, andProxyProfile.ktcompile with the installed Kotlin compiler. build_core.sh,build_all.sh, andandroid/build_apk.shpassbash -nsyntax validation.- UDPGW has a local UDP echo relay test.
- SOCKS5 tests cover IPv4 UDP framing, BadVPN/UDPGW framing, domain rejection for UDP leak prevention, and
UDP ASSOCIATE 0.0.0.0:0. - Internal-target tests verify the UDPGW alias is reachable only from an authenticated SSH session, not directly from a raw DragonTCP stream.
- The native
--ssh-menuuser manager was exercised end-to-end with scripted create/list/renew/reset/delete operations; user passwords are auto-generated and only bcrypt hashes are persisted.
Not produced in this sandbox
No prebuilt DragonTCP binaries, .so, APK, generated SSH host key, user database, or signing keystore are included. This is intentional so an old pre-SSH binary cannot be mistaken for the integrated build.
A real link against golang.org/x/crypto v0.31.0 could not be performed here because outbound DNS/module fetching is blocked. The full Android APK also could not be built because an Android SDK/platform is not installed in this sandbox.
Build on a normal development machine
From the project root:
./build_all.sh
build_core.sh first builds the Go client/server and Android arm64 native core. android/build_apk.sh then builds and signs the APK. The first Go build needs normal network access if golang.org/x/crypto v0.31.0 is not already present in the module cache.
For server-only/client-only binaries:
./build_core.sh
The generated artifacts go under bin/ and android/lib/arm64-v8a/; SHA256SUMS is regenerated when sha256sum is available.
SSH throughput/logging fix validation
- Added a bounded SSH carrier write combiner: up to 1 MiB per DragonTCP write with a 4 MiB queue and 2 ms combine window.
- Added server-side bulk downstream coalescing only for the reserved internal SSH carrier: target goal 512 KiB, maximum coalescing window 25 ms.
- SSH handshake/authentication readiness remains implemented in the Go client for CLI use; the current Android app does not enable SSH mode.
- Server logs successful SSH connect/disconnect and rejected/auth-failed sessions.
- Unit tests verify ordered SSH write combining and 512 KiB downstream coalescing from 32 KiB SSH-like bursts.
go test ./...,go vet ./..., andgo test -race ./cmd/dragontcp-client ./cmd/dragontcp-serverpass using the same local API-compatible x/crypto stubs described above.
Staged startup / fake-iperf calibration validation
- Normal Android B/BP startup uses SHA-256-masked payload framing; clear-payload mode is not exposed by the app.
- Startup has an explicit
AUTH -> CALIBRATION -> ACTIVEboundary; CLI SSH starts only after ACTIVE, while Android stays direct-only. - Added server-backed synthetic throughput probes: upload pipelines full candidate records to the server; download streams full candidate records from the server. No external test file is required.
- Legacy CLI MAX FIRST remains available, but Android now uses ascending fake-iperf calibration and does not expose the MAX FIRST option.
- A socket I/O timeout is treated as a dead physical connection and does not trigger the chunk-size sweep.
- The validated upload/download sizes become the runtime adaptation ceilings for the VPN session.
- Tests cover full UP/DW burst validation, masked-profile discovery, max-first compatibility, Go race checks, and server-side probe handling.
Ascending Android calibration / direct-only app update
- Android no longer exposes or starts SSH mode. SSH, SOCKS5 and UDPGW source remains in the Go project/server for future use.
- Android no longer exposes MAX FIRST. It always requests ascending startup calibration.
- Fake-iperf calibration is sequential UP then DW to avoid self-induced probe bursts.
- Each direction proves the 32-byte minimum, grows by 4x toward the fixed 1 MiB maximum, then binary-refines the first failed boundary to 32-byte precision.
- Runtime recoverable transfer failures reduce the active chunk immediately by 200 bytes; connection-level I/O timeouts still kill the physical tunnel and are not treated as size failures.
- The Android main screen contains persistent LIVE CHUNK SIZE indicators for UP and DW. They update from calibration candidates, the selected ACTIVE profile, and later adaptive chunk changes without opening the log screen.
- Android does not expose clear payload; normal B/BP discovery is masked-only. The Go CLI force-clear path is retained for compatibility/testing.
go test ./...andgo vet ./...pass with the local API-compatible x/crypto stubs.go test -race ./cmd/dragontcp-client ./cmd/dragontcp-serveralso passes after widening the retained SSH-only 512 KiB coalescing window to 25 ms for race-instrumented scheduling.
X calibration / 32-byte refinement / Android masked-only cleanup
- X now runs the same staged UP/DW fake-iperf calibration as B/BP using native X
CIPERFUP/CIPERFDWcommands on the real UP/OK + XOR wire. - Ascending calibration starts at 32 bytes, grows by 4x toward 1 MiB, then refines the first good/bad boundary to 32-byte precision independently for UP and DW.
- Calibration now confirms boundary decisions with a 2-of-3 majority. The first failed ascent candidate is retried on fresh connections, and all fine-refinement candidates are confirmed. This prevents a single transient failure from producing unstable 1 KiB/2 KiB results. I/O timeouts remain inconclusive connection failures rather than chunk-size failures.
- Android no longer exposes the CLEAR PAYLOAD control. Normal B/BP discovery uses SHA-256-masked payload profiles only; the explicit Go CLI force-clear flag is retained solely for compatibility/testing.
- Android no longer exposes the RECORD SIZE (BYTES) Max/Min block. Its calibration range is fixed internally to 32 bytes through 1 MiB and the live UP/DW indicators show the calibrated/runtime sizes.
go test ./...,go vet ./..., and race tests for client/server/X calibration pass using the local API-compatible x/crypto stubs.
Single-poller calibration fix
- B/BP fake-iperf UP: exactly one outstanding calibration record per candidate.
- B/BP fake-iperf DW: server returns exactly one calibration record per candidate.
- X UP/DW: exactly one transaction per candidate.
- 2-of-3 confirmation remains sequential on fresh connections.
- Runtime poller/concurrency settings are unchanged and do not participate in calibration.
Validation for single-poller calibration: go test ./..., go vet ./..., targeted go test -race, and client/server build checks passed using the local API-compatible x/crypto stub because this environment cannot fetch the upstream module.
X calibrated-chunk runtime lock
- After X UP/DW fake-iperf calibration completes, the selected upload and download chunk sizes are fixed for that X tunnel.
- X runtime
Success()cannot grow a calibrated chunk and runtimeFailure()cannot shrink it. This removes the oldadaptive ... chunkoscillation after calibration. - Failed X physical transactions reconnect/retry at the same calibrated chunk size; repeated failures are bounded so a dead path cannot loop forever.
- The X ACTIVE log now includes
calibrated_locked=true runtime_adaptive=false. - B/BP runtime behavior is unchanged by this fix.
go test ./...,go vet ./..., andgo test -race ./internal/xorchunk ./cmd/dragontcp-clientpass using the local API-compatible x/crypto stub.
Full-range header scan (superseded)
The earlier 0x00-0xFF covered scan has been removed from normal Android discovery. See Valid direct-mask scan update below. The server keeps cover-profile decoding only for backward compatibility and CLI-only compatibility modes.
Android port-range / working-port source update
- Android CONNECTION now has
Port startandPort end; existing single-port installs migrate the old Port value into both fields. - The Go client accepts
--server-port-start/--server-port-endwhile retaining--server-portas the single-port compatibility fallback. - Port discovery is ascending and validates one port candidate at a time. TCP-open alone is not enough: the candidate must pass the real DragonTCP wire/header probe before selection.
- The selected endpoint is locked before UP/DW fake-iperf calibration begins. Reconnects in that client process continue using the selected endpoint.
- Android's
LIVE TRANSPORTcard now showsWORKING PORT,UP CHUNK, andDW CHUNKindependently of the log screen. - Port-scan telemetry uses
[D-TCP] phase=PORT_SCAN ...; Android showsTESTING PORTSuntil a DragonTCP port is selected. - This package is source-only per request; no APK/native binaries were rebuilt for this update.
Valid direct-mask scan update
- Normal Android masked discovery no longer scans arbitrary covered
0x00-0xFFprofiles. - B and BP test exactly 32 direct-valid masks:
00,08,10,...,F8(mask & 7 == 0). - X tests exactly the 96 direct-valid masks for which
('U' ^ mask) & 7 >= 5. - Auto mode interleaves those valid sets in numeric order: 32 B + 32 BP + 96 X = 160 candidates maximum.
- BP direct framing now carries its selected non-zero header mask without requiring the cover preface, matching B's direct-mask behavior.
- Normal Android discovery remains SHA-256 payload-masked; the CLI-only forced-clear compatibility profiles are unchanged.
- Client tests verify that no normal candidate uses an invalid mask or a cover profile.
- Validation for this update:
go test ./cmd/dragontcp-client ./internal/xorchunk ./internal/wire ./internal/protocol ./internal/cover,go vetfor the same client/internal packages, andgo test -race ./cmd/dragontcp-client ./internal/xorchunkpass using the local API-compatible x/crypto test stub. The productioncore/go.modis unchanged and still points to the realgolang.org/x/cryptomodule. - Source-only package; no APK was built for this update.