8000 [enhancement] Add getter for Authenticated SOCKS server port by varyoo · Pull Request #563 · bbottema/simple-java-mail · GitHub
[go: up one dir, main page]

Skip to content

[enhancement] Add getter for Authenticated SOCKS server port #563

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

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

varyoo
Copy link
Contributor
@varyoo varyoo commented Nov 21, 2024

It is already possible to let the OS allocate an ephemeral port when starting the SOCKS proxy server with port = 0.

This very simple PR allows to retrieve the allocated port after the server is started by introducing a getter :

AnonymousSocks5Server s = new AnonymousSocks5ServerImpl(new AuthenticatingSocks5Bridge(socksProxyConfig), 0);
// Get SOCKS server port
int port = s.getLocalPort();

So it can be used in other projects.

@bbottema bbottema merged commit 2ab2e71 into bbottema:master Nov 25, 2024
1 check passed
@varyoo
Copy link
Contributor Author
varyoo commented Nov 25, 2024

Thanks, is a new release planned?

@bbottema bbottema added this to the 8.12.3 milestone Nov 25, 2024
@bbottema bbottema changed the title [Authenticated SOCKS module] Let the OS allocate an ephemeral port [Authenticated SOCKS module] Add getter for server port Nov 25, 2024
@bbottema bbottema changed the title [Authenticated SOCKS module] Add getter for server port [enhancement] Add getter for Authenticated SOCKS server port Nov 25, 2024
@bbottema
Copy link
Owner

Released in 8.12.3!

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

Successfully merging this pull request may close these issues.

2 participants
0