jakartaee / jakartaee/mail-api

Custom SOCKS5 0x80 proxy authentication for IMAPS access

Open
#531 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
285
Forks
109
Avg merge
15h 19m
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**
My problem is that I have a very specific SOCKS5 proxy to retrieve my emails through. This proxy only accepts a [0x80 / X'80'](https://www.ietf.org/rfc/rfc1928.txt) authentication with a JWT token. Unfortunately the SOCKS5 proxy which is built into the package only allows basic authentication.
For non-SSL SMTP access I was able to create a workaround using my own Socket implementation and the `com.sun.mail.smtp.SMTPTransport`. For IMAPS my problem is that I can't just put a custom Socket in there since I a. don't want to mess with the security layer and b. haven't even found a workaround to do this so far.

The resulting problem for me is: I cannot access my IMAPS Server.

**Describe the solution you'd like**
A custom authentication callback for the SOCKS5 proxy being used, so I can implement the proxy authentication myself.

**Describe alternatives you've considered**
Creating an SSLSocket from my existing custom socket implementation but this poses two problems:

1. I wasn't able to get an SSLSocket from my custom Socket yet
2. I still don't know how I would use that SSLSocket to retrieve emails from the IMAP server

**Additional context**

Contributor guide

Open the contributing guide

Research direction

Start by locating the package's built-in SOCKS5 authentication and the IMAPS connection entry point, then review how a custom authentication callback could be exposed without bypassing TLS. Define what the 0x80/JWT exchange must receive and return, and verify IMAPS can use it; the issue names no files or tests, so repository exploration is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, authentication, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.