Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Charles web debugging proxy not detecting vpn connection

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

like image 234
user765368 Avatar asked Oct 30 '11 00:10

user765368


People also ask

Does Charles proxy work with VPN?

Charles proxy doesn't work with VPN.

How do I configure my browser to use Charles as proxy?

Go to the Settings app, tap Wi-Fi, find the network you are connected to and then tap it to configure the network. Scroll down to the HTTP Proxy setting, tap Manual. Enter the IP address of your computer running Charles in the Server field, and the port Charles is running on in the Port field (usually 8888).


5 Answers

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 :)

like image 85
Franek Kuciapa Avatar answered Oct 17 '22 03:10

Franek Kuciapa


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 :)

like image 36
enguerran Avatar answered Oct 17 '22 05:10

enguerran


Start Charles before connecting to your vpn. http://www.charlesproxy.com/documentation/faqs/vpn-not-working-with-charles/

like image 41
Clintm Avatar answered Oct 17 '22 05:10

Clintm


Charles proxy + 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 
like image 36
yoAlex5 Avatar answered Oct 17 '22 03:10

yoAlex5


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.

like image 22
Robin Daugherty Avatar answered Oct 17 '22 05:10

Robin Daugherty