Compare commits

..
2 Commits
Author SHA1 Message Date
Codex 73cc8c8181 Document public Gitea update mirror
Gitea Smoke / smoke (push) Successful in 0s
Gitea Android APK / build (push) Successful in 11m44s
2026-07-06 08:16:13 +00:00
Codex b64ef21831 Add Tailscale API probe action
Gitea Smoke / smoke (push) Successful in 0s
Gitea Android APK / build (push) Successful in 11m40s
2026-07-06 07:14:01 +00:00
2 changed files with 69 additions and 27 deletions
+14 -6
View File
@@ -9,6 +9,8 @@ APIs directly:
- server URL management for Tailscale `100.x.y.z:3000` APIs - server URL management for Tailscale `100.x.y.z:3000` APIs
- quick server selectors for `100.89.0.2`, `100.89.0.4`, `100.89.0.9`, - quick server selectors for `100.89.0.2`, `100.89.0.4`, `100.89.0.9`,
`100.89.0.11`, and `100.89.0.116` `100.89.0.11`, and `100.89.0.116`
- one-tap probe for the preset Tailscale APIs, showing health/version and
session counts
- native tmux session list - native tmux session list
- create, rename, send command, split pane, select pane, kill pane, pin, mute, - create, rename, send command, split pane, select pane, kill pane, pin, mute,
and kill session through HTTP API and kill session through HTTP API
@@ -80,10 +82,10 @@ https://github.com/neatstudio/tmux-browser-android/releases/latest/download/tmux
https://github.com/neatstudio/tmux-browser-android/releases/latest/download/latest.json https://github.com/neatstudio/tmux-browser-android/releases/latest/download/latest.json
``` ```
Those GitHub links are the stable public install/update channel. Gitea releases Those GitHub links are the primary public install/update channel. Gitea releases
are mirrored for internal tracking, but the current Gitea org/repo visibility are mirrored as a second public source. This Gitea instance does not support the
keeps anonymous release downloads behind login, so phones should use GitHub for GitHub-style `/releases/latest/download/...` URL, so the app uses the Gitea
no-login install and in-app updates. Release API as the stable Gitea update entrypoint.
Plain branch builds only create Actions artifacts; they are useful for CI Plain branch builds only create Actions artifacts; they are useful for CI
verification, but releases are the stable download/update channel. verification, but releases are the stable download/update channel.
@@ -141,13 +143,19 @@ https://github.com/neatstudio/tmux-browser-android/releases/latest/download/tmux
``` ```
The app tries the selected update source first, then falls back to the GitHub The app tries the selected update source first, then falls back to the GitHub
manifest and the Gitea release API. GitHub is the reliable no-login source today. manifest and the Gitea release API. The Gitea API endpoint is:
The Gitea API endpoint is:
```text ```text
https://gitea.neatcn.com/api/v1/repos/tmux/tmux-browser-android/releases/latest https://gitea.neatcn.com/api/v1/repos/tmux/tmux-browser-android/releases/latest
``` ```
Gitea tag-specific assets are also public, for example:
```text
https://gitea.neatcn.com/tmux/tmux-browser-android/releases/download/v0.1.7/latest.json
https://gitea.neatcn.com/tmux/tmux-browser-android/releases/download/v0.1.7/tmux-android.apk
```
In the app: In the app:
- Tap `Update` on the main screen to check `latest.json`, download the APK, - Tap `Update` on the main screen to check `latest.json`, download the APK,
@@ -447,6 +447,7 @@ public final class MainActivity extends Activity {
private void showMainActions() { private void showMainActions() {
String[] items = { String[] items = {
"Health", "Health",
"Probe Tailscale APIs",
"Server status", "Server status",
"Timeline", "Timeline",
"Preferences", "Preferences",
@@ -476,63 +477,66 @@ public final class MainActivity extends Activity {
showRaw("Health", () -> api.health()); showRaw("Health", () -> api.health());
break; break;
case 1: case 1:
showRaw("Server status", () -> api.serverStatus()); probeServerProfiles();
break; break;
case 2: case 2:
showRaw("Timeline", () -> api.timeline(50)); showRaw("Server status", () -> api.serverStatus());
break; break;
case 3: case 3:
showRaw("Preferences", () -> api.preferences()); showRaw("Timeline", () -> api.timeline(50));
break; break;
case 4: case 4:
showRaw("All session details", () -> api.sessionsAll()); showRaw("Preferences", () -> api.preferences());
break; break;
case 5: case 5:
showRaw("Pane details", () -> api.sessionsPanes()); showRaw("All session details", () -> api.sessionsAll());
break; break;
case 6: case 6:
showRaw("Kanban projects", () -> api.kanbanProjects()); showRaw("Pane details", () -> api.sessionsPanes());
break; break;
case 7: case 7:
promptCreateKanbanProject(); showRaw("Kanban projects", () -> api.kanbanProjects());
break; break;
case 8: case 8:
promptDeleteKanbanProject(); promptCreateKanbanProject();
break; break;
case 9: case 9:
promptRemoveKanbanSession(); promptDeleteKanbanProject();
break; break;
case 10: case 10:
promptGroupMessages(); promptRemoveKanbanSession();
break; break;
case 11: case 11:
promptSendGroupMessage(); promptGroupMessages();
break; break;
case 12: case 12:
promptScanGroupMessage(); promptSendGroupMessage();
break; break;
case 13: case 13:
promptPostHookEvent(); promptScanGroupMessage();
break; break;
case 14: case 14:
promptUploadImageFile(); promptPostHookEvent();
break; break;
case 15: case 15:
promptUploadImageUrl(); promptUploadImageFile();
break; break;
case 16: case 16:
promptImagePreviewInfo(); promptUploadImageUrl();
break; break;
case 17: case 17:
promptOpenImagePreview(); promptImagePreviewInfo();
break; break;
case 18: case 18:
openExternalUrl(BuildConfig.DEFAULT_APK_URL); promptOpenImagePreview();
break; break;
case 19: case 19:
showUpdateSourcePicker(); openExternalUrl(BuildConfig.DEFAULT_APK_URL);
break; break;
case 20: case 20:
showUpdateSourcePicker();
break;
case 21:
showPermissionsAndUpdateStatus(); showPermissionsAndUpdateStatus();
break; break;
default: default:
@@ -958,8 +962,8 @@ public final class MainActivity extends Activity {
text.append("Selected manifest:\n") text.append("Selected manifest:\n")
.append(prefs.getString("update_url", BuildConfig.DEFAULT_UPDATE_URL)) .append(prefs.getString("update_url", BuildConfig.DEFAULT_UPDATE_URL))
.append('\n'); .append('\n');
text.append("GitHub manifest:\n").append(BuildConfig.DEFAULT_UPDATE_URL).append('\n'); text.append("GitHub primary manifest:\n").append(BuildConfig.DEFAULT_UPDATE_URL).append('\n');
text.append("Gitea release API:\n").append(BuildConfig.DEFAULT_GITEA_UPDATE_URL).append('\n'); text.append("Gitea public mirror API:\n").append(BuildConfig.DEFAULT_GITEA_UPDATE_URL).append('\n');
text.append('\n'); text.append('\n');
text.append("Network: manifest permission, no runtime grant required\n"); text.append("Network: manifest permission, no runtime grant required\n");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@@ -1020,6 +1024,36 @@ public final class MainActivity extends Activity {
showMessage("Update source: " + url); showMessage("Update source: " + url);
} }
private void probeServerProfiles() {
progressBar.setVisibility(View.VISIBLE);
setStatus("Probing Tailscale APIs...");
executor.execute(() -> {
StringBuilder text = new StringBuilder();
for (String url : SERVER_PROFILES) {
text.append(url).append('\n');
try {
SessionApiClient client = new SessionApiClient(url);
JSONObject health = new JSONObject(client.health());
List<SessionSummary> sessions = client.getSessions();
text.append(" ok: true\n");
text.append(" version: ")
.append(health.optString("version", "unknown"))
.append(" ")
.append(health.optString("commit", ""))
.append('\n');
text.append(" sessions: ").append(sessions.size()).append('\n');
} catch (Exception error) {
text.append(" failed: ").append(error.getMessage()).append('\n');
}
text.append('\n');
}
runOnUiThread(() -> {
progressBar.setVisibility(View.GONE);
showTextDialog("Tailscale APIs", text.toString());
});
});
}
private void openInstallPermissionSettings() { private void openInstallPermissionSettings() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
showMessage("Install permission is allowed on this Android version"); showMessage("Install permission is allowed on this Android version");