mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Throw IAE if invalid port number is given for Socks5Proxy
This commit is contained in:
parent
5c2f051c1c
commit
4e588f7908
1 changed files with 3 additions and 0 deletions
|
@ -147,6 +147,9 @@ public class Socks5Proxy {
|
|||
* @param localSocks5ProxyPort the port of the local Socks5 proxy to set
|
||||
*/
|
||||
public static void setLocalSocks5ProxyPort(int localSocks5ProxyPort) {
|
||||
if (Math.abs(localSocks5ProxyPort) > 65535) {
|
||||
throw new IllegalArgumentException("localSocks5ProxyPort must be within (-65535,65535)");
|
||||
}
|
||||
Socks5Proxy.localSocks5ProxyPort = localSocks5ProxyPort;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue