Skip to main content

Module reachable

Module reachable 

Source
Expand description

Which hosts are opened without being asked for, every run.

Without this, a host from ssh_config is reachable only after somebody opens it from the dashboard, and they have to do that again after every restart. Enabled means the daemon opens it for them, so http://<name>.<suffix>/ simply works.

Enabled means open, not “openable on request”. The tempting version is to connect when a request for an unopened host arrives — but every request to an alias origin arrives through the proxy, and a page can cause one of those by writing <img src>. So that version hands any web page the ability to start ssh sessions, and the timing difference between connecting and refusing tells it which hosts you have.

The obvious defence does not exist: Sec-Fetch-Dest would separate a navigation from a subresource, and Chromium sends no Sec-Fetch-* header at all on a proxied request. Measured, not assumed — every request through the PAC arrives with none of them, while the same browser sends them to 127.0.0.1 directly. So the daemon cannot tell the two apart, and the rule stays what it already was: a session is opened by the daemon itself at startup or by a control call carrying the token, and by nothing else.

Nothing here records how to reach a host. Only its name, which is a Host in ssh_config; the account, the port and the jump host stay there. That keeps the interesting details in one file rather than two, and it is also what makes this set uninteresting to leak: the name is already in the URL you typed.

Structs§

Host
One host opened without being asked for, and where it is rooted.
Set
Every host anybody has an opinion about, by name.

Functions§

remember
Remember the set, and say where it went.