Skip to content

fix(123pan): proxy IP-bound downloads#9577

Open
junge128 wants to merge 2 commits into
AlistGo:mainfrom
junge128:fix/123pan-proxy-download
Open

fix(123pan): proxy IP-bound downloads#9577
junge128 wants to merge 2 commits into
AlistGo:mainfrom
junge128:fix/123pan-proxy-download

Conversation

@junge128

Copy link
Copy Markdown

Summary

  • force 123Pan downloads through AList's proxy
  • remove ineffective client IP forwarding from download-info requests
  • add a regression test for the proxy requirement
  • return provider login errors without treating them as format strings

Background

123Pan now binds the final CDN URL to the egress IP that resolves the download link. In a real deployment, the same freshly generated link returned HTTP 200 from the AList host but HTTP 403 with code 1010 and download err: 50001 from a client using a different egress IP.

Passing the client address through X-Forwarded-For, X-Real-IP, or both did not change the result. Proxying the file through AList keeps link resolution and download on the same egress IP and fixes the failure for existing storages regardless of their web_proxy setting.

This intentionally makes 123Pan downloads consume AList server bandwidth.

Testing

  • GOTOOLCHAIN=go1.25.0 go test ./drivers/123
  • go test ./internal/driver ./internal/fs ./server/handles

huangjiajun added 2 commits July 17, 2026 16:32
123Pan now binds download URLs to the IP that requests them. Forwarding the client IP no longer affects that binding, so direct links fail with download error 50001 when AList and the client use different egress IPs.\n\nForce this driver through AList's download proxy and remove the ineffective forwarded-IP headers.
Use errors.New for API-provided login errors so the driver passes the Go printf analyzer without treating provider messages as format strings.
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.

1 participant