Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[feat] add an API to get the final url after following redirect responses#1698

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
k3-cat wants to merge27 commits intoSagerNet:dev-next
base:dev-next
Choose a base branch
Loading
fromk3-cat:dev-next

Conversation

k3-cat
Copy link

Description

This change adds a new MethodgetFinalURL() -> string toexperimental/libbox.HTTPResponse, which allows the caller obtain the final URL after been redirected.

Motivation

This change should bring the following benefits:

  • performance improvement
  • enhance robustness
  • server can have more flexible update strategies
  • reduce reconfiguration work for user

Expected influences

None
According toRef1,net/http.Client will follows a redirect response (if less than 10 times) by default. From my test, all existing sing-box apps follow this default behaviour, and this change will not break this behaviour. In addition, the connection can be protected by TLS, so this change should not introduce extra security issue.

nekohasekaiand others added27 commitsApril 12, 2024 09:04
The `process_path` rule of sing-box is inherited from Clash,the original code uses the local system's path format (e.g. `\Device\HarddiskVolume1\folder\program.exe`),but when the device has multiple disks, the HarddiskVolume serial number is not stable.This change make QueryFullProcessImageNameW output a Win32 path (such as `C:\folder\program.exe`),which will disrupt the existing `process_path` use cases in Windows.
For historical reasons, sing-box's `domain_suffix` rule matches literal prefixes instead of the same as other projects.This change modifies the behavior of `domain_suffix`: If the rule value is prefixed with `.`,the behavior is unchanged, otherwise it matches `(domain|.+\.domain)` instead.
Signed-off-by: 气息 <qdshizh@gmail.com>
@nekohasekainekohasekaiforce-pushed thedev-next branch 11 times, most recently from3611dcd to36c095fCompareJune 21, 2025 11:43
@nekohasekainekohasekaiforce-pushed thedev-next branch 12 times, most recently from4492a53 to989034bCompareJuly 3, 2025 14:20
@nekohasekainekohasekaiforce-pushed thedev-next branch 7 times, most recently from8ec5593 tob3c1110CompareJuly 12, 2025 06:48
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@k3-cat@nekohasekai@PuerNya@szouc

[8]ページ先頭

©2009-2025 Movatter.jp