Skip to content

feat: SSH remote message relay functionality#43

Open
123qwe55aa wants to merge 1 commit intoMioMioOS:mainfrom
123qwe55aa:feature/ssh-relay-minimal
Open

feat: SSH remote message relay functionality#43
123qwe55aa wants to merge 1 commit intoMioMioOS:mainfrom
123qwe55aa:feature/ssh-relay-minimal

Conversation

@123qwe55aa
Copy link
Copy Markdown

Summary

Add SSH tunnel-based relay for remote Claude Code sessions, enabling Island app to monitor and interact with Claude Code running on remote machines.

New Components

  • TCP relay server (HookSocketServer): Listens on port 9871 for hook events forwarded via SSH tunnel
  • SSHHostRegistry/SSHTunnelManager (Services/SSH/): Manages SSH tunnel lifecycle for WAN connections
  • MessageOutbox (Services/Sync/): Queues messages when relay is temporarily unavailable
  • codeisland-ssh-relay.py: Python daemon running on remote hosts, forwards hook events over SSH tunnel
  • com.codeisland.ssh-relay.plist: LaunchAgent plist for auto-starting relay daemon
  • SSHHostsView (UI/Views/): UI for managing SSH host configurations (Direct/Tunnel modes)

Key Changes

  • SessionState: Added SSH fields (isSSH, remoteHost, sshUser, sshPort, remoteTmuxTarget, connectionState)
  • SessionEvent: Added removeSession case
  • TerminalWriter: Routes messages to remote sessions via SSH relay command
  • MessageRelay: Integrates with MessageOutbox for offline message queuing
  • HookInstaller: Added deployToSSHHost() for deploying relay scripts to remote machines
  • AppDelegate/ClaudeSessionMonitor: Manages TCP relay lifecycle

Files Changed

  • 17 files changed, +3102/-150 lines

Test plan

  • Add SSH host via SSHHostsView UI
  • Test Direct mode on LAN (no tunnel needed)
  • Test Tunnel mode for WAN (SSH reverse tunnel)
  • Verify hook events forward correctly over tunnel
  • Verify message relay works to remote session

Add SSH tunnel-based relay for remote Claude Code sessions, enabling
Island app to monitor and interact with Claude Code running on remote
machines via SSH.

New components:
- TCP relay server (HookSocketServer) on port 9871 for receiving
  hook events from remote hosts via SSH tunnels
- SSHHostRegistry/SSHTunnelManager for managing SSH tunnel connections
- MessageOutbox for queuing messages when relay is unavailable
- codeisland-ssh-relay.py: Python relay daemon for SSH tunnel forwarding
- SSHHostsView UI for managing SSH host configurations
- HookInstaller updated with SSH deployment support

Key changes:
- SessionState: Added SSH fields (isSSH, remoteHost, sshUser, etc.)
- SessionEvent: Added removeSession case
- TerminalWriter: SSH routing via relay command
- MessageRelay: Outbox integration for offline message queuing
- AppDelegate/ClaudeSessionMonitor: TCP relay lifecycle management
@xmqywx
Copy link
Copy Markdown
Collaborator

xmqywx commented Apr 11, 2026

非常感谢

@xmqywx
Copy link
Copy Markdown
Collaborator

xmqywx commented Apr 11, 2026

@Liar-zzy HELP TEST THX

@xmqywx
Copy link
Copy Markdown
Collaborator

xmqywx commented Apr 13, 2026

@123qwe55aa 你加一下我微信吧,我拉你进开发群,因为我没有ssh没办法测试

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.

2 participants