Skip to content

HTTPS_CLIENT_ERROR #313

Open
Open
@xiatian12345

Description

@xiatian12345

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'
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions