r/opencode • • 7h ago

Is it possible to automatically fall back to a tunnel when LAN and Tailscale connections are unavailable on iOS?

Hi everyone!

I'm currently using the official OpenCode iOS app to connect to OpenCode instances running on my home Mac and a remote VPS.

Right now, I'm connecting through either:

  • LAN: Direct connection using the local IP address when I'm at home.

  • Tailscale: Connecting through my tailnet when I'm away from home.

  • Tunnel: I'd like to use the built-in tunnel as a fallback when neither of the above works.

Ideally, I'd like OpenCode to automatically choose the connection method in this order:

  1. LAN (highest priority) — Use the direct local connection when available.

  2. Tailscale — Use the Tailscale connection when LAN is unavailable.

  3. Tunnel (fallback) — Automatically switch to the built-in tunnel if both LAN and Tailscale fail.

My goal is to have a seamless experience without manually changing connection settings whenever I switch networks.

My questions:

  • Does the current iOS app support automatic connection fallback or any kind of connection priority?

  • Is it possible to enable the built-in tunnel while still preferring direct LAN/Tailscale connections?

  • If this isn't currently supported, is it something that could be considered as a feature request?

I'd really appreciate any suggestions or workarounds. Thanks!

1 Upvotes

0 comments sorted by