-
Notifications
You must be signed in to change notification settings - Fork 105
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
Support sni_hostname
extension with SOCKS proxy.
#774
Conversation
Great, Thanks. Let's also update the changelog. |
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.
Unit tests should only test one specific thing and should ideally have only one assertion. I believe this test is overly complicated, so let us simplify it.
tests/_async/test_socks_proxy.py
Outdated
extensions={"sni_hostname": "example.com"}, | ||
) as response: | ||
info = [repr(c) for c in proxy.connections] | ||
assert info == [ |
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.
Let's remove this check
tests/_async/test_socks_proxy.py
Outdated
assert response.status == 200 | ||
assert response.content == b"Hello, world!" | ||
info = [repr(c) for c in proxy.connections] | ||
assert info == [ |
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.
And this
Also, I'm not sure if this test actually checks whether sni_hostname works or not, so let's just remove it entirely. |
Thanks @Allgot. |
Summary
The introduction of a new extension,
sni_hostname
, allows users to define the hostname to be used during the TLS handshake. However, the update was applied inconsistently, leading to an incomplete extension. Currently, thesni_hostname
extension is not functioning when a SOCKS proxy is employed. This PR aims to address this gap and rectify the issue.Checklist
sni_hostname
extension with SOCKS proxy #773Closes #772