Skip to content
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

Initialise TLS sockets directly if no socks5 proxy is configured #163

Merged
merged 1 commit into from
Jul 13, 2018

Conversation

tazjin
Copy link
Contributor

@tazjin tazjin commented Jul 13, 2018

In cases where no proxy is configured, first establishing a TCP
connection and then upgrading the connection to TLS can cause errors
on some TLS servers.

This commit splits the logic in such a way that configurations without
proxies (presumably the majority!) will connect directly using
ssl:connect, whilst proxy connections will still establish a socket
first and then upgrade.

This fixes #160.


Note: I've verified that the issue described in #160 doesn't occur with this change. However, when running tests locally, some of them seem to fail. I can't see a way in which those failures are related right now, but I'm about 2 hours behind schedule on going to bed so it'll have to wait if it occurs in CI, too :-)

In cases where no proxy is configured, first establishing a TCP
connection and then upgrading the connection to TLS can cause errors
on some TLS servers.

This commit splits the logic in such a way that configurations without
proxies (presumably the majority!) will connect directly using
`ssl:connect`, whilst proxy connections will still establish a socket
first and then upgrade.

This fixes cmullaparthi#160.
@cmullaparthi cmullaparthi merged commit 7f15865 into cmullaparthi:master Jul 13, 2018
@cmullaparthi
Copy link
Owner

Thanks Vincent, looks good to me.

@tazjin tazjin deleted the fix/issue-160-tls-upgrades branch July 13, 2018 10:29
@tazjin
Copy link
Contributor Author

tazjin commented Jul 13, 2018

Thanks for the quick response! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tls_alert internal error
2 participants