You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #3128 on April 30, 2026 00:28.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
出于docker 容器下的安全原因,建议把管理 API 独立成一个server,即独立监听端口,和主服务分离。
目前管理API只能通过
remote-management.allow-remote控制是否允许外部访问管理口,这个选项通过判断用户的请求IP是否是本地loopback IP。然而在 docker 容器场景下所有的流量都是非loopback IP的,这意味着用户必须打开remote-management.allow-remote,从而允许任意来源流量访问。如果用户将cliproxyapi服务暴露到了公网,远程管理端口因此也会同时被暴露到公网,虽然有remote-management.secret进行保护,但是如果用户安全意识淡薄,密码简单,极容易被暴力字典攻破。如果将管理API单独分离到另外的监听端口,用户在设置反代服务器如Nginx时默认反代到主端口时,管理口并不会暴露到公网,减小了攻击面,同时局域网下依然可以用分离端口单独访问。此外由于是独立的server,
remote-management设置中甚至可以添加单独的server配置,比如控制来源IP等等。这样明确了主端口提供业务API,有自己的 auth 域,用户可以放心暴露,管理API是私有接口,可以根据需要独立控制。似乎从实现来说也并不会非常复杂。项目现在的 management 已经相对集中:
所以抽 management 本质是,把这组 routes 注册到另一个 Gin engine / HTTP server 上,并处理 callback URL、TUI/WebUI base path 兼容。
Beta Was this translation helpful? Give feedback.
All reactions