Skip to content

chapter4 #3

Description

@nangua509

hello,我试着跑了一个chapter4的代码,碰到了以前错误,请问是什么情况?
CONNECT v10.events.data.microsoft.com:443
_tls_common.js:61
throw new ERR_INVALID_ARG_TYPE(
^

TypeError [ERR_INVALID_ARG_TYPE]: The "options.cert" property must be one of type string, Buffer, TypedArray, or DataView. Received type object
at validateKeyCert (_tls_common.js:61:11)
at Object.createSecureContext (_tls_common.js:122:7)
at Server (_tls_wrap.js:867:27)
at new Server (https.js:62:14)
at createFakeHttpsWebSite (C:\Users\Administrator\Desktop\code\https-mitm-proxy-handbook\code\chapter4\createFakeHttpsWebSite.js:41:22)
at Server.httpTunnel.on (C:\Users\Administrator\Desktop\code\https-mitm-proxy-handbook\code\chapter4\simpleHttpsProxy.js:34:3)
at Server.emit (events.js:182:13)
at onParserExecuteCommon (_http_server.js:535:14)
at onParserExecute (_http_server.js:482:3)

在44行加了打印,并没有打印出来

SNICallback: (hostname, done) => {
console.log(123)
let certObj = createFakeCertificateByDomain(caKey, caCert, hostname)
console.log(certObj);

我run在windows环境上
$ node -v
v10.8.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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