简体   繁体   English

即使安装了证书,也无法在 android 模拟器上使用 Charles 代理运行 HTTPS 内容

[英]Not able to run HTTPS content with Charles proxy on android emulator , even after installing certificate

I have to monitor react native HTTPS calls from an APP so I am using charles proxy.我必须监控来自 APP 的本机 HTTPS 调用,所以我使用的是查尔斯代理。 I have made all necessary changes : in proxy settings, have put '*' in SSL settings.我已经进行了所有必要的更改:在代理设置中,在 SSL 设置中放置了“*”。 I have changed my emulator's proxy to that of charles local IP.我已将模拟器的代理更改为查尔斯本地 IP 的代理。 But till now i am only able to monitor HTTP sites.但到目前为止,我只能监控 HTTP 站点。 I have downloaded certificate but its making no effect on the result and i am still getting that "Your connection is not private .....insecure" error.我已经下载了证书,但它对结果没有影响,我仍然收到“您的连接不是私有的......不安全”错误。 i have downloaded certificate from here http://www.charlesproxy.com/getssl/ .我已经从http://www.charlesproxy.com/getssl/下载了证书。 Can some help me , i am totally stuck over here.有人能帮我吗,我完全被困在这里。 Thanks谢谢

I know this question is 2 years ago, but in case someone comes to here with the same question, I got the emulator to process also the https requests through Charles Proxy.我知道这个问题是 2 年前的问题,但如果有人带着同样的问题来到这里,我让模拟器也通过 Charles Proxy 处理 https 请求。

Instead of relying on this useless stupid proxy setting panel provided by Android Studio, you should:与其依赖 Android Studio 提供的这个无用的愚蠢代理设置面板,您应该:

  1. Head to Settings > Network & Internet > Wi-Fi .前往设置 > 网络和互联网 > Wi-Fi
  2. Click the cogwheel icon of "AndroidWifi".单击“AndroidWifi”的齿轮图标。
  3. Click the pencil icon at the top to edit单击顶部的铅笔图标进行编辑
  4. Change the Proxy from None to Manual, then input the local IP address and the correct port into the fields below.将代理从无更改为手动,然后在下面的字段中输入本地 IP 地址和正确的端口。

Now your https requests will be routed to Charles Proxy!现在您的 https 请求将被路由到 Charles 代理!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM