Skip to content

Conversation

@sigio
Copy link

@sigio sigio commented May 14, 2025

By setting http.Transport.Proxy = http.ProxyFromEnvironment, irmago will respect system proxy settings.
This allows use in secured or firewalled environments requiring a proxy server for outgoing HTTP(S) traffic.

This code compiles, and seems to use a proxy when setting HTTPS_PROXY

May 14 21:49:29 t480 tinyproxy[331565]: Request (file descriptor 12): CONNECT schemes.yivi.app:443 HTTP/1.1
May 14 21:49:29 t480 tinyproxy[331565]: No upstream proxy for schemes.yivi.app
May 14 21:49:29 t480 tinyproxy[331565]: opensock: opening connection to schemes.yivi.app:443
./irma.bin scheme download
No irma_configuration path specified, using /home/sigio/.local/share/irma/irma_configuration
[21:48:53.597714]  INFO downloading default schemes (may take a while)
[21:48:53.829394]  INFO checking for updates scheme=irma-demo type=issuer
[21:48:54.055701]  INFO scheme is outdated, updating scheme=irma-demo type=issuer
[21:49:32.966370]  INFO checking for updates scheme=pbdf type=issuer
[21:49:33.208570]  INFO scheme is outdated, updating scheme=pbdf type=issuer
[21:49:49.904658]  INFO Finished downloading schemes

Fixes #423

@kamphuisem
Copy link
Member

We need to verify that this change will also work with other parts of the IRMA server, because the transport is used for several parts of the IRMA server.
For example, I don't know if proxies will handle SSE correctly with default configurations.
This could also be a breaking change for existing installations, where proxies are configured on a system/user level, but are now not being used by our server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use http-proxy for outgoing connections

2 participants