GOUTY SSH V2 🌐 v4.2.5版本的 MD5 值为:635449b1ebcf1b9e08b24bdcbf1c404a
以下内容为反编译后的 d.java 源代码,内容仅作参考
package v8;
import com.v2ray.ang.dto.V2rayConfig;
import java.io.BufferedReader;
import java.io.StringReader;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Locale;
import java.util.Map;
import java.util.Vector;
import l9.o;
import l9.q;
public final class d {
public final String[] f10152a = {"config", "tls-server"};
public final String[] f10153b = {"tls-client", "allow-recursive-routing", "askpass", "auth-nocache", "up", "down", "route-up", "ipchange", "route-pre-down", "auth-user-pass-verify", "block-outside-dns", "client-cert-not-required", "dhcp-release", "dhcp-renew", "dh", "group", "ip-win32", "ifconfig-nowarn", "management-hold", "management", "management-client", "management-query-remote", "management-query-passwords", "management-query-proxy", "management-external-key", "management-forget-disconnect", "management-signal", "management-log-cache", "management-up-down", "management-client-user", "management-client-group", "pause-exit", "preresolve", "plugin", "machine-readable-output", "persist-key", "push", "register-dns", "route-delay", "route-gateway", "route-metric", "route-method", "status", "script-security", "show-net-up", "suppress-timestamps", "tap-sleep", "tmp-dir", "tun-ipv6", "topology", "user", "win-sys"};
public final String[][] f10154c = {new String[]{"setenv", "IV_GUI_VER"}, new String[]{"setenv", "IV_SSO"}, new String[]{"setenv", "IV_PLAT_VER"}, new String[]{"setenv", "IV_OPENVPN_GUI_VERSION"}, new String[]{"engine", "dynamic"}, new String[]{"setenv", "CLIENT_CERT"}, new String[]{"resolv-retry", "60"}};
public final HashSet f10155d = new HashSet(Arrays.asList(Arrays.copyOf(new String[]{"local", "remote", "float", "port", "connect-retry", "connect-timeout", "connect-retry-max", "link-mtu", "tun-mtu", "tun-mtu-extra", "fragment", "mtu-disc", "local-port", "remote-port", "bind", "nobind", "proto", "http-proxy", "http-proxy-retry", "http-proxy-timeout", "http-proxy-option", "socks-proxy", "socks-proxy-retry", "http-proxy-user-pass", "explicit-exit-notify"}, 25)));
public final HashMap f10156e = new HashMap();
public final HashMap f10157f = new HashMap();
public static void a(u8.a aVar, Vector vector, boolean z10) {
boolean z11 = false;
if (z10) {
Iterator it = vector.iterator();
while (it.hasNext()) {
Vector vector2 = (Vector) it.next();
int size = vector2.size();
for (int i10 = 1; i10 < size; i10++) {
if (!o9.f.d(vector2.get(i10), "block-local") && !o9.f.d(vector2.get(i10), "unblock-local")) {
if (o9.f.d(vector2.get(i10), "!ipv4")) {
z11 = true;
} else if (o9.f.d(vector2.get(i10), "ipv6")) {
aVar.Y = true;
}
}
}
}
}
if (!z10 || z11) {
return;
}
aVar.L = true;
}
public static void b(Vector vector, BufferedReader bufferedReader) {
Object obj = vector.get(0);
o9.f.k("args[0]", obj);
String str = (String) obj;
int length = str.length() - 1;
int i10 = 0;
boolean z10 = false;
while (i10 <= length) {
boolean z11 = o9.f.o(str.charAt(!z10 ? i10 : length), 32) <= 0;
if (z10) {
if (!z11) {
break;
} else {
length--;
}
} else if (z11) {
i10++;
} else {
z10 = true;
}
}
String obj2 = str.subSequence(i10, length + 1).toString();
if (!ic.n.y0(obj2, "<", false) || !ic.n.X(obj2, ">")) {
return;
}
String substring = obj2.substring(1, obj2.length() - 1);
o9.f.k("this as java.lang.String…ing(startIndex, endIndex)", substring);
String format = String.format("</%s>", Arrays.copyOf(new Object[]{substring}, 1));
o9.f.k("format(format, *args)", format);
String str2 = "[[INLINE]]";
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
String format2 = String.format("No endtag </%s> for starttag <%s> found", Arrays.copyOf(new Object[]{substring, substring}, 2));
o9.f.k("format(format, *args)", format2);
throw new c(format2);
}
int length2 = readLine.length() - 1;
int i11 = 0;
boolean z12 = false;
while (i11 <= length2) {
boolean z13 = o9.f.o(readLine.charAt(!z12 ? i11 : length2), 32) <= 0;
if (z12) {
if (!z13) {
break;
} else {
length2--;
}
} else if (z13) {
i11++;
} else {
z12 = true;
}
}
if (o9.f.d(readLine.subSequence(i11, length2 + 1).toString(), format)) {
if (ic.n.X(str2, "\n")) {
str2 = str2.substring(0, str2.length() - 1);
o9.f.k("this as java.lang.String…ing(startIndex, endIndex)", str2);
}
vector.clear();
vector.add(substring);
vector.add(str2);
return;
}
str2 = h4.a.m(str2, readLine) + '\n';
}
}
public static Vector i(String str) {
Vector vector = new Vector();
if (str.length() == 0) {
return vector;
}
String str2 = "";
int i10 = 0;
boolean z10 = false;
char c10 = 1;
char c11 = 0;
while (true) {
char charAt = i10 < str.length() ? str.charAt(i10) : (char) 0;
if (!z10 && charAt == '\\' && c10 != 2) {
z10 = true;
} else if (c10 == 1) {
if (!(Character.isWhitespace(charAt) || charAt == 0)) {
if (charAt == ';' || charAt == '#') {
break;
}
if (!z10 && charAt == '\"') {
c10 = 3;
} else if (z10 || charAt != '\'') {
c10 = 4;
c11 = charAt;
} else {
c10 = 2;
}
}
if (c10 == 5) {
vector.add(str2);
str2 = "";
c10 = 1;
c11 = 0;
}
if (z10 && c11 != 0 && c11 != '\\' && c11 != '\"') {
if (!(!Character.isWhitespace(c11) || c11 == 0)) {
throw new c("Options warning: Bad backslash ('\\') usage");
}
}
z10 = false;
} else {
if (c10 == 4) {
if (!z10) {
}
c11 = charAt;
} else if (c10 == 3) {
if (!z10) {
}
c11 = charAt;
} else if (c10 == 2) {
}
if (c10 == 5) {
}
if (z10) {
if (!(!Character.isWhitespace(c11) || c11 == 0)) {
}
}
z10 = false;
}
if (c11 != 0) {
str2 = str2 + c11;
}
int i11 = i10 + 1;
if (i10 >= str.length()) {
break;
}
i10 = i11;
}
return vector;
}
public static Vector j(String str) {
String[] strArr = (String[]) h4.a.s("=", 2, ((String[]) h4.a.s("#\\sOVPN_ACCESS_SERVER_", 2, str).toArray(new String[0]))[1]).toArray(new String[0]);
Vector vector = new Vector();
Collections.addAll(vector, Arrays.copyOf(strArr, strArr.length));
return vector;
}
public final Vector c(int i10, int i11, String str) {
HashMap hashMap = this.f10156e;
Vector vector = (Vector) hashMap.get(str);
if (vector == null) {
return null;
}
Iterator it = vector.iterator();
while (it.hasNext()) {
Vector vector2 = (Vector) it.next();
if (vector2.size() < i10 + 1 || vector2.size() > i11 + 1) {
String format = String.format(Locale.getDefault(), "Option %s has %d parameters, expected between %d and %d", Arrays.copyOf(new Object[]{str, Integer.valueOf(vector2.size() - 1), Integer.valueOf(i10), Integer.valueOf(i11)}, 4));
o9.f.k("format(locale, format, *args)", format);
throw new c(format);
}
}
hashMap.remove(str);
return vector;
}
public final Vector d(int i10, int i11, String str) {
Vector c10 = c(i10, i11, str);
if (c10 != null) {
return (Vector) c10.lastElement();
}
return null;
}
public final String e(Vector vector) {
Iterator it = vector.iterator();
String str = "";
while (it.hasNext()) {
Vector vector2 = (Vector) it.next();
o9.f.k("optionsline", vector2);
if (!f(vector2)) {
if (vector2.size() == 2 && o9.f.d("extra-certs", vector2.get(0))) {
StringBuilder p10 = h4.a.p(str);
p10.append(k7.g.p((String) vector2.get(0), (String) vector2.get(1)));
str = p10.toString();
} else {
Iterator it2 = vector2.iterator();
while (it2.hasNext()) {
String str2 = (String) it2.next();
StringBuilder p11 = h4.a.p(str);
p11.append(k7.g.r(str2));
p11.append(' ');
str = p11.toString();
}
str = str + '\n';
}
}
}
return str;
}
public final boolean f(Vector vector) {
for (String[] strArr : this.f10154c) {
if (vector.size() >= strArr.length) {
int length = strArr.length;
boolean z10 = true;
for (int i10 = 0; i10 < length; i10++) {
if (!o9.f.d(strArr[i10], vector.get(i10))) {
z10 = false;
}
}
if (z10) {
return true;
}
}
}
return false;
}
public final void g(StringReader stringReader) {
HashMap hashMap = new HashMap();
hashMap.put("server-poll-timeout", "timeout-connect");
BufferedReader bufferedReader = new BufferedReader(stringReader);
while (true) {
try {
String readLine = bufferedReader.readLine();
if (readLine == null) {
return;
}
if (ic.n.y0(readLine, "# OVPN_ACCESS_SERVER_", false)) {
Vector j10 = j(readLine);
HashMap hashMap2 = this.f10157f;
Object obj = j10.get(0);
o9.f.k("metaarg[0]", obj);
hashMap2.put(obj, j10);
} else {
Vector i10 = i(readLine);
if (i10.size() != 0) {
Object obj2 = i10.get(0);
o9.f.k("args[0]", obj2);
if (ic.n.y0((String) obj2, "--", false)) {
Object obj3 = i10.get(0);
o9.f.k("args[0]", obj3);
String substring = ((String) obj3).substring(2);
o9.f.k("this as java.lang.String).substring(startIndex)", substring);
i10.set(0, substring);
}
b(i10, bufferedReader);
String str = (String) i10.get(0);
if (hashMap.get(str) != null) {
str = (String) hashMap.get(str);
}
HashMap hashMap3 = this.f10156e;
if (!hashMap3.containsKey(str)) {
hashMap3.put(str, new Vector());
}
Object obj4 = hashMap3.get(str);
o9.f.i(obj4);
((Vector) obj4).add(i10);
}
}
} catch (OutOfMemoryError e10) {
throw new c("File too large to parse: " + e10.getLocalizedMessage());
}
}
}
public final z.c h(e eVar) {
e clone;
Collection collection;
boolean z10;
if (eVar != null) {
try {
clone = eVar.clone();
} catch (CloneNotSupportedException e10) {
e10.printStackTrace();
return null;
}
} else {
clone = new e();
}
Vector d2 = d(1, 1, "port");
if (d2 != null) {
Object obj = d2.get(1);
o9.f.k("port[1]", obj);
clone.f10159x = (String) obj;
}
Vector d10 = d(1, 1, "rport");
if (d10 != null) {
Object obj2 = d10.get(1);
o9.f.k("rport[1]", obj2);
clone.f10159x = (String) obj2;
}
Vector d11 = d(1, 1, "proto");
if (d11 != null) {
Object obj3 = d11.get(1);
o9.f.k("proto[1]", obj3);
String str = (String) obj3;
if (o9.f.d(str, "udp") || o9.f.d(str, "udp4") || o9.f.d(str, "udp6")) {
z10 = true;
} else {
if (!o9.f.d(str, "tcp-client") && !o9.f.d(str, V2rayConfig.DEFAULT_NETWORK) && !o9.f.d(str, "tcp4") && !ic.n.X(str, "tcp4-client") && !o9.f.d(str, "tcp6") && !ic.n.X(str, "tcp6-client")) {
throw new c("Unsupported option to --proto ".concat(str));
}
z10 = false;
}
clone.f10160y = z10;
}
Vector d12 = d(1, 1, "connect-timeout");
if (d12 != null) {
try {
Object obj4 = d12.get(1);
o9.f.k("connectTimeout[1]", obj4);
clone.C = Integer.parseInt((String) obj4);
} catch (NumberFormatException e11) {
String format = String.format("Argument to connect-timeout (%s) must to be an integer: %s", Arrays.copyOf(new Object[]{d12.get(1), e11.getLocalizedMessage()}, 2));
o9.f.k("format(format, *args)", format);
throw new c(format);
}
}
Vector d13 = d(1, 2, "socks-proxy");
if (d13 == null) {
d13 = d(2, 2, "http-proxy");
}
if (d13 != null) {
if (o9.f.d(d13.get(0), "socks-proxy")) {
h4.a.z("<set-?>", 3);
clone.D = 3;
clone.F = "1080";
} else {
h4.a.z("<set-?>", 2);
clone.D = 2;
}
Object obj5 = d13.get(1);
o9.f.k("proxy[1]", obj5);
clone.E = (String) obj5;
if (d13.size() >= 3) {
Object obj6 = d13.get(2);
o9.f.k("proxy[2]", obj6);
clone.F = (String) obj6;
}
}
Vector d14 = d(1, 1, "http-proxy-user-pass");
if (d14 != null) {
Object obj7 = d14.get(1);
o9.f.k("httpproxyauthhttp[1]", obj7);
List s10 = h4.a.s("\n", 0, k7.g.o((String) obj7));
if (!s10.isEmpty()) {
ListIterator listIterator = s10.listIterator(s10.size());
while (listIterator.hasPrevious()) {
if (!(((String) listIterator.previous()).length() == 0)) {
collection = o.b1(s10, listIterator.nextIndex() + 1);
break;
}
}
}
collection = q.f7430w;
String[] strArr = (String[]) collection.toArray(new String[0]);
if (strArr.length >= 2) {
clone.H = strArr[0];
clone.I = strArr[1];
clone.G = true;
}
}
c(1, 3, "remote");
Vector vector = new Vector();
HashMap hashMap = this.f10156e;
for (Map.Entry entry : hashMap.entrySet()) {
String str2 = (String) entry.getKey();
Vector vector2 = (Vector) entry.getValue();
if (eVar != null || this.f10155d.contains(str2)) {
clone.f10161z += e(vector2);
vector.add(str2);
}
}
Iterator it = vector.iterator();
while (it.hasNext()) {
hashMap.remove((String) it.next());
}
String str3 = clone.f10161z;
if (str3 != null) {
int length = str3.length() - 1;
int i10 = 0;
boolean z11 = false;
while (i10 <= length) {
boolean z12 = o9.f.o(str3.charAt(!z11 ? i10 : length), 32) <= 0;
if (z11) {
if (!z12) {
break;
}
length--;
} else if (z12) {
i10++;
} else {
z11 = true;
}
}
}
clone.A = true;
e eVar2 = new e();
e[] eVarArr = {eVar2};
eVar2.f10160y = false;
eVar2.f10158w = "127.0.0.1";
eVar2.f10159x = "2589";
return new z.c(clone, eVarArr);
}
}