Open gzlock opened 2 years ago
What's your use-case? If you have set up a proxy on your system, this should be transparent to any network app as far as I understand....
What's your use-case? If you have set up a proxy on your system, this should be transparent to any network app as far as I understand....
I'm chinese, my browser can open google.com when I use a proxy application
But I follow the example(High Level API) and try to connect google server(gmail account), the console show connect dns.google.com timeout.
I tried it on the flutter windows desktop mode.
BTW, I used the ThunderBird mail application, I can’t login to gmail when I use it by default, but it provided the network proxy settings, and I set the proxy to 127.0.0.1:7890, it can login gmail.
This seems to be an problem for Dart and Flutter, compare for example
I have found this GPL-licensed library that allows to connect via Socks5: https://github.com/v0l/socks5
One idea could be to abstract sockets in enough_mail and allow clients to specify a SocketFactory
or similar.
Thoughts? Ideas? Suggestions?
It can be done like the dio package, allowing proxy settings https://pub.dev/packages/dio#using-proxy
import 'package:dio/dio.dart';
import 'package:dio/adapter.dart';
...
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
// config the http client
client.findProxy = (uri) {
//proxy all request to localhost:8888
return 'PROXY localhost:8888';
};
// you can also create a new HttpClient to dio
// return HttpClient();
};
Dio just exposes the dart:io
HttpClient
's findProxy(Uri)
callback. While I agree that this would be a nice API, I have no idea how to implement this. I cannot integrate with the above mentioned socks5
project, as that is licensed under the GPL-copy-left license and this does not mix with this project's MPL license.
So either this would need to be re-implemented or solved differently.
The underlying question is:
Socket
through a socks5
proxy?I have a same question.. (maybe it's so late..? lol) How can i use socks proxy?
Has this problem been solved?
I checked the enough_mail document and no such content.