-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Configuration/Connections: Allow HTTP tunneling #2274
Conversation
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.
Tidied docs/APIs a bit - looking good!
{ | ||
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"; |
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.
@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).
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.
Created a PR: #2448
http:
prefix on the tunnel optiontunnels are implemented as concrete subclasses of the
Tunnel
type; 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
Tunnel
allows:EndPoint
used to createSocket
connections, or to suppressSocket
creation entirely (by default, the same logical endpoint requested is provided back out)Stream
(by default, nothing is done and no custom stream is returned)