如何让 code-server 使用 vscode 官方插件仓库

私有化部署的 code-server 想使用 github.copilot dbaeumer.vscode-eslint,按照网上的办法折腾了几个回合都没有成功;最后问了元宝,测试后可行:修改 /usr/lib/code-server/lib/vscode/product.json 文件。
删除代码块

  "linkProtectionTrustedDomains": [
    "https://open-vsx.org"
  ],

添加代码块

  "linkProtectionTrustedDomains": [
    "https://open-vsx.org",
    "https://marketplace.visualstudio.com"
  ],
  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items",
    "controlUrl": "",
    "recommendationsUrl": ""
  },

保存后重启
重启 code-server 后已经可以检索到该插件,安装后如图:
如何让 code-server 使用 vscode 官方插件仓库-每日运维网