mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6665] [Feature]: 可以增强一下导出全部入站规则,导入全部入站规则吗 #4454
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4454
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xiaolv899 on GitHub (Sep 27, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6665
Is your feature request related to a problem?
当入站规则比较多的情况这个功能就很有必要了,希望考虑一下
Describe the solution you'd like
当入站规则比较多的情况这个功能就很有必要了,希望考虑一下
Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Sep 27, 2026):
这是一个合理的功能请求。目前面板不支持一次导出或导入全部入站,只能逐个处理。下面是现有功能,以及现在可以用的替代办法。
当前代码里有什么
frontend/src/pages/inbounds/list/RowActions.tsx:66-69,键名pages.inbounds.exportInbound),它把单个入站的 JSON 复制到剪贴板。frontend/src/pages/inbounds/InboundsPage.tsx:447-463),然后调用POST /panel/api/inbounds/import。后端importInbound(internal/web/controller/inbound.go:405-443)一次只解析一个对象: 所以粘贴一个包含多个入站的 JSON 数组会失败。InboundsPage.tsx:416-445)导出的是分享链接和订阅地址,不是可以重新导入的入站配置。现在可用的替代办法
GET /panel/api/server/getDb和POST /panel/api/server/importDB(internal/web/controller/server.go:56,78)。参见文档docs/content/docs/zh/operations/backup-restore.mdx。GET /panel/api/inbounds/list拿到全部入站,再对每一项依次调用POST /panel/api/inbounds/import。供维护者参考:真正实现批量导入,需要让
importInbound接受数组(或者新增一个路由),并对每一项做和现在一样的Id/NodeID/ClientStats处理。另外要注意,同一批里的端口或 tag 可能和已有入站冲突。客户端的批量导出/导入已经有了(internal/web/service/client_portable.go里的ExportAll),可以作为参考。相关:#4903(客户端导出/导入的请求,现在已经实现)。
Verdict: Feature request
此回复由自动分析生成,维护者可能会进一步跟进。