Apply file transfer restrictions to the integrated browser
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript, vscode
调研方向
首先定位 code-server 界面中现有的文件传输限制处理逻辑和集成浏览器入口点。跟踪浏览器上传和下载如何到达本地客户端与远程服务器,然后验证跨越该边界的传输会被阻止,而仅在服务器上执行的操作仍然允许进行。
由索引模型根据 Issue 内容生成。
描述
What is your suggestion?
I would like code-server to apply the same file transfer restrictions to the integrated browser available directly inside the VS Code/code-server interface.
Today, code-server can restrict actions such as drag-and-drop, file download, and file upload between the user's local machine and the remote code-server environment. However, the integrated browser inside the interface should also respect these restrictions.
If file transfer is disabled, the integrated browser should not allow users to bypass the restriction by downloading files to their local machine or uploading files from their local machine.
However, the browser should still be allowed to download or upload files only within the remote server environment. For example:
- downloading a file from a website should be allowed only if the destination is a folder on the remote server;
- uploading a file should be allowed only if the file comes from the remote server filesystem;
- uploading or downloading directly between the integrated browser and the local client machine should remain blocked when file transfer restrictions are enabled.
In short, the restriction should prevent transfers outside of the server, but should still allow file operations that stay entirely inside the server environment.
Why do you want this feature?
This would improve security and make file transfer restrictions consistent across the whole code-server interface.
In managed or restricted environments, administrators may disable drag-and-drop, file downloads, and file uploads to prevent data from being moved between the remote server and the local user device.
If the integrated browser can still upload files from the local machine or download files to the local machine, users may be able to bypass these restrictions. This weakens the security model and makes the existing restrictions less effective.
The expected behavior would be:
- local machine to server transfer: blocked when upload is disabled;
- server to local machine transfer: blocked when download is disabled;
- server-only file operations through the integrated browser: allowed.
This would be useful for enterprise, education, sandbox, and controlled development environments where administrators need strong control over data movement.
Are there any workarounds to get this functionality today?
There does not seem to be a clean native workaround today.
Possible workarounds may include disabling the integrated browser entirely, using proxy or network-level restrictions, or maintaining custom patches, but these approaches are not ideal. They can be difficult to maintain, may break legitimate workflows, and do not provide a clear policy-based way to enforce the same restrictions everywhere in code-server.
A native option would be much better because it would make the behavior predictable and consistent with the existing file transfer restrictions.
Are you interested in submitting a PR for this?
Not at the moment, but I would be happy to provide more details, test the behavior, or validate a proposed implementation in a restricted code-server environment.
- 主要语言
- TypeScript
- 星标
- 79.4k
- 派生
- 6.9k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 39
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/code-server 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
coder/code-server#8017 · 2 条评论 ·
-
security
难度 2/5 1-3 小时 新手友好度 74/100
coder/code-server#8013 · 4 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
coder/code-server#7976 · 2 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
coder/code-server#7962 · 3 条评论 ·
-
bug needs-investigation
难度 4/5 3-5 天 新手友好度 55/100
coder/code-server#7955 · 1 条评论 ·
查看 coder/code-server 的全部 Issue
相似的 Issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
supermomonga/zcode-acp#24 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
growthbook/growthbook#7100 ·
-
triage
难度 1/5 1-3 小时 新手友好度 88/100