WorldHealthOrganization / app

COVID-19 App
Other
2.13k stars 510 forks source link

Network Proxy Settings aren't used by Flutter #1155

Open marcmcl opened 4 years ago

marcmcl commented 4 years ago

Although there is a disclaimer when specifying a proxy connection that not all apps will use it, the Android App (0.6.1) will not use it. This may cause problems for people behind either corporate firewalls or national firewalls.

A proxy can be specified for a specific network connection.

advayDev1 commented 4 years ago

All HTTP requests should use the default proxy.

marcmcl commented 4 years ago

To verify this, manually specify your IP address settings in your configuration for your network profile. Use a proxy on your local network but specify an invalid gateway which has no Internet access. Web browsers should work as should apps that honour proxy access.

Happy to test but be aware I'm on UK time.

marcmcl commented 4 years ago

I've done some more investigation and found that, as mentioned in this article, both flutter and dart do not use the system-wide proxy :

https://flutterigniter.com/debugging-network-requests/

On the Android side at least it should be possible by using a java plugin as mentioned in this stackoverflow post :

https://stackoverflow.com/questions/50082372/how-do-i-get-the-proxy-settings-of-an-android-ios-device-using-flutter/50092642#50092642

Not sure how easy it would be to implement this in time for v1.0 launch.

brunobowden commented 3 years ago

@marcmcl - would you be able to help get this in to v1? We're short staffed at the moment, so the help would be much appreciated. If not, then I think would get bumped for a future release.

marcmcl commented 3 years ago

@brunobowden I shall give it a go. Be aware I think Dart only supports unauthenticated proxies.

brunobowden commented 3 years ago

@marcmcl - I think you did some work on this. Can you post the pull request so we can look it over?

marcmcl commented 3 years ago

@brunobowden I have submitted a pull request