Charles代理SSL连接不会显示主机名,只显示ips [英] Charles proxy SSL connections won't show hostnames, only ips

查看:765
本文介绍了Charles代理SSL连接不会显示主机名,只显示ips的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Charles在android和ios上调试我的应用程序。我在设备上安装了Charles CA后,在安全连接上发生了一些奇怪的事情。

I'm using Charles to debug my apps- on both android and ios. something rather strange happens, on the secured connection, after I have installed Charles CA on the devices.

在IOS上,Charles会向主机名显示请求在连接列表中,它看起来很棒。

On IOS, Charles will show the request to the hostname in the list of connections, and it looks great.

然而,在android上,它只会显示IP。我必须打开请求并检查主机名标头以找出主机名 - 这非常令人讨厌。

However, on android, it will only show the IP. I have to open the request and check for the hostname header to figure out the hostname- and that's pretty annoying.

有什么方法吗?

推荐答案

这是因为Android模拟器是一个虚拟机,而不仅仅是像iOS模拟器那样的mac os进程。
为了能够使用Android模拟器(在Android 8.0上测试)查看主机名,您必须转到设置 - >网络&互联网 - >移动网络 - >接入点名称 - >单击接入点并将代理和端口属性设置为您的查尔斯本地地址(您可以在查尔斯 - >帮助 - >本地IP地址上找到它)

This happens because Android emulator is a VM and not just a mac os process like the iOS simulator. To be able to see hostnames using Android emulator (Tested on Android 8.0) you have to go to Setting -> Network & Internet -> Mobile network -> Access point names -> Click on the access point and set Proxy and Port properties to your charles local address (You can find it on Charles -> Help -> Local IP Address)

更新:

Google已在最新版本的Android模拟器上更改了此项。现在你必须添加一个新的APN。只需创建一个具有任何名称的新APN,APN设置为http://,代理为10.0.2.2,端口为8888

Google has changed this on the last version of Android emulator. Now you have to add a new APN. Just create a new APN with any name and the APN set to "http://", proxy to 10.0.2.2 and port to 8888

这篇关于Charles代理SSL连接不会显示主机名,只显示ips的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