Implementing an Editor Proxy in WebShell

How WebShell implements an editor proxy, including research, architecture, and key implementation points for integrating code-server via SSH and HTTP proxying.

Apr 5, 2023 · 1 min read · 73 Words · -Views -Comments · Programming
WebShell 🇨🇳 阅读中文版
Read with AI

Choose an AI assistant

ChatGPT Open in a new tab with the article link and prompt
Claude Copy the prompt, then open Claude

Open Claude
Trouble reading the article?

If the prompt is missing, copy the full prompt below into your AI assistant. If the AI cannot read the article, paste the visible passage you want to discuss and add your question.

I added an editor feature to WebShell last year. It’s finally stable now. Here’s a summary.

Research

  1. Few terminal products ship an editor; most only provide SFTP.
  2. Google

Architecture

https://static.1991421.cn/2023/2023-04-05-132407.jpeg

Implementation

Key steps:

  1. On the server, SSH into the target machine and install/run code-server
  2. Use SSH port forwarding to expose the internal code-server service
  3. Run a proxy server to receive browser requests and forward them to the user’s machine, reaching code-server

Final Thoughts

done!

Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover