mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6017] [MERGED] feat(sub): add raw subscription download actions #6055
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#6055
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6017
Author: @w3struk
Created: 7/17/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @MHSanaei
Base:
main← Head:main📝 Commits (4)
90d3726feat(sub): add raw subscription downloads6d388adfix(sub): address review feedbackcd1383efeat(sub): add download buttons to client subscriptions3f13ce4fix(sub): fetch subscription before download📊 Changes
5 files changed (+146 additions, -14 deletions)
View changed files
📝
frontend/src/pages/clients/ClientInfoModal.tsx(+33 -2)📝
frontend/src/pages/sub/SubPage.tsx(+21 -0)📝
internal/sub/controller.go(+26 -8)📝
internal/sub/controller_test.go(+62 -0)📝
internal/sub/dist.go(+4 -4)📄 Description
Summary
Changes
frontend/src/pages/sub/SubPage.tsx):internal/sub/controller.go):?view=rawnow bypasses the HTML response and sets attachment headers for Clash/JSON subscription responses.internal/sub/controller_test.go.Why
Browser navigation currently renders subscription endpoints as HTML, which prevents users from directly downloading JSON/YAML exports from the subscription page. This adds explicit raw download actions and ensures
?view=rawreturns attachment-style responses suitable for direct download.Testing
go test ./internal/subgo build ./...npm test -- --project=storybook src/components/clients/ConfigBlock.stories.tsx🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.