Viscosity + Charles

Got a problem with Viscosity or need help? Ask here!

peterchen0503

Posts: 2
Joined: Thu Jun 20, 2024 10:44 am

Post by peterchen0503 » Thu Jun 20, 2024 11:09 am
hi, I am using Viscosity to connect to nord vpn, using one of the nordVPN configurations.

In my case, I am using ad1.nordvpn.com from this page: https://nordvpn.com/ovpn/
After Viscosity connection is established, I need to launch Charles (using port 8888) to capture network traffic.

What I did was to add the following two lines to the Viscosity connection settings -> under the Advanced tab,
#viscosity proxy-http localhost 8888
#viscosity proxy-https localhost 8888

When I launch Viscosity, I see that the ports are set correctly,
peter~> scutil --proxy
<dictionary> {
HTTPEnable : 1
HTTPPort : 8888
HTTPProxy : 127.0.0.1
HTTPSEnable : 1
HTTPSPort : 8888
HTTPSProxy : 127.0.0.1
}

And at this point, I can't connect to the internet.

Then I launch Charles which listens to 127.0.0.1:8888, and now I can connect to the internet.

Strange thing is, there is no traffic at all via Charles.
And when I check "scutil --proxy" again, I saw
peter@~> scutil --proxy
<dictionary> {
}



Can I get help with this ?
I would like to be able to see traffic on Charles proxy. Thank you!!!

Charles version: 4.6.6
Viscosity Version: 1.11.2

James

User avatar
Posts: 2346
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Thu Jun 20, 2024 3:26 pm
Hi peterchen0503,

The documentation for Charles Proxy indicates that it can set and remove proxy settings, so it sounds likely it's probably removing or overriding the proxy settings set for the VPN connection:
Charles can automatically configure the macOS system proxy settings so that Safari and other macOS applications automatically start using Charles. When you first install Charles you will be prompted to grant permissions to Charles to autoconfigure the proxy settings. After that, Charles will configure and then reconfigure the macOS proxy settings whenever Charles is started or quit. Charles proxy configuration behaviour can be changed in Charles in the Proxy Menu, Proxy Settings dialog.
I recommend you try turning off Charles Proxy's ability to do that, so the VPN proxy settings are left in place, and see how you get on.

Also possibility relevant for what you're trying to do, I noticed this in the documentation:
In order to use HTTP 2 with Charles from Safari you must use Charles in SOCKS mode. See the Proxy Settings for configuring SOCKS.
So you might need to set the SOCKS proxy settings for your VPN connection as well.

If you're still stuck I recommend out to Charles Proxy's support staff and see if they're able to offer any insight.

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

peterchen0503

Posts: 2
Joined: Thu Jun 20, 2024 10:44 am

Post by peterchen0503 » Fri Jun 21, 2024 5:01 am
Thank you so much, James, for sharing your insights.
Really appreciated your help and time!
3 posts Page 1 of 1