package w94; import fa4.e; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import ka4.a; import pa4.h; import z94.c; public final class b implements Runnable { /* JADX WARNING: Removed duplicated region for block: B:24:0x009a */ /* JADX WARNING: Removed duplicated region for block: B:28:0x00a0 */ /* JADX WARNING: Removed duplicated region for block: B:32:0x00aa */ public void run() { String str; String str2; HttpURLConnection httpURLConnection; Throwable th5; String str3; a aVar = h.f331723b; h hVar = aVar.f331704d; String str4 = aVar.f331710j; if (str4.equals("Https")) { str = "https://119.29.29.99/conf?token=" + hVar.f281838d; } else { if (str4.equals("AesHttp")) { str3 = "aes"; } else { str3 = "des"; } str = "http://119.29.29.98/conf?id=" + hVar.f281836b + "&alg=" + str3; } HttpURLConnection httpURLConnection2 = null; String str5 = ""; try { httpURLConnection = (HttpURLConnection) new URL(str).openConnection(); try { httpURLConnection.setRequestMethod("GET"); httpURLConnection.setConnectTimeout(10000); httpURLConnection.setReadTimeout(10000); httpURLConnection.connect(); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream(), "UTF-8")); while (true) { String readLine = bufferedReader.readLine(); if (readLine == null) { break; } str5 = str5 + readLine; } bufferedReader.close(); } catch (Exception unused) { httpURLConnection2 = httpURLConnection; if (httpURLConnection2 != null) { } if (!str5.isEmpty()) { } k.c().d(); } catch (Throwable th6) { th5 = th6; httpURLConnection2 = httpURLConnection; if (httpURLConnection2 != null) { } throw th5; } } catch (Exception unused2) { if (httpURLConnection2 != null) { httpURLConnection = httpURLConnection2; httpURLConnection.disconnect(); } if (!str5.isEmpty()) { } k.c().d(); } catch (Throwable th7) { th5 = th7; if (httpURLConnection2 != null) { httpURLConnection2.disconnect(); } throw th5; } httpURLConnection.disconnect(); if (!str5.isEmpty()) { if (str4.equals("Https")) { str2 = str5; } else if (str4.equals("AesHttp")) { str2 = a.a(str5, hVar.f281837c); } else { str2 = la4.a.a(str5, hVar.f281837c); } c.b("lookup byUrl: %s, rsp: %s, raw: %s", str, str2, str5); for (String str6 : str2.split("\\|")) { String[] split = str6.split(":"); if (split[0].contains("log")) { e.f213857b = "1".equals(split[1]); } else if (split[0].contains("domain")) { e.f213856a = "1".equals(split[1]); } } boolean z15 = e.f213857b; boolean z16 = e.f213856a; if (h.f331724c) { a aVar2 = h.f331723b; aVar2.f331711k = z15; aVar2.f331718r = z16; } else { throw new IllegalStateException("DnsService".concat(" is not initialized yet")); } } k.c().d(); } }