-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App ignores proxy settings #26359
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'm not that familiar with the topic but try using a flutter app that accesses the internet inside a network that requires the traffic to go to a proxy to enter the internet. For example in my school all the network traffic requires going through the schools proxy for logging etc. All apps manage to access the internet except flutter apps. |
Currently waiting for this issue to be resolved before releasing the app in the stores. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It does not matter whether the proxy is detected automatically or is set manually in the system settings. The HTTP client just ignores the system-wide set proxy. |
Sorry, I misinterpreted the request. |
Sorry, title was misleading. |
Might be related to #20376. |
https://docs.flutter.io/flutter/dart-io/HttpClient/findProxy.html might help (not tried) |
The issue is not to get the http client use the specified proxy. The issue is finding out the global proxy settings. |
Might be a duplicate of #20376 See also about how to set a custom HttpClient that finds and applies proxy settings for every request: |
#20376 is caused by the same issue but is not a direct dupliacte. |
@zoechi Basically what this issue is asking for is not having to use a plugin as described in: https://stackoverflow.com/a/50092642/85472 I guess the question is is it up to Http client to automatically use the host-system (android, ios, etc) configured proxy settings or is it up to the app developer to get that setting somehow and then use:
|
Hi @christian-muertz, did you get anywhere with this? |
Hi @christian-muertz , did you fix the problem, can you share experience please? |
I am having the same issue. Any news on this topic? |
Hi, is there any plan to fix this issue in the future? Sadly for business apps this is a real problem, since many companies use some proxy configuration. And I fully agree with the previous comments, that using the system proxy should be the default behaviour. |
We also facing similar issue at corporate network on using android mobile app. tried with findProxy method, but did not get actual proxy information. @engine-flutter-autoroll, @jonahwilliams - many users facing CORP network issue, please fix as soon as possible. |
@rajasekar-mu you need to read the actually documentation you linked to,
you need to then provide a function that provides the proxy server to be used. |
@maks i provided the function on initial loading. But its return localhost for proxy value, while debugging on corporate network. At the same time perfectly working internet users to return DIRECT. are you know any other way to solve this problem on fetching proxy information form corp network? |
This one save my life. |
Has anyone solved the proxy for android 7 and up? |
HI |
I have successfully used the following method which works on android and ios. https://pub.dev/packages/http_proxy code is as follows
|
@devmgs
var client = super.createHttpClient(context);
client.badCertificateCallback =
(X509Certificate cert, String host, int port) {
return true;
};
return client; This effectively turns off all certificate checking. With it, your app is wide open to a wide range of attacks :( Granted, I don't have a better solution right now but I think we should not be happy with this workaround.. |
Does this working when use proxy with authentication (username & password)? |
This works on Android but I am still unable to make it work on iOS device does anyone have a solution to make flutter proxy aware for iOS devices. |
I create a pr #122170, but if anyone need way to send request by proxy you cloud checkout this pr |
We need a way to access the system configured proxy.
In networks where a proxy is required to enter the internet, this is critical.
Currently, I'm not able to use any flutter app in such networks where a proxy is configured in the system settings.
The text was updated successfully, but these errors were encountered: