Configuration/Connections: Allow HTTP tunneling#2274
Merged
NickCraver merged 18 commits intomainfrom Oct 21, 2022
Merged
Conversation
NickCraver
approved these changes
Oct 21, 2022
Collaborator
NickCraver
left a comment
There was a problem hiding this comment.
Tidied docs/APIs a bit - looking good!
flobernd
reviewed
Apr 25, 2023
| { | ||
| var encoding = Encoding.ASCII; | ||
| var ep = Format.ToString(endpoint); | ||
| const string Prefix = "CONNECT ", Suffix = " HTTP/1.1\r\n\r\n", ExpectedResponse = "HTTP/1.1 200 OK\r\n\r\n"; |
Contributor
There was a problem hiding this comment.
@mgravell According to https://datatracker.ietf.org/doc/html/draft-luotonen-web-proxy-tunneling-01#section-3.2, the expected response should be HTTP/1.1 200 Connection established instead of HTTP/1.1 200 OK. Currently it's not possible to use a HTTP proxy that correctly implements this behavior (e.g. Squid).
This file contains hidden or 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
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.
http:prefix on the tunnel optiontunnels are implemented as concrete subclasses of the
Tunneltype; an HTTP proxy "connect" implementation is provided as a well-known version that is supported insideParse- but custom 3rd-party tunnel implementations can also be provided via the object-model (notParse)A
Tunnelallows:EndPointused to createSocketconnections, or to suppressSocketcreation entirely (by default, the same logical endpoint requested is provided back out)Stream(by default, nothing is done and no custom stream is returned)