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

windows下无法使用 #3

Open
andythink opened this issue Apr 25, 2016 · 5 comments
Open

windows下无法使用 #3

andythink opened this issue Apr 25, 2016 · 5 comments

Comments

@andythink
Copy link

andythink commented Apr 25, 2016

安装的是0.1.0 版本
启动后,浏览器代理设置到127.0.0.1:6789,不能使用

  1. chrome中提示无效的证书
  2. 打不开cnodejs.org
@wuchangming
Copy link
Owner

是否安装了根证书?
第一步:生成ca根证书

node-mitmproxy createCA

第二步,安装ca根证书:

Mac
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/node-mitmproxy/node-mitmproxy.ca.crt
windows
start %HOMEPATH%/node-mitmproxy/node-mitmproxy.ca.crt

@andythink
Copy link
Author

start %HOMEPATH%/node-mitmproxy/node-mitmproxy.ca.crt,证书导入了,还是不行

@wuchangming
Copy link
Owner

需要把证书安装到受信任的根证书目录

图示:
1、
1 pic

2、
2 pic

@andythink
Copy link
Author

可以了,但是有个问题,能不能不用手动导入证书,用一个权威机构颁发的代替node-mitmproxy.ca.crt,如果能实现这样感觉意义比较大

@wuchangming
Copy link
Owner

证书链这么设计其实是为了保证https的安全。CA证书的安装是需要的,如果可以随意生成权威机构颁发的证书让浏览器信任,证书链的安全保证就没有了。
阮一峰有篇博客讲的比较好,可以参考 《数字签名是什么?》

现在的安装ca根证书过程确实比较麻烦,我研究下有没更好的方式。你有好的建议也可以提议,期待你的Pull Request

@wuchangming wuchangming changed the title 无法使用 windows下无法使用 May 8, 2016
@wuchangming wuchangming reopened this May 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants