mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 21:42:07 +01:00
Merge pull request #492 from Flowdalic/start-local-socks5-proxy
Start local SOCKS5 proxy
This commit is contained in:
commit
dac8b728b4
1 changed files with 6 additions and 6 deletions
|
@ -615,10 +615,8 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
|
|||
if (annouceLocalStreamHost) {
|
||||
// add local proxy on first position if exists
|
||||
List<StreamHost> localProxies = getLocalStreamHost();
|
||||
if (localProxies != null) {
|
||||
streamHosts.addAll(localProxies);
|
||||
}
|
||||
}
|
||||
|
||||
// query SOCKS5 proxies for network settings
|
||||
for (Jid proxy : proxies) {
|
||||
|
@ -652,12 +650,14 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
|
|||
|
||||
/**
|
||||
* Returns the stream host information of the local SOCKS5 proxy containing the IP address and
|
||||
* the port or null if local SOCKS5 proxy is not running.
|
||||
* the port. The returned list may be empty if the local SOCKS5 proxy is not running.
|
||||
*
|
||||
* @return the stream host information of the local SOCKS5 proxy or null if local SOCKS5 proxy
|
||||
* is not running
|
||||
* @return the stream host information of the local SOCKS5 proxy
|
||||
*/
|
||||
public List<StreamHost> getLocalStreamHost() {
|
||||
// Ensure that the local SOCKS5 proxy is running (if enabled).
|
||||
Socks5Proxy.getSocks5Proxy();
|
||||
|
||||
List<StreamHost> streamHosts = new ArrayList<>();
|
||||
|
||||
XMPPConnection connection = connection();
|
||||
|
|
Loading…
Reference in a new issue