· Jan 25

Proxying requests via a SSH SOCKS5 Proxy


How can I send a request via a SOCKS5 proxy in IRIS, using, for example, EnsLib.REST.Operation?


I need to access APIs inside my corporate network, to which I don't have direct access from my home office. I've set up a SOCKS5 proxy via SSH on my host machine like this:

ssh -D 9999

I can then make requests with curl to the APIs I need:

curl -x socks5h://localhost:9999

And I receive a response. Simple!

Also, inside the containerized IRIS, I can execute the request:

curl -x socks5h://host.docker.internal:9999

And I get a response.

However, if I configure the REST Operation, which uses EnsLib.HTTP.OutboundAdapter under the hood, to use the proxy, like this:


I receive an error when making the request:

ERROR #5002: ObjectScript error: <WRITE>Send+214^%Net.HttpRequest.1

And the response is empty. I've tried setting the proxy server address to both socks5h://host.docker.internal and just plain host.docker.internal, but it does not make any difference.

I guess my question is: Does IRIS support proxying requests via a SOCKS5 proxy, or is HTTP(S) proxy the only way? Am I missing something here if curl works just fine? I would expect IRIS not to have any problem with it as well.

Thanks for any suggestions.

Product version: IRIS 2023.1
Discussion (2)1
Log in or sign up to continue