-
-
Notifications
You must be signed in to change notification settings - Fork 673
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
Can I set a http proxy for cached_network_image in my app? #96
Comments
Not yet, will be supported in a future version. |
Got it. Waiting for this feature, because my app very need this. |
Do you still need this? |
Not anymore. Thanks! |
Hey there, I'm actually searching for a solution to this issue, my app does need to access Internet through a proxy. Do you want me to open a new issue? |
@codeknox you can manipulate the http client of the cache manager. You can see how it is done for firebase here: https://github.com/Baseflow/flutter_cache_manager/tree/develop/flutter_cache_manager_firebase/lib/src |
@jaggerwang @codeknox Has anyone solved this? Not sure how to implement the answer @renefloor is suggesting. Thanks. |
@renefloor is this something you'd consider adding support for? |
@mikezander I recommend using a global setting for proxy configuration. I don't know if you considered it, but you can override the default behaviour of any http client with // in your main
HttpOverrides.global = YourProxyHttpOverrides(); class YourProxyHttpOverrides extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext? context) {
final client = super.createHttpClient(context);
final yourProxyIp = '...';
final yourProxyPort = '...';
client.findProxy = (uri) => 'PROXY $yourProxyIp:$yourProxyPort;';
return client;
}
} |
As I know,
cached_network_image
usehttp
package in the lower ground, but I can not found how to set proxy forhttp
. Is this feature supported?The text was updated successfully, but these errors were encountered: