Uses TabFS and gilderlabs/ssh.
Set your TabFS mount path in
$ go run tabssh.go
$ ssh -o StrictHostKeyChecking=no localhost -p 2222
(you can set a fun hostname in
Host last-focused-tab.safari.localhost HostName localhost Port 2222 LogLevel ERROR StrictHostKeyChecking no UserKnownHostsFile /dev/null
a hack would be to make it dispatch to tab depending on provided username, like how their Docker example dispatches to process (ssh
[email protected] runs
but really, the right way to do it would be to make it so that
safari.localhost is a hostname that actually lets you talk to Safari, and
last-focused-tab.safari.localhost is a hostname that actually lets you talk to the last focused tab.
could you make a virtual network or something to do that? (where each tab is a host on the virtual network) I mean, that feels philosophically right; tabs are virtual computers, so maybe they should be network-addressable like your real computer is (and maybe other things should be network-addressable that way too -- individual applications, documents, etc).
like 'port numbers' feel kinda like they unnaturally promote one level of computer, the physical one on your desk that has a Wi-Fi chip, and hide the computers nested inside it (such as each of your browser tabs)