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

Add support for Proxy (HTTP, SOCKS, authenticated) #38

Closed
bbottema opened this issue May 29, 2016 · 1 comment
Closed

Add support for Proxy (HTTP, SOCKS, authenticated) #38

bbottema opened this issue May 29, 2016 · 1 comment

Comments

@bbottema
Copy link
Owner

bbottema commented May 29, 2016

JavaMail only supports anonymous SOCKS proxy.

The only way to add this capability is by incorporating a SOCKS server into Simple Java Mail: it would be started when an email is being sent through Mailer.sendMail() and accepts the anonymous proxy connection from JavaMail on localhost and relays it to a proper proxy by also including a proxy client in Simple Java Mail which can connect to any proxy (HTTP, SOCKS, anonymous and authenticated).

So:

Mailer.sendMail() -> JavaMail Transport.send() (supports only anonymous SOCKS) -> Simple Java Mail temp proxy (anonymous SOCKS) -> Simple Java Mail proxy client -> the real proxy through which you want to go (HTTP, SOCKS, anonymous and authenticated)


But I don't want to balloon this library into the megabytes, because some open source proxy library included guava and netty and whatnot. Simple Java Mail is to remain a sleak library that includes everything in itself (by using the maven shade plugin).

@bbottema bbottema added this to the 4.0.0 milestone May 29, 2016
@bbottema bbottema changed the title Add support for Proxy (HTTP, SOCKS, authenticated)`` Add support for Proxy (HTTP, SOCKS, authenticated) May 29, 2016
bbottema added a commit that referenced this issue Jun 12, 2016
@bbottema
Copy link
Owner Author

I managed to adapt sockslib to a bare minimum and created a proxy bridge that does the job for authenticated SOCKS proxy support. HTTP support won't work, I think as that is a specific port and protocol.

Will be included in release 4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant