Skip to content

test: add ignoreUpstreamProxyCertificate tests #582

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

Closed

Conversation

lewis-wow
Copy link
Contributor

No description provided.

jancurn and others added 30 commits August 18, 2021 09:56
Co-authored-by: Martin Adámek <banan23@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: incremental ids

* fix
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jirimoravcik and others added 29 commits February 16, 2023 15:57
* refactor: avoid accessing in custom_connect

* refactor: move asyncWrite into customConnect

* refactor: call asyncWrite directly
* Update README.md

* Update README.md

* Update README.md
This allows usage of SOCKS protocols with `anonymizeProxy`.
Fix for issue #563 

---------

Co-authored-by: Jiří Moravčík <jiri.moravcik@gmail.com>
This PR attempts to fix incorrect stats due to the reuse of target sockets for HTTP(S) protocols. 

Based on #572

Note: I was forced to upgrade `actions/cache` as `v2` was deprecated and it wouldn't run with it.
I also had to edit eslint config to run with `.` instead of `src` and excluded `tests`, because with `src` the CI was failing (no idea why).
…ors (#577)

This PR adds support for a new boolean option `ignoreProxyCertificate`. If set to `true`, certificate errors will be ignored, which can be useful for HTTPS proxies with self-signed certificates.

Usage:

```
const server = new Server({
  prepareRequestFunction: () => ({
    upstreamProxyUrl: 'https://user:pass@myproxy:8080',
    ignoreUpstreamProxyCertificate: true  // Useful for self-signed cert
  })
}).listen();
```
Anonymize:
```
anonymizeProxy({
  url: 'https://user:pass@myproxy:8080',
  ignoreProxyCertificate: true,
}).then((anonymizedURL) => {
  console.log(`Anonymized URL: ${anonymizedURL}`);
});
```
Create tunnel:
```
createTunnel(
  'https://user:pass@myproxy:8080',
  targetHost,
  { ignoreProxyCertificate: true }
).then((url) => {
  console.log('Tunnel endpoint:', url);
});
```
@lewis-wow lewis-wow closed this Mar 31, 2025
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.