Skip to content

Add optional userspace EasyTier connections to server profiles - #9

Open
Hahaxiong838383 wants to merge 1 commit into
xintaofei:mainfrom
Hahaxiong838383:feat/optional-easytier-transport
Open

Hahaxiong838383 wants to merge 1 commit into
xintaofei:mainfrom
Hahaxiong838383:feat/optional-easytier-transport

Conversation

@Hahaxiong838383

Copy link
Copy Markdown

Adds an optional embedded EasyTier connection to the existing server profiles, so the Android client can reach a private Codeg server using a user-configured mesh. The existing selected-server persistence restores that connection at startup. A bounded connection screen verifies authenticated /api/health before opening the main app and offers retry or server selection on failure.

The native engine runs in userspace and forwards only Codeg HTTP/WebSocket traffic through loopback. Each connection gets its own local endpoint; switching servers stops the previous instance. Mesh passwords use the existing Android Keystore-backed secret store. Connection revisions invalidate cached clients after token/password edits, while editing another profile leaves the selected connection running. The server editor supports direct connections, mesh settings, and connection tests.

The standard build remains available. Build the optional transport with -PeasyTier=true; maintainers can set the repository variable CODEG_EASYTIER=true to include it in official releases. The native build uses public EasyTier revision 4a10d1c2b93beae60ff0d6d3329463c1ad6928b2, with its Android logger disabled. There are no bundled server profiles or runtime credentials. The optional release workflow publishes the corresponding engine source and dependency notices, and the app includes LGPL/GPL texts plus the resolved native dependency notices in its license screen. Build checks bind the ABI set and library hashes to the build manifest and reject incomplete or unresolved license-pointer records.

Validation completed:

  • :app:check, :app:assembleDebug, and :app:assembleRelease with the default build and with -PeasyTier=true; each configuration passes 191 debug and 191 release JVM tests.
  • API 34 emulator with ARM64 translation: the actual app restores an encrypted mesh profile, opens the main shell, receives nonempty authenticated HTTP responses, and receives a Pong through its production event WebSocket client. Force-stop/cold-start and enabled/disabled server-editor UI checks also passed.
  • The fixed public JNI library transfers a 106,496-byte HTTP payload and a 6,400-byte WebSocket echo over a synthetic mesh-only destination. Stopping the native instance closes forwarding, and stopping the remote peer breaks the data path.
  • Final ARM64 APKs contain the verified JNI bytes; all packaged native ELF load segments and APK native-library ZIP alignment satisfy 16 KiB alignment.
  • Three Python license-source regressions pass. A negative control replays a real raw-GitHub symlink stub with a matching source hash: the generator rejects it even when the missing-notice count is zero. The final native report contains 454 packages, 340 distinct notice texts, and no unresolved pointers.

Current scope: mesh URLs use HTTP with an IPv4 address and explicit port. HTTPS profiles use the direct transport. Local native/runtime validation covers ARM64; the release workflow defines the other Android ABIs, which have not been locally built or tested on physical devices. The selected native instance is process-scoped and can remain after leaving the Activity; there is no foreground service or background-connectivity guarantee. Physical-phone, 5G, and long-running background acceptance remain for maintainer/device testing. Local release packaging is unsigned; official signing stays in the existing release workflow.

Build, replacement-library, license-source, and reproducible fixture instructions are in docs/easytier-native-build.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant