Implementing an Editor Proxy in WebShell

· 1 min read · 73 Words · -Views -Comments

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