Enough-Software / enough_mail

IMAP, POP3 and SMTP clients for Dart developers. Contains both low level as well as a high level API.
Mozilla Public License 2.0
100 stars 56 forks source link

added web support #206

Closed xonaman closed 1 year ago

robert-virkus commented 1 year ago

I realize that you're closed the PR, but I still want to thank you for your effort. I believe the approach would not work, as TCP/IP sockets are not possible on web browsers. So we would need some sort of proxy support, which in turn would result in horrible security implications... Do you agree?

All the best, Robert

xonaman commented 1 year ago

Yes, you’re right. But if we replace SecureSocket with WebSocketChannel in discovery_helper.dart (which I forgot in the first place, that’s why I closed it), at least the discovery feature would work for the web (which is exactly what I need). Have already implemented and tested this, but not pushed yet. If you like to, I could open another PR with this.

On 25. Aug 2022, at 17:51, Robert Virkus @.***> wrote:

 I realize that you're closed the PR, but I still want to thank you for your effort. I believe the approach would not work, as TCP/IP sockets are not possible on web browsers. So we would need some sort of proxy support, which in turn would result in horrible security implications... Do you agree?

All the best, Robert

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.

robert-virkus commented 1 year ago

Thanks, I think that integrating the whole enough_mail package just for doing discovery on the web is a bit overkikll. Should we move the discovery functionality to another project and make that one available for all platforms?

xonaman commented 1 year ago

Good idea. If you don’t mind, I would publish my implementation as mail_discovery and give you credits in the readme.

On 25. Aug 2022, at 18:06, Robert Virkus @.***> wrote:

 Thanks, I think that integrating the whole enough_mail package just for doing discovery on the web is a bit overkikll. Should we move the discovery functionality to another project and make that one available for all platforms?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.

robert-virkus commented 1 year ago

I would rather keep this in the family in case I need to do changes. I have now moved the code here: https://github.com/Enough-Software/enough_mail_discovery https://pub.dev/packages/enough_mail_discovery Demo: https://enough.de/enough_mail_discovery/

xonaman commented 1 year ago

Okay, I will create a PR with the web integration in the next few days.

On 26. Aug 2022, at 22:24, Robert Virkus @.***> wrote:

 I would rather keep this in the family in case I need to do changes. I have now moved the code here: https://github.com/Enough-Software/enough_mail_discovery https://pub.dev/packages/enough_mail_discovery Demo: https://enough.de/enough_mail_discovery/

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.

robert-virkus commented 1 year ago

Thanks, but note that enough_mail_discovery already supports web.

On non-web platforms more settings can be discovered, specifically when the mail service has not set up any discovery support. In that case several common scenarios are probed, but this can only be done when sockets are supported.

xonaman commented 1 year ago

Yes, but if we would use WebSocketChannel on web instead of SecureSocket we could make the „discover more settings“ feature also available on the web. This is what is meant.

On 30. Aug 2022, at 21:32, Robert Virkus @.***> wrote:

 Thanks, but note that enough_mail_discovery already supports web.

On non-web platforms more settings can be discovered, specifically when the mail service has not set up any discovery support. In that case several common scenarios are probed, but this can only be done when sockets are supported.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.

robert-virkus commented 1 year ago

Sounds exciting, looking forward to test your your approach!

xonaman commented 1 year ago

Yes, but if we would use WebSocketChannel on web instead of SecureSocket we could make the „discover more settings“ feature also available on the web. This is what is meant.

On 30. Aug 2022, at 21:32, Robert Virkus @.***> wrote:

 Thanks, but note that enough_mail_discovery already supports web.

On non-web platforms more settings can be discovered, specifically when the mail service has not set up any discovery support. In that case several common scenarios are probed, but this can only be done when sockets are supported.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.

robert-virkus commented 1 year ago

AFAIK you cannot connect via web socket to a standard TCP Socket service such as IMAP or SMTP. If you have found a solution for this it would be amazing, so keep up the good work! 😊

hatch01 commented 11 months ago

Hey, I'd like to implement the possibility to use a web socket proxy in enough mail. I know it's an enormous potential security issue, so I will add a warning in the documentation and a print at IMAP, SMTP or other client creations. I will also recommend a proxy that is safe or create one myself to be 100% sure of what's in. Would it be possible to include it in the repo ?

hatch01 commented 11 months ago

I'd like to use a proxy like : https://github.com/novnc/websockify https://github.com/novnc/websockify-other (c version for maximum performance) https://github.com/aberbegall/dartsockify (to keep dart everywhere)