We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我启动了一下Chapter4,有连接请求,但这个fakeServer.on('request'似乎没有任何反应:
fakeServer.on('request', (req, res) => { // 解析客户端请求 var urlObject = url.parse(req.url); let options = { protocol: 'https:', hostname: req.headers.host.split(':')[0], method: req.method, port: req.headers.host.split(':')[1] || 80, path: urlObject.path, headers: req.headers }; res.writeHead(200, { 'Content-Type': 'text/html;charset=utf-8'}); res.write(`<html><body>我是伪造的: ${options.protocol}//${options.hostname} 站点</body></html>`) res.end(); console.log(req.headers); }); fakeServer.on('error', (e) => { console.error(e); });
简易HTTPS中间人代理启动成功,端口:6789 CONNECT logreport.okjiaoyu.cn:443 CONNECT logreport.okjiaoyu.cn:443 CONNECT logreport.okjiaoyu.cn:443 CONNECT logreport.okjiaoyu.cn:443 CONNECT stupad.okjiaoyu.cn:443 CONNECT stupad.okjiaoyu.cn:443 CONNECT logreport.okjiaoyu.cn:443 CONNECT logreport.okjiaoyu.cn:443 CONNECT logreport.okjiaoyu.cn:443 CONNECT logreport.okjiaoyu.cn:443
The text was updated successfully, but these errors were encountered:
好像不行了,第四个跑不起来
Sorry, something went wrong.
No branches or pull requests
我启动了一下Chapter4,有连接请求,但这个fakeServer.on('request'似乎没有任何反应:
简易HTTPS中间人代理启动成功,端口:6789
CONNECT logreport.okjiaoyu.cn:443
CONNECT logreport.okjiaoyu.cn:443
CONNECT logreport.okjiaoyu.cn:443
CONNECT logreport.okjiaoyu.cn:443
CONNECT stupad.okjiaoyu.cn:443
CONNECT stupad.okjiaoyu.cn:443
CONNECT logreport.okjiaoyu.cn:443
CONNECT logreport.okjiaoyu.cn:443
CONNECT logreport.okjiaoyu.cn:443
CONNECT logreport.okjiaoyu.cn:443
The text was updated successfully, but these errors were encountered: