A native graphical shell for SSH
摘要
标题为 “A native graphical shell for SSH”。正文指出浏览器已实现设备间(服务器提供体验)良好流程,提出服务器和边缘设备可提供浏览器图形 “shell”,主屏显示小型 HTTP 服务器提供的网页 UI 应用;应用通过 API 相互查找 URL,例如双击文本文件可打开对应编辑器 App,这些图形 App 为终端 App 的替代方案。HTTP 服务器通常私有,仅通过 SSH 或本地访问,使用 Unix 域套接字而非 localhost 端口(类似端口但存于文件系统并有明确用户权限),每个服务器可非常简单无需依赖,因为加密在 SSH 层处理。App 可为常规 HTML 网页 App,也可为 native outerframe App。作者表示已将 Outer Loop 构建为 SSH 浏览器,并正在发布开源的 Outer Shell。接着展示 Screencast:Outer Shell,演示其工作方式并指出该空间的低垂果实。更新提供 YouTube 镜像。提供文档链接:浏览器如何工作(https://outerloop.sh/)、Outer Shell API 与添加 App(https://outershell.org/)、native App 如何工作(https://outerframe.org/)。在 Thoughts 部分指出这种技术栈尚未存在的原因(浏览器方面 Unix 套接字连接曾被视为极小众,但与 SSH、sudo 等能力结合后出现新分支),提出将 Linux 服务器视为 “outer” 图形外壳而非传统本地 GUI 系统。提及过去数十年未构建此生态,HTML/JS App 曾分散出现如 Jupyter、Tensorboard,但未形成正确交付方式。现在因 AI 助写代码,可为每个平台构建原生 App 代码库,提出这是 Web 的自然架构:HTML 用于阅读和休闲 App,原生平台定制 App 用于实际工作。结尾感谢四位审阅者。
荐读理由
Outer Shell 通过 HTTP servers(用 Unix domain socket 代替 localhost 端口)配合 SSH 层,绕过加密与权限控制,直接把本地 app(如 Jupyter/Tensorboard)包装成浏览器图形 shell,降低到无依赖、简单搭建层级
原文
A native graphical shell for SSH
With the web browser, we have really figured out a good flow for how one device (the “server”) can provide an experience on another device (the “client”).
This raises a fun idea: imagine if servers and edge devices could serve up a browser-based graphical “shell” so they can be used from other devices. The shell would provide a home screen of apps. In this shell, every app is a small HTTP server, serving up a web user interface. The shell would provide an API so that apps can look up each other’s URLs. For example, apps could register themselves as a text editor, so you can double-click text files in one app to open them in the editor app. These graphical apps would be an alternative to terminal-based apps.
These HTTP servers will typically be private, inaccessible to other devices on the network. Instead, you’ll use them over SSH, or locally. Unlike most existing web-based server tools, these HTTP servers won’t typically use localhost ports, but instead will use Unix domain socket files, which are similar to ports but live on the filesystem with explicit user permissions. Each HTTP server can be very simple, with no dependencies, because it doesn’t have to handle encryption, which instead happens at the SSH layer.
The apps can be conventional HTML-based web apps, but they can also be native outerframe apps.
I’ve built Outer Loop into an SSH browser for this type of graphical shell, and now I’m shipping an open-source Outer Shell.
Screencast: Outer Shell
Here I demo Outer Shell and how it works, and I try to give you a sense of how much low-hanging fruit there is in this space.
UPDATE: Here’s a YouTube mirror, for people who prefer that.
Documentation
Instead of writing an enormous blog post, I wrote a bunch of documentation:
How the browser works: https://outerloop.sh/
The Outer Shell API and how to add apps to it: https://outershell.org/
How these native apps work: https://outerframe.org/
Thoughts
Isn’t it weird that this doesn’t already exist? For browsers, capabilities like connecting to Unix sockets have been dismissed as extremely niche, but when you group it together with the right set of other capabilities (including SSH and sudo awareness), entire new branches of the tech tree become apparent. Instead of treating Linux (and other) servers as having conventional local graphical operating systems, we could focus on giving them “outer” graphical shells for remote devices. In an alternate timeline, we’d have been building out this ecosystem for decades, using conventional HTML / JavaScript apps. Many individual server-style web apps like Jupyter and Tensorboard did in fact appear, each with their own one-off security protocols, but nothing really arose to deliver them “correctly”.
And now, the opportunity is even bigger, because we can make the apps truly native. Now that we have AI that can help us write code, it is practical for each app to have a codebase for each target platform. I think this is becoming the natural architecture for the web: HTML for reading and casual apps, and native platform-tailored apps for getting work done. Why settle for less?
(Thanks to Rosanne Liu, Mirko Klukas, Adam Zethraeus, and Felix Andrews for reading/viewing drafts of this post and screencast.)
这条对你有帮助吗?