Skip to content
Back

Proxy & Flutter Desktop

  • 0
  • Flutter
Mickaël LT
18 Sep, 2023, 13:45

Hi,

How to enforce the use of my company proxy on my Flutter application in desktop mode ?

TL;DR
The user wants to enforce the use of a company proxy in their Flutter application in desktop mode. They mention that Flutter automatically looks at the `HTTP_PROXY` and `HTTPS_PROXY` environment variables for proxy settings. They have tried to force the local proxy using code, but it did not work. The user is looking for guidance on how to enforce the use of the company proxy.
Drake
18 Sep, 2023, 16:37
Mickaël LT
19 Sep, 2023, 13:56

I've try to force my local proxy with the following code, but I didn't see any request on flutter debuger : HttpClient client = HttpClient(); client.findProxy = (url) { return HttpClient.findProxyFromEnvironment( url, environment: {"http_proxy": ..., "no_proxy": ...}); }

Drake
19 Sep, 2023, 20:07

You can't initialize a new http client because the one used inside the Appwrite SDK is different.

I was saying I expected the default client that's created inside the Appwrite SDK automatically uses the proxy already

Drake
19 Sep, 2023, 20:28

ya im pretty sure Flutter automatically looks at the HTTP_PROXY and HTTPS_PROXY env vars for the proxy settings

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more