解决方法是连接到http://localhost.charlesproxy.com/。这指向IP地址127.0.0.1,因此它应该与localhost完全相同,但它的优势在于它将通过Charles。无论Charles是在跑,还是在使用Charles,这都会有效。如果您使用其他端口,例如8080,只需像往常一样添加它,
例如 localhost.charlesproxy.com:8080。
比如我们要访问的是http://localhost:8100, 只需要点击tool->map remote,配置成如下图
使用http://localhost.charlesproxy.com:3000/manage去访问http://localhost:8100即可