Skip to content
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

Request: Add built-in proxy support for IMAP connections #252

Open
JFuqX opened this issue Jan 1, 2025 · 0 comments
Open

Request: Add built-in proxy support for IMAP connections #252

JFuqX opened this issue Jan 1, 2025 · 0 comments

Comments

@JFuqX
Copy link

JFuqX commented Jan 1, 2025

Hello,

I'm trying to use imap-tools with HTTP/HTTPS proxies in a multi-threaded environment. Currently, the workaround is using PySocks with global socket modifications, which isn't thread-safe and causes issues when multiple connections try to use different proxies.

Proposed solution:

  1. Add proxy support directly to MailBox class
  2. Support HTTP/HTTPS/SOCKS proxies via PySocks
  3. Allow per-connection proxy configuration

Example desired usage:

mailbox = MailBox(
    "imap.gmail.com",
    proxy_type="http",
    proxy_host="proxy.example.com",
    proxy_port=8080,
    proxy_username="user",
    proxy_password="pass"
).login(email, password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant