URLConnection behind proxy (not reverse proxy)

Hi,

our web 1.0 application is going to be hosted in a datacenter behind a proxy.

I do not mean a reverse-proxy which matches the traffic from outside to application and back.

The old HTTPSocket had a functionality for setting up a proxy URL. The new URLConnection Class doesn’t seems to have this.

My question: how can we access foreign webservices if the app is located behind a proxy?

Thank you for the help!

maybe someone from the Xojo-staff? :see_no_evil:

URLConnection uses the system proxy settings.

1 Like

Allright, thanks for the reply.

We run our application containerized in a kubernetes cluster. The system is then a Linux container. If we set the Environment Variables, this should work, doesn’t it?

Which Library do you use in the URLConnection class on Linux?

That should probably be LibSoup 2.4-1

I have to come back to this.

We’ve set up the proxy, it is working fine:
echo $HTTPS_PROXY
And
env | grep -i proxy
telling me the right proxy setting

curl https://example.com
gives me the content of the page.

BUT, our Web-Application, which only uses the class URLConnection, is not able to load the data and times out.

What else can we do?

This is the Error-Message we get from within the try-catch:
Could not connect: Socket I/O timed out

@Greg_O_Lone what do we miss? How can we tell the URLConnection to use the system proxy?

Thanks

To clearify the case:
this proxy only works through an internal domain and without a password or username.

Here’s an old thread, which were unsolved with the same topic:

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.