Use a simple check to verify proxies during registration.

This commit is contained in:
Greyson Parrelli
2021-02-03 14:55:05 -05:00
parent 51879a9c46
commit af7e736de9
4 changed files with 39 additions and 2 deletions

View File

@@ -632,6 +632,10 @@ public class SignalServiceAccountManager {
return this.pushServiceSocket.getTurnServerInfo();
}
public void checkNetworkConnection() throws IOException {
this.pushServiceSocket.pingStorageService();
}
/**
* @return The avatar URL path, if one was written.
*/

View File

@@ -885,6 +885,10 @@ public class PushServiceSocket {
}
}
public void pingStorageService() throws IOException {
makeStorageRequest(null, "/ping", "GET", null);
}
public RemoteConfigResponse getRemoteConfig() throws IOException {
String response = makeServiceRequest("/v1/config", "GET", null);
return JsonUtil.fromJson(response, RemoteConfigResponse.class);