4 ms·
If you implement, for example, the network stack as a filesystem, and you have generic facilities which let you bind "files" from one system to another, you can
by floren 6y ago
If you implement, for example, the network stack as a filesystem, and you have generic facilities which let you bind "files" from one system to another, you can forward your traffic through another host as easily as:
import remote-host /net
Now your new network connections will go through remote-host, because a network connection is just reads and writes to files in /net.
Lots of neat applications when you take a few simple ideas and expand them as far as you can: represent everything as files in a namespace, provide advanced tools to manipulate that namespace, and do it all via a networked protocol.
- bear8642 6y agoIndeed and that's what Plan9 enables you to do
- floren 6y agoThat's why I posted the exact command you would run on Plan 9 in order to do it ;)
- Sebb767 6y ago> Now your new network connections will go through remote-host, because a network connection is just reads and writes to files in /net. Wouldn't this then also affect the connection to this remote host used for importing, effectively looping itself?
- floren 6y agoNope, because the connection to that remote host was established when we were using the local host's /net. This is one of the other key features of Plan 9: per-process namespaces (inherited by children). Only programs inheriting the current process's namespace will use the imported network stack: you open a shell, you run "import remote /net" to bring in the remote network stack, then you run your network applications within that shell. Applications in any other shell will use the regular local network stack. After importing /net from the remote host, you could also run `rio` in that shell, which will start a new instance of the GUI nested within that window, in which all applications will use the imported stack.
- Sebb767 6y agoVery interesting. Thanks for the explanation!