Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73cc8c8181 | ||
|
|
b64ef21831 |
@@ -9,6 +9,8 @@ APIs directly:
|
||||
- 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`,
|
||||
`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
|
||||
- create, rename, send command, split pane, select pane, kill pane, pin, mute,
|
||||
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
|
||||
```
|
||||
|
||||
Those GitHub links are the stable public install/update channel. Gitea releases
|
||||
are mirrored for internal tracking, but the current Gitea org/repo visibility
|
||||
keeps anonymous release downloads behind login, so phones should use GitHub for
|
||||
no-login install and in-app updates.
|
||||
Those GitHub links are the primary public install/update channel. Gitea releases
|
||||
are mirrored as a second public source. This Gitea instance does not support the
|
||||
GitHub-style `/releases/latest/download/...` URL, so the app uses the Gitea
|
||||
Release API as the stable Gitea update entrypoint.
|
||||
|
||||
Plain branch builds only create Actions artifacts; they are useful for CI
|
||||
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
|
||||
manifest and the Gitea release API. GitHub is the reliable no-login source today.
|
||||
The Gitea API endpoint is:
|
||||
manifest and the Gitea release API. The Gitea API endpoint is:
|
||||
|
||||
```text
|
||||
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:
|
||||
|
||||
- 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() {
|
||||
String[] items = {
|
||||
"Health",
|
||||
"Probe Tailscale APIs",
|
||||
"Server status",
|
||||
"Timeline",
|
||||
"Preferences",
|
||||
@@ -476,63 +477,66 @@ public final class MainActivity extends Activity {
|
||||
showRaw("Health", () -> api.health());
|
||||
break;
|
||||
case 1:
|
||||
showRaw("Server status", () -> api.serverStatus());
|
||||
probeServerProfiles();
|
||||
break;
|
||||
case 2:
|
||||
showRaw("Timeline", () -> api.timeline(50));
|
||||
showRaw("Server status", () -> api.serverStatus());
|
||||
break;
|
||||
case 3:
|
||||
showRaw("Preferences", () -> api.preferences());
|
||||
showRaw("Timeline", () -> api.timeline(50));
|
||||
break;
|
||||
case 4:
|
||||
showRaw("All session details", () -> api.sessionsAll());
|
||||
showRaw("Preferences", () -> api.preferences());
|
||||
break;
|
||||
case 5:
|
||||
showRaw("Pane details", () -> api.sessionsPanes());
|
||||
showRaw("All session details", () -> api.sessionsAll());
|
||||
break;
|
||||
case 6:
|
||||
showRaw("Kanban projects", () -> api.kanbanProjects());
|
||||
showRaw("Pane details", () -> api.sessionsPanes());
|
||||
break;
|
||||
case 7:
|
||||
promptCreateKanbanProject();
|
||||
showRaw("Kanban projects", () -> api.kanbanProjects());
|
||||
break;
|
||||
case 8:
|
||||
promptDeleteKanbanProject();
|
||||
promptCreateKanbanProject();
|
||||
break;
|
||||
case 9:
|
||||
promptRemoveKanbanSession();
|
||||
promptDeleteKanbanProject();
|
||||
break;
|
||||
case 10:
|
||||
promptGroupMessages();
|
||||
promptRemoveKanbanSession();
|
||||
break;
|
||||
case 11:
|
||||
promptSendGroupMessage();
|
||||
promptGroupMessages();
|
||||
break;
|
||||
case 12:
|
||||
promptScanGroupMessage();
|
||||
promptSendGroupMessage();
|
||||
break;
|
||||
case 13:
|
||||
promptPostHookEvent();
|
||||
promptScanGroupMessage();
|
||||
break;
|
||||
case 14:
|
||||
promptUploadImageFile();
|
||||
promptPostHookEvent();
|
||||
break;
|
||||
case 15:
|
||||
promptUploadImageUrl();
|
||||
promptUploadImageFile();
|
||||
break;
|
||||
case 16:
|
||||
promptImagePreviewInfo();
|
||||
promptUploadImageUrl();
|
||||
break;
|
||||
case 17:
|
||||
promptOpenImagePreview();
|
||||
promptImagePreviewInfo();
|
||||
break;
|
||||
case 18:
|
||||
openExternalUrl(BuildConfig.DEFAULT_APK_URL);
|
||||
promptOpenImagePreview();
|
||||
break;
|
||||
case 19:
|
||||
showUpdateSourcePicker();
|
||||
openExternalUrl(BuildConfig.DEFAULT_APK_URL);
|
||||
break;
|
||||
case 20:
|
||||
showUpdateSourcePicker();
|
||||
break;
|
||||
case 21:
|
||||
showPermissionsAndUpdateStatus();
|
||||
break;
|
||||
default:
|
||||
@@ -958,8 +962,8 @@ public final class MainActivity extends Activity {
|
||||
text.append("Selected manifest:\n")
|
||||
.append(prefs.getString("update_url", BuildConfig.DEFAULT_UPDATE_URL))
|
||||
.append('\n');
|
||||
text.append("GitHub 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("GitHub primary manifest:\n").append(BuildConfig.DEFAULT_UPDATE_URL).append('\n');
|
||||
text.append("Gitea public mirror API:\n").append(BuildConfig.DEFAULT_GITEA_UPDATE_URL).append('\n');
|
||||
text.append('\n');
|
||||
text.append("Network: manifest permission, no runtime grant required\n");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
@@ -1020,6 +1024,36 @@ public final class MainActivity extends Activity {
|
||||
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() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
showMessage("Install permission is allowed on this Android version");
|
||||
|
||||
Reference in New Issue
Block a user