Charles Web 调试代理未检测到 VPN 连接

发布于 2024-12-12 19:34:40 字数 116 浏览 0 评论 0 原文

我有一个 VPN 连接,正在使用 Charles Web 调试代理测试一些网站,但 Charles 似乎没有检测到我的 VPN 连接,因为它没有检测到我在 VPN 网络上运行的网站。有什么帮助吗?

谢谢

I have a VPN connection on which I'm testing some websites using Charles Web Debugging Proxy, but Charles doesn't seem to detect my VPN connection because it doesn't detect the websites that I'm running on the VPN network. Any help please?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

葬﹪忆之殇 2024-12-19 19:34:40

我在 Mac 上也遇到了同样的问题,但已经解决了。本质上,在连接到 VPN 之后,Charles 将停止记录所有 http 流量,无论它是在建立 VPN 连接之前还是之后启动

。问题出在系统级别的自动代理配置上。

我在“系统偏好设置”中打开了“自动代理配置”和“自动代理配置”网络设置>您的网络>高级

我无法通过 UI 将它们关闭,因为它们被 VPN 计算机上的公司策略禁用/灰显,但我能够从终端运行 2 个 shell 命令,尽管这将这两个选项都关闭了在启动 Charles 之前和连接到 VPN 之前(我想您需要帐户的管理员访问权限才能运行这些)。

networksetup -setautoproxystate Wi-Fi off
networksetup -setproxyautodiscovery Wi-Fi off

Wi-Fi 恰好是我正在运行的网络接口的名称。如果您是硬连线,您的可能是以太网。

这基本上取消了网络设置中的两个选项,使自动代理的 URL 保持不变。如果您可以通过 UI 取消选中这两个复选框 - 那就更好了。

到目前为止一切顺利,但您还没有完成!!

您需要找出公司代理的真实 IP 地址,并将其输入到 Charles 的“外部代理设置”下。您的 VPN 配置可能指向外部配置文件。当您取消选中“自动代理配置”时,带有配置的 URL 应显示在“代理配置文件”文本框中。下载该文件,找到代理设置,然后在 Charles 的外部代理设置中输入这些设置。

瞧 - 启动 Charles,启动 VPN - 即使我使用 VPN,所有 HTTP 流量都流经 Charles - 正是我所需要的。

希望这对您有帮助,并且您正在 MAC 上运行它:)

I had the same problem on my Mac but was able to solve it. Essentially after connecting to VPN Charles would stop recording all http traffic regardless of whether it was started before or after VPN connection was established

The problem was with Auto Proxy configuration at the system level.

I had Auto Proxy Config and Automatic Proxy Configuration turned ON in System Preferences> Network Settings>You network>Advanced

I was not able to turn them off via UI because they were disabled/greyed out by the corporate policy on the VPN machine but I was able to run 2 shell commands from the terminal though which turned both options OFF before starting Charles and before connecting to VPN (you will need admin access on your account to run these I suppose).

networksetup -setautoproxystate Wi-Fi off
networksetup -setproxyautodiscovery Wi-Fi off

Wi-Fi happens to be the name of the network interface I am running. If you are hard wired, yours could be Ethernet.

This essentially unticked both options in Network Settings leaving the URL for auto proxy intact. If you can untick these 2 checkboxes via the UI - even better.

Great so far but you aren't done yet!!

You need to figure out the true IP address of your corporate proxy and enter it under External Proxy Settings in Charles. Your VPN configuration might be pointing to an external configuration file. When you uncheck "Automatic Proxy configuration", the URL with the configuration should show in the "Proxy Configuration File" text box. Download that file, find the proxy setting, and enter those in the External Proxy Settings in Charles.

Voila - start Charles, start VPN - all HTTP traffic is flowing through Charles even when I am on VPN - precisely what I needed.

Hope this helps and you are running this on a MAC :)

蓝色星空 2024-12-19 19:34:40

对于粘度:

将其添加到

dhcp-option HTTPPROXY 127.0.0.1:8888
dhcp-option HTTPSPROXY 127.0.0.1:8888

连接设置中的“高级”选项卡下。

Charles 现在将使用 Viscosity :)

For Viscosity:

Add this

dhcp-option HTTPPROXY 127.0.0.1:8888
dhcp-option HTTPSPROXY 127.0.0.1:8888

in the connection settings, under the tab "Advanced".

Charles will now work with Viscosity :)

此岸叶落 2024-12-19 19:34:40

查尔斯代理和隧道熊

1. run Charles
2. Charles -> Proxy -> MacOS Proxy
3. Charles -> Stop Recording
4. Charles -> Stop SSL Proxying 

5. run Tunnel Bear

6. Charles -> Start Recording
7. Charles -> Start SSL Proxying 

