Skip to content

Commit 004c11a

Browse files
committed
Fix remote connection for tailscale + docs
1 parent 7fdfe6d commit 004c11a

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Fix remote connection for tailscale + docs.
6+
57
## 0.121.0
68

79
- Add `providers/list`, `providers/login`, `providers/loginInput`, `providers/logout` requests and `providers/updated` notification for settings-based provider/model management.

docs/config/remote.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,21 @@ When enabled, ECA starts an embedded HTTPS server that the web frontend at [web.
6464
2. Expose ECA's port via Tailscale HTTPS serve:
6565

6666
```bash
67-
sudo tailscale serve --bg --https 7777 http://localhost:7777
68-
sudo tailscale serve --bg --https 7778 http://localhost:7778
67+
sudo tailscale serve --bg --https 7777 https+insecure://localhost:7777
68+
sudo tailscale serve --bg --https 7778 https+insecure://localhost:7778
6969
# ... repeat for as many ports as you need (7777–7796)
7070
```
7171

7272
!!! warning "Use `--https`, not `--tcp`"
7373
`--tcp` creates a raw TCP proxy that browsers cannot connect to.
7474
`--https` creates a proper HTTPS reverse proxy with valid certificates.
7575

76+
!!! note "Why `https+insecure://`?"
77+
ECA's built-in server runs HTTPS with a `*.local.eca.dev` certificate.
78+
Tailscale Serve must connect to it over TLS (`https+insecure://`), not plain
79+
HTTP. The `+insecure` flag tells Tailscale to skip certificate verification
80+
since the local cert won't match your Tailscale hostname.
81+
7682
3. Start ECA — it logs a connection URL you can open directly:
7783

7884
```

src/eca/remote/server.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@
174174
(try
175175
(let [opts (if ssl-context
176176
{:ssl? true :ssl-port port :http? false
177-
:ssl-context ssl-context :host host :join? false}
177+
:ssl-context ssl-context :sni-host-check? false
178+
:host host :join? false}
178179
{:port port :host host :join? false})
179180
server (jetty/run-jetty handler opts)]
180181
(logger/debug logger-tag (str "Bound to " host ":" port (when ssl-context " (HTTPS)")))
@@ -190,7 +191,8 @@
190191
(try
191192
(let [connector (if ssl-context
192193
(let [ssl-factory (doto (SslContextFactory$Server.)
193-
(.setSslContext ssl-context))]
194+
(.setSslContext ssl-context)
195+
(.setSniRequired false))]
194196
(doto (ServerConnector. server ^SslContextFactory$Server ssl-factory)
195197
(.setHost ^String host)
196198
(.setPort (int port))))

0 commit comments

Comments
 (0)