Connection through authenticating proxy fails after saving proxy credentials

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

AlexFullmoon

Posts: 6
Joined: Thu Jul 01, 2021 4:46 pm

Post by AlexFullmoon » Thu Jul 01, 2021 5:09 pm
I've got an authenticating HTTP proxy at work (plain login/password). I connect to TCP OVPN server.
Problem: if I enter proxy credentials in Viscosity manually, I can connect fine. If I save them to keychain, proxy server breaks connection. In log I get this:
Code: Select all
...
2021-07-01 10:04:48: TCP/UDP: Preserving recently used remote address: [AF_INET]10.1.250.250:8080
2021-07-01 10:04:48: Attempting to establish TCP connection with [AF_INET]10.1.250.250:8080 [nonblock]
2021-07-01 10:04:49: TCP connection established with [AF_INET]10.1.250.250:8080
2021-07-01 10:04:49: SIGUSR1[soft,init_instance] received, process restarting
...

James

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

Post by James » Tue Jul 06, 2021 4:44 pm
Hi AlexFullmoon,

If you view the saved username and password using the Keychain Access application, are they both saved correctly? You should be able to find the correct Keychain item in Keychain Access by searching for the address of your proxy server.
https://support.apple.com/en-au/guide/k ... ca1083/mac

Cheers,
James
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

AlexFullmoon

Posts: 6
Joined: Thu Jul 01, 2021 4:46 pm

Post by AlexFullmoon » Tue Jul 06, 2021 5:55 pm
Yes, credentials in keychain are correct. I tried with two different sets of proxy credentials with same results.

Also, OVPN server credentials are also saved in keychain, but they work fine.

(maybe nonsense, but it's as if Viscosity sends saved credentials too quick for the proxy to respond or something?)

James

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

Post by James » Fri Jul 09, 2021 6:10 pm
Hi AlexFullmoon,

We haven't been able to replicate any issues in Viscosity with some quick test proxy servers, but that's not to say there couldn't be any. What type of proxy are you using (HTTP or SOCKS)? What type of authentication are you using (Automatic, Basic, or NTLM)? Does your password have any special characters in it (i.e. non letter or number characters)?
maybe nonsense, but it's as if Viscosity sends saved credentials too quick for the proxy to respond or something?
The authentication details are sent along with the proxy connection request itself, so the timing shouldn't affect it.

Cheers,
James
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

AlexFullmoon

Posts: 6
Joined: Thu Jul 01, 2021 4:46 pm

Post by AlexFullmoon » Fri Jul 09, 2021 7:01 pm
Proxy is HTTP with basic authentication (squid 3.5.23). One set of credentials is literally test:12345678, another contains a couple of # in password.

Hmm. Turns out, automatic authentication also works, the problem still exists, and it gives different line in the log:
Code: Select all
...
2021-07-09 11:47:24: Attempting to establish TCP connection with [AF_INET]10.1.250.250:8080 [nonblock]
2021-07-09 11:47:26: TCP connection established with [AF_INET]10.1.250.250:8080
2021-07-09 11:47:26: Note: previous 'HTTP Proxy' credentials failed
...
It also shows notification window with „OpenVPN check error please reconnect“ (Ошибка проверки OpenVPN. Пожалуйста, переподключитесь еще раз.)

James

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

Post by James » Sat Jul 10, 2021 2:55 pm
Thanks for the additional information.

We've identified a situation that could result in the Keychain data being fetched incorrectly - it shouldn't affect most proxy setups but it's likely what you're running into. This should now be fixed in the latest beta version of Viscosity: please give it a try and let us know if you still encounter any issues.

https://www.sparklabs.com/support/kb/ar ... -versions/

Cheers,
James
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

AlexFullmoon

Posts: 6
Joined: Thu Jul 01, 2021 4:46 pm

Post by AlexFullmoon » Mon Jul 12, 2021 5:01 pm
Sat Jul 10, 2021 2:55 pmJames wrote:
We've identified a situation that could result in the Keychain data being fetched incorrectly - it shouldn't affect most proxy setups but it's likely what you're running into. This should now be fixed in the latest beta version of Viscosity: please give it a try and let us know if you still encounter any issues.

https://www.sparklabs.com/support/kb/ar ... -versions/
Problem fixed, thanks for quick solution.

AlexFullmoon

Posts: 6
Joined: Thu Jul 01, 2021 4:46 pm

Post by AlexFullmoon » Mon Jul 12, 2021 9:22 pm
Note — now I sometimes get disconnected with
Code: Select all
2021-07-12 14:15:13: Assertion failed at proxy.c:250 (strlen(p->up.username) > 0)
2021-07-12 14:15:13: Mon Jul 12 14:15:13 2021 Exiting due to fatal error
2021-07-12 14:15:13: State changed to Отключено (Process Terminated)
This might be proxy glitching (I had disconnects before) but it seems to be more frequent today, and I don't recall this lin the log in stable version.
1.9.4b1 (1572)

AlexFullmoon

Posts: 6
Joined: Thu Jul 01, 2021 4:46 pm

Post by AlexFullmoon » Mon Jul 12, 2021 9:39 pm
Mon Jul 12, 2021 9:22 pmAlexFullmoon wrote:
Note — now I sometimes get disconnected with
Code: Select all
2021-07-12 14:15:13: Assertion failed at proxy.c:250 (strlen(p->up.username) > 0)
2021-07-12 14:15:13: Mon Jul 12 14:15:13 2021 Exiting due to fatal error
2021-07-12 14:15:13: State changed to Отключено (Process Terminated)
This might be proxy glitching (I had disconnects before) but it seems to be more frequent today, and I don't recall this lin the log in stable version.
1.9.4b1 (1572)
Sorry, disregard that, same happens on 1.9.3, so in must be proxy being particularly glitchy today.
9 posts Page 1 of 1