Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add upstream response header passthrough #17

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Frank-Copilot
Copy link
Contributor

  • Pass the upstream server's subscription-userinfo, profile-update-interval, and profile-web-page-url response headers to the client.
  • Modify getParsedSubData.ts to return the parsed data and upstream response headers.
  • Modify clash-meta.js, debug.js, share-link.js, and sing-box.js to merge upstream response headers into the final response headers.

Fixed: #15

图片

- Pass the upstream server's `subscription-userinfo`, `profile-update-interval`, and `profile-web-page-url` response headers to the client.
- Modify `getParsedSubData.ts` to return the parsed data and upstream response headers.
- Modify `clash-meta.js`, `debug.js`, `share-link.js`, and `sing-box.js` to merge upstream response headers into the final response headers.
@kobe-koto
Copy link
Owner

This area of the code is designed that way, rather than passing them through BECAUSE we can't know which set of input headers should be as we are expected multiple input source. Your current changes overwrite these headers EVERY time when processing the inputed headers, effectively only preserving the last upstream header, which deviates from the intended behavior. (If my rough review right)

This PR might be in draft status, but thank you for your collaboration.

Will do further review when i have the time.

@Frank-Copilot
Copy link
Contributor Author

I just think that passing through remote subscription information is a useful requirement. You can make any modifications or even close this PR.

@kobe-koto kobe-koto marked this pull request as draft March 1, 2025 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

subscription-userinfo header
2 participants