mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
Moved proxy declaration to inside of try, updated websocket version to 1.5.5 from 1.5.4, and cleared up ProxyExample!
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<dependency>
|
||||
<groupId>org.java-websocket</groupId>
|
||||
<artifactId>Java-WebSocket</artifactId>
|
||||
<version>1.5.4</version>
|
||||
<version>1.5.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
package io.github.jwdeveloper.tiktok.websocket;
|
||||
|
||||
|
||||
import io.github.jwdeveloper.tiktok.*;
|
||||
import io.github.jwdeveloper.tiktok.data.dto.ProxyData;
|
||||
import io.github.jwdeveloper.tiktok.data.requests.LiveConnectionData;
|
||||
@@ -105,7 +104,6 @@ public class TikTokWebSocketClient implements SocketClient {
|
||||
}
|
||||
|
||||
public boolean tryProxyConnection(ProxyClientSettings proxySettings, ProxyData proxyData) {
|
||||
webSocketClient.setProxy(new Proxy(proxySettings.getType(), proxyData.toSocketAddress()));
|
||||
try {
|
||||
if (proxySettings.getType() == Proxy.Type.SOCKS) {
|
||||
SSLContext sc = SSLContext.getInstance("SSL");
|
||||
@@ -116,6 +114,7 @@ public class TikTokWebSocketClient implements SocketClient {
|
||||
}}, null);
|
||||
webSocketClient.setSocketFactory(sc.getSocketFactory());
|
||||
}
|
||||
webSocketClient.setProxy(new Proxy(proxySettings.getType(), proxyData.toSocketAddress()));
|
||||
webSocketClient.connect();
|
||||
return true;
|
||||
} catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user