private static void smethod_3(Socket socket_1, GClass123.GEnum7 genum7_0, string string_0 = "HTTP/1.1 ") { GClass123.smethod_2(socket_1, string_0 + "401 Unauthorized\r\n\r\n"); }
private void method_5(Socket socket_1) { Socket socket = null; bool flag = true; try { string string_; int num; string text; bool flag2; string string_2; byte[] array; if (GClass123.smethod_0(socket_1, out string_, out num, out text, out flag2, out string_2, out array)) { try { socket = GClass123.smethod_4(); socket.Connect(this.proxySettings_0[0].Host, this.proxySettings_0[0].Port); } catch (SocketException) { GClass123.smethod_3(socket_1, (GClass123.GEnum7)(-2147483644), "HTTP/1.1 "); flag = false; } catch (Exception) { GClass123.smethod_3(socket_1, (GClass123.GEnum7)(-2147483647), "HTTP/1.1 "); flag = false; } if (flag) { int i = 0; while (i < this.proxySettings_0.Length - 1) { ProxySettings proxySettings = this.proxySettings_0[i]; ProxySettings proxySettings2 = this.proxySettings_0[i + 1]; GClass123.GEnum7 genum = GClass123.Class3.smethod_0(socket, proxySettings2.Host, proxySettings2.Port, proxySettings); if (genum == (GClass123.GEnum7) 0) { i++; } else { GClass123.smethod_3(socket_1, genum, text); flag = false; IL_CE: if (!flag) { goto IL_12E; } ProxySettings proxySettings3 = this.proxySettings_0.Last <ProxySettings>(); genum = GClass123.Class3.smethod_0(socket, string_, num, proxySettings3); if (genum != (GClass123.GEnum7) 0) { GClass123.smethod_3(socket_1, genum, text); flag = false; goto IL_12E; } if (flag2) { GClass123.smethod_2(socket_1, text + "200 Connection established\r\nProxy-Agent: HttpToSocksProxy\r\n\r\n"); goto IL_12E; } GClass123.smethod_2(socket, string_2); if (array != null) { socket.Send(array, SocketFlags.None); goto IL_12E; } goto IL_12E; } } goto IL_CE; } } else { flag = false; } IL_12E :; } catch { flag = false; try { GClass123.smethod_3(socket_1, (GClass123.GEnum7)(-2147483647), "HTTP/1.1 "); } catch { } } finally { if (flag) { GClass123.Class2.smethod_1(socket, socket_1); } else { socket_1.smethod_3(); socket.smethod_3(); } } }