Charles proxy and Tunnel Bear

1. run Charles
2. Charles -> Proxy -> MacOS Proxy
3. Charles -> Stop Recording
4. Charles -> Stop SSL Proxying 

5. run Tunnel Bear

6. Charles -> Start Recording
7. Charles -> Start SSL Proxying 
眼眸里的那抹悲凉 2024-12-19 19:34:40

使用 Chrome 和 Viscosity 作为我的 VPN 客户端,在连接 VPN 时,我无法从 Chrome 获得任何通过 Charles 的流量。

我的解决方案是使用火狐浏览器。这可能是因为 Firefox 建立自己的代理连接(因此有自己的代理设置),而 Chrome 和 Safari 则遵循 MacOS 建立 HTTP 连接。

Using Chrome and Viscosity as my VPN client, I'm unable to get any traffic from Chrome to go through Charles while the VPN is connected.

My solution is to use Firefox. It's probably because Firefox makes its own proxy connections (and therefore has its own proxy settings), while Chrome and Safari defer to MacOS to make the HTTP connection.

审判长 2024-12-19 19:34:40

我成功地使用我的 VPN 来使用 Charles,设置如下:

  1. 打开 charles ->帮助-> SSL 代理 -> “安装查尔斯根
    移动设备或远程浏览器上的证书”。这应该显示
    带有代理 IP 和端口的对话框
  2. 打开“系统偏好设置”->网络。选择您的 VPN 并按
    “高级”
  3. 转到“代理”,然后执行“Web 代理”、“安全 Web 代理”的下一步
    和“SOCKS 代理”:

    • 选中复选框
    • 对于“网络代理服务器”,输入“127.0.0.1”
    • 对于端口,请输入 Charles 帮助对话框中的端口

它应该可以工作,直到 VPN 和 Charles 运行。 重新启动 VPN 或 Charles 后,您可以再次更改设置。
不是最好的解决方案,但至少它有效。

I managed to work Charles with my VPN with the next settings:

  1. Open charles -> Help -> SSL Proxying -> "Install Charles Root
    certificates on Mobile Device Or Remote Browser". This should show a
    dialog with proxy IP and port
  2. Open "System Preferences" -> Network. Select your VPN and press
    "Advenced"
  3. Go to "Proxies", and do the next for "Web Proxy", "Secure Web Proxy"
    and "SOCKS Proxy":

    • check the checkbox
    • for "web proxy server" enter "127.0.0.1"
    • for port enter the port from Charles Help dialog

It should work till VPN and Charles is running. After relaunch VPN or Charles you may change settings again.
Not the best solution, but at least it works.

海未深 2024-12-19 19:34:40

这是一个老问题,但不幸的是仍然有效。对于 macOS 上的 NordVPN,所有答案都不适合我,但我最终可以使用以下步骤解决它:

  1. 按照本教程在 macOS VPN 系统设置中创建 VPN 连接:https://support.nordvpn.com/hc/en-us/articles/20286152661521-How-to-connect-to-NordVPN-with-IKEv2-IPSec-on-macOS-Ventura-version

    1. 您需要使用 Nord VPN 服务凭据:https:/ /my.nordaccount.com/dashboard/nordvpn/manual-configuration/

    2. 您需要知道要连接的 Nord VPN 服务器,请使用 https:// nordvpn.com/servers/tools/ 找到合适的

  2. 系统设置下 -> VPN ->您新添加的 NordVPN 连接 -> (i) 按钮 -> 代理,启用Web代理(HTTP)Web代理(HTTPS)并使用127.0.0.1和端口8888(或者您配置的任何Charles使用代理)

  3. 通过 macOS VPN 设置中的新条目而不是 NordVPN 应用进行连接

This is an old question but still valid unfortunately. None of the answers worked for me with NordVPN on macOS, but I finally could resolve it using the following steps:

  1. Create a VPN connection in the macOS VPN system settings, following this tutorial: https://support.nordvpn.com/hc/en-us/articles/20286152661521-How-to-connect-to-NordVPN-with-IKEv2-IPSec-on-macOS-Ventura-version

    1. You need to use the Nord VPN service credentials: https://my.nordaccount.com/dashboard/nordvpn/manual-configuration/

    2. You need to know the Nord VPN server you want to connect to, use https://nordvpn.com/servers/tools/ to find the right one

  2. Under System Settings -> VPN -> Your newly added NordVPN connection -> (i) button -> Proxies, enable Web proxy (HTTP) and Web proxy (HTTPS) and use 127.0.0.1 and port 8888 (or whatever you have configured Charles Proxy to use)

  3. Connect via the new entry in the macOS VPN settings and NOT the NordVPN app

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文