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

HTTPS_CLIENT_ERROR #313

Open
xiatian12345 opened this issue Jan 9, 2025 · 0 comments
Open

HTTPS_CLIENT_ERROR #313

xiatian12345 opened this issue Jan 9, 2025 · 0 comments

Comments

@xiatian12345
Copy link

0.these is my reproduction steps
1.the https samplecode:test.js
`javascript
const Proxy = require('http-mitm-proxy').Proxy;
const proxy = new Proxy();

proxy.onError(function (ctx, err) {
console.error('proxy error:', err);
});

proxy.onRequest(function (ctx, callback) {
console.log('request-->:', ctx.clientToProxyRequest.headers.host);
return callback();
});

console.log('begin listening on 8084')
proxy.listen({ httpsPort: 8084, forceSNI: true });
2.find the pem ./.http-mitm-proxy/ca.pem and open 'ca.pem' with Keychain and trust it. 3.run the code: node test.js 4.open the network settings, enable the HTTPS proxy, and set the port to 8084. 5.open https://example.com in chrome 6.get the error
HTTPS_CLIENT_ERROR
[Error: C0C7925DF87F0000:error:0A00009B:SSL routines:ssl3_get_record:https proxy request:../deps/openssl/openssl/ssl/record/ssl3_record.c:349:
] {
library: 'SSL routines',
reason: 'https proxy request',
code: 'ERR_SSL_HTTPS_PROXY_REQUEST'
}
proxy error: [Error: C0C7925DF87F0000:error:0A00009B:SSL routines:ssl3_get_record:https proxy request:../deps/openssl/openssl/ssl/record/ssl3_record.c:349:
] {
library: 'SSL routines',
reason: 'https proxy request',
code: 'ERR_SSL_HTTPS_PROXY_REQUEST'
}
`

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

No branches or pull requests

1 participant