地址是:

 https://github.com/coder/code-server 

安装脚本:

curl -fsSL https://code-server.dev/install.sh | sh

这是启动的tips

==> Caveats
The launchd service runs on http://127.0.0.1:8080. Logs are located at /usr/local/var/log/code-server.log.

To start code-server now and restart at login:
  brew services start code-server
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/code-server/bin/code-server

macOS下配置好代理服务器:

# 编辑配置文件(以 Zsh 为例)
nano ~/.zshrc

# 添加以下内容(替换实际代理地址)
export http_proxy="http://proxy.example.com:8080"
export https_proxy="http://proxy.example.com:8080"
export no_proxy="localhost,127.0.0.1,192.168.0.0/16"

# 保存后生效
source ~/.zshrc

运行后发现它是跑在127.0.0.1上的

lemonhall@Macmini ~ % netstat -anv | grep 8080 | grep LISTEN

tcp4       0      0  127.0.0.1.8080         *.*                    
LISTEN                 0            0  131072  131072  21053      
0 00100 00000106 00000000000135f4 00000001 00000900      1      0 000000
lemonhall@Macmini ~ %
lemonhall@Macmini ~ %
lemonhall@Macmini ~ %

我就装一个nginx吧算了

lemonhall@Macmini ~ % brew install nginx
==> Downloading https://formulae.brew.sh/api/formula.jws.json
==> Downloading https://formulae.brew.sh/api/cask.jws.json
==> Downloading https://ghcr.io/v2/homebrew/core/nginx/manifests/1.27.4
#########################################################################
#################################################################################################### 100.0%
==> Fetching nginx
==> Downloading https://ghcr.io/v2/homebrew/core/nginx/blobs/sha256:e47e60d2b09fd7ee3a591b0ea110b40e375759842861d33b6ea2dfe36503f16c
#####################################################################
######################################################################################################## 100.0%
==> Pouring nginx--1.27.4.sonoma.bottle.tar.gz
==> Caveats
Docroot is: /usr/local/var/www

The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /usr/local/etc/nginx/servers/.

To start nginx now and restart at login:
  brew services start nginx
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/nginx/bin/nginx -g daemon\ off\;
==> Summary
🍺  /usr/local/Cellar/nginx/1.27.4: 27 files, 2.5MB
==> Running `brew cleanup nginx`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
lemonhall@Macmini ~ %


然后那就:

/Users/lemonhall/.config/code-server

记着把这个文件改一下,看到密码和0.0.0.0就好了

brew services restart code-server