I did some research on your problem, it seems to be something actually on the host machine blocking your proxy connection, I don't think your issue has to do with the code itself, but rather the firewall on the system you are attempting to run the software on.
I am a software engineer and a systems operator, so regardless if the problem is in code or on the system, I should be able to help you with your problem.
Thank you for your consideration of my proposal,
Dylan