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

Patch test #1

Merged
merged 15 commits into from
May 2, 2022
Merged

Patch test #1

merged 15 commits into from
May 2, 2022

Conversation

ckcr4lyf
Copy link
Owner

@ckcr4lyf ckcr4lyf commented May 2, 2022

Make self signed certs with hostnames, node.js trust certs, actual tls verification, fix unit tests

freeqaz and others added 12 commits February 19, 2022 03:00
Without this fix, you see this error when attempting to use an HTTPS proxy.

`Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: foo.com. is not in the cert's altnames: DNS:*.bar.com, DNS:bar.com`

The `servername` attribute is able to fix this behavior when passed to the underlying `tls.connect()` call inside of the `https` module. (see the Node [docs](https://nodejs.org/api/https.html#httpsrequesturl-options-callback))

This was very painful to debug but now I understand how `CONNECT` works extremely well! Cheers.

FIxes delvedor#43
@ckcr4lyf
Copy link
Owner Author

ckcr4lyf commented May 2, 2022

Not sure why Node.JS v10 tests are failing... seems it is somehow trying to check cert... will investigate

@ckcr4lyf
Copy link
Owner Author

ckcr4lyf commented May 2, 2022

Turns out node v10 will inherit the HTTP hostname when doing HTTP over HTTPS (proxy is TLS) , which was breaking it. Added @freeqaz 's fix to the HttpProxyAgent as well!

@ckcr4lyf
Copy link
Owner Author

ckcr4lyf commented May 2, 2022

Fucking windows now... aight let me boot into my win machine :ded:

@ckcr4lyf
Copy link
Owner Author

ckcr4lyf commented May 2, 2022

LETS FUCKING GOOOO

@ckcr4lyf ckcr4lyf merged commit 457ba69 into master May 2, 2022
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.

2 participants