-
Notifications
You must be signed in to change notification settings - Fork 93
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
HttpGet support Alt-Svc #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
这东西有人在用吗 |
我也是最最近才发现的,这样访问家宽的服务就不需要加端口了,域名指向公网用 443 端口的服务,AltSvc 域名指向家宽的任意端口,只需要消耗一点点公网流量就能访问家宽服务。 |
这不得客户端能直接访问你的家宽,也就是解决一个域名问题吧
…On Mon, Oct 16, 2023 at 13:17 zhangnew ***@***.***> wrote:
我也是最最近才发现的,这样访问家宽的服务就不需要加端口了,域名指向公网用 443 端口的服务,AltSvc
域名指向家宽的任意端口,只需要消耗一点点公网流量就能访问家宽服务。
—
Reply to this email directly, view it on GitHub
<#3 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG7DUMMEQHDFMHTDV23EJDLX7S7NDAVCNFSM6AAAAAA6BPPAMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRTG42DCMBYGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
对的,agent 先访问公网 443 域名得到 AltSvc 的家宽域名和端口,再去测试一下家宽,都没问题返回成功 |
直接访问家宽就好了,加这个增加复杂度
…On Mon, Oct 16, 2023 at 13:28 zhangnew ***@***.***> wrote:
对的,agent 先访问公网 443 域名得到 AltSvc 的家宽域名和端口,再去测试一下家宽,都没问题返回成功
—
Reply to this email directly, view it on GitHub
<#3 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG7DUMN5MMRXP7VK5VCIIYTX7TAY5AVCNFSM6AAAAAA6BPPAMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRTG42TGNJRGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
这个家宽的服务是通过 lan-expose 暴露在同一个端口,直接请求的话需要几个 header 才可以,agent 也不支持加 header, 没想到其他好的办法了 header 示例:
|
naiba
requested changes
Oct 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果你确实需要,优化下代码
naiba
reviewed
Oct 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Alt-Svc HTTP header allows a server to indicate that another network location (the "alternative service") can be treated as authoritative for that origin when making future requests.
see also https://httpwg.org/specs/rfc7838.html