Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73cc8c8181 | ||
|
|
b64ef21831 | ||
|
|
e077fa5d14 |
@@ -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
|
||||||
@@ -18,7 +20,8 @@ APIs directly:
|
|||||||
- native API action center for health, server status, timeline, preferences,
|
- native API action center for health, server status, timeline, preferences,
|
||||||
kanban projects, group messages, hook events, image file/URL upload, image
|
kanban projects, group messages, hook events, image file/URL upload, image
|
||||||
preview info, and native image preview display
|
preview info, and native image preview display
|
||||||
- mobile soft-key row for tmux-oriented input
|
- mobile soft-key row for tmux-oriented input, including tmux prefix, detach,
|
||||||
|
new window, previous/next window, Ctrl keys, arrows, page keys, and paste
|
||||||
- automatic update checks against a GitHub Release manifest
|
- automatic update checks against a GitHub Release manifest
|
||||||
- APK download, SHA-256 verification, and installer handoff
|
- APK download, SHA-256 verification, and installer handoff
|
||||||
|
|
||||||
@@ -79,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.
|
||||||
@@ -101,6 +104,10 @@ escape filtering. It is enough for shell-oriented remote testing, but it is not
|
|||||||
yet a complete xterm-compatible renderer for full-screen TUIs such as `vim` or
|
yet a complete xterm-compatible renderer for full-screen TUIs such as `vim` or
|
||||||
`top`.
|
`top`.
|
||||||
|
|
||||||
|
The terminal toolbar and shortcut row include tmux prefix helpers. The app sends
|
||||||
|
the same control bytes a keyboard would send, for example `Ctrl+B`, `Ctrl+B d`,
|
||||||
|
`Ctrl+B c`, `Ctrl+B n`, and `Ctrl+B p`.
|
||||||
|
|
||||||
All app features are native Android controls. Complex server objects such as
|
All app features are native Android controls. Complex server objects such as
|
||||||
kanban projects, preferences, timeline events, group messages, and image metadata
|
kanban projects, preferences, timeline events, group messages, and image metadata
|
||||||
currently use native forms plus native JSON detail dialogs; image preview uses a
|
currently use native forms plus native JSON detail dialogs; image preview uses a
|
||||||
@@ -136,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:
|
||||||
@@ -620,7 +624,12 @@ public final class MainActivity extends Activity {
|
|||||||
"Page up",
|
"Page up",
|
||||||
"Page down",
|
"Page down",
|
||||||
"Session status",
|
"Session status",
|
||||||
"Send command"
|
"Send command",
|
||||||
|
"Tmux prefix",
|
||||||
|
"Detach tmux client",
|
||||||
|
"New tmux window",
|
||||||
|
"Next tmux window",
|
||||||
|
"Previous tmux window"
|
||||||
};
|
};
|
||||||
new AlertDialog.Builder(this)
|
new AlertDialog.Builder(this)
|
||||||
.setTitle(sessionName)
|
.setTitle(sessionName)
|
||||||
@@ -655,6 +664,21 @@ public final class MainActivity extends Activity {
|
|||||||
case 6:
|
case 6:
|
||||||
promptSendCommand(sessionName);
|
promptSendCommand(sessionName);
|
||||||
break;
|
break;
|
||||||
|
case 7:
|
||||||
|
sendTerminalInput("\u0002");
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
sendTerminalInput("\u0002d");
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
sendTerminalInput("\u0002c");
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
sendTerminalInput("\u0002n");
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
sendTerminalInput("\u0002p");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -938,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) {
|
||||||
@@ -1000,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");
|
||||||
@@ -1169,6 +1223,13 @@ public final class MainActivity extends Activity {
|
|||||||
addSoftKey(row, "^A", "\u0001");
|
addSoftKey(row, "^A", "\u0001");
|
||||||
addSoftKey(row, "^E", "\u0005");
|
addSoftKey(row, "^E", "\u0005");
|
||||||
addSoftKey(row, "^V", "\u0016");
|
addSoftKey(row, "^V", "\u0016");
|
||||||
|
addSoftKey(row, "^Z", "\u001a");
|
||||||
|
addSoftKey(row, "^\\", "\u001c");
|
||||||
|
addSoftKey(row, "Tmux", "\u0002");
|
||||||
|
addSoftKey(row, "Detach", "\u0002d");
|
||||||
|
addSoftKey(row, "NewWin", "\u0002c");
|
||||||
|
addSoftKey(row, "NextWin", "\u0002n");
|
||||||
|
addSoftKey(row, "PrevWin", "\u0002p");
|
||||||
addSoftKey(row, "Left", "\u001b[D");
|
addSoftKey(row, "Left", "\u001b[D");
|
||||||
addSoftKey(row, "Down", "\u001b[B");
|
addSoftKey(row, "Down", "\u001b[B");
|
||||||
addSoftKey(row, "Up", "\u001b[A");
|
addSoftKey(row, "Up", "\u001b[A");
|
||||||
|
|||||||
@@ -68,14 +68,15 @@ not kill a tmux session.
|
|||||||
|
|
||||||
Implemented now:
|
Implemented now:
|
||||||
|
|
||||||
- configurable base URL, defaulting to `http://127.0.0.1:3000`
|
- configurable base URL, defaulting to `http://100.89.0.116:3000`
|
||||||
- support for Tailscale URLs such as `http://100.x.y.z:3000`
|
- support for Tailscale URLs such as `http://100.x.y.z:3000`
|
||||||
- native session list from `GET /api/sessions`
|
- native session list from `GET /api/sessions`
|
||||||
- create, rename, command send, split, pane select, pane kill, pin, mute, and
|
- create, rename, command send, split, pane select, pane kill, pin, mute, and
|
||||||
kill session through documented session/preference endpoints
|
kill session through documented session/preference endpoints
|
||||||
- basic live terminal through `/ws/terminal`
|
- basic live terminal through `/ws/terminal`
|
||||||
- native event stream through `/ws/events`
|
- native event stream through `/ws/events`
|
||||||
- bottom shortcut bar for `Esc`, `Tab`, `Ctrl+C`, arrows, page keys, and paste
|
- bottom shortcut bar for `Esc`, `Tab`, `Ctrl+C`, `Ctrl+V`, arrows, page keys,
|
||||||
|
tmux prefix actions, and paste
|
||||||
- shortcut delivery through the terminal WebSocket `input` message
|
- shortcut delivery through the terminal WebSocket `input` message
|
||||||
- native action center for health, server status, timeline, preferences, kanban
|
- native action center for health, server status, timeline, preferences, kanban
|
||||||
projects, group messages, hook events, image file/URL upload, image preview
|
projects, group messages, hook events, image file/URL upload, image preview
|
||||||
|
|||||||
Reference in New Issue
Block a user