mirror of
https://github.com/amnezia-vpn/amneziawg-android.git
synced 2026-07-03 14:05:13 +02:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 02ee7d113e | |||
| 61e67e7666 | |||
| 704964c22a | |||
| 7aea733671 | |||
| 0a6ffdb50b | |||
| e923447471 | |||
| 7b4bf60271 | |||
| 6cab3754e1 | |||
| 97a4fb5c43 | |||
| 2eacd8f376 | |||
| e7f0e9c75a | |||
| fc2daa27f4 | |||
| 305b3df553 | |||
| 564ca414f9 | |||
| 8f749140f4 | |||
| e94eaa845d | |||
| 17f465f57c | |||
| 536e35b466 | |||
| b95a204b6d | |||
| 80d3ad3d8e | |||
| 8f1c895b4f | |||
| 0235d82099 | |||
| 3800c798a3 | |||
| 713183a92d | |||
| 3f825d14a3 | |||
| 9773380849 | |||
| b3b1b16061 | |||
| 9ddccd6fb0 |
+2
-2
@@ -27,8 +27,8 @@ include(":tunnel")
|
|||||||
include(":ui")
|
include(":ui")
|
||||||
|
|
||||||
configure<SettingsExtension> {
|
configure<SettingsExtension> {
|
||||||
buildToolsVersion = "34.0.0"
|
buildToolsVersion = "35.0.0"
|
||||||
compileSdk = 34
|
compileSdk = 35
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
ndkVersion = "26.1.10909125"
|
ndkVersion = "26.1.10909125"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,10 +84,17 @@ public class BadConfigException extends Exception {
|
|||||||
JUNK_PACKET_MAX_SIZE("JunkPacketMaxSize"),
|
JUNK_PACKET_MAX_SIZE("JunkPacketMaxSize"),
|
||||||
INIT_PACKET_JUNK_SIZE("InitPacketJunkSize"),
|
INIT_PACKET_JUNK_SIZE("InitPacketJunkSize"),
|
||||||
RESPONSE_PACKET_JUNK_SIZE("ResponsePacketJunkSize"),
|
RESPONSE_PACKET_JUNK_SIZE("ResponsePacketJunkSize"),
|
||||||
|
COOKIE_REPLY_PACKET_JUNK_SIZE("CookieReplyPacketJunkSize"),
|
||||||
|
TRANSPORT_PACKET_JUNK_SIZE("TransportPacketJunkSize"),
|
||||||
INIT_PACKET_MAGIC_HEADER("InitPacketMagicHeader"),
|
INIT_PACKET_MAGIC_HEADER("InitPacketMagicHeader"),
|
||||||
RESPONSE_PACKET_MAGIC_HEADER("ResponsePacketMagicHeader"),
|
RESPONSE_PACKET_MAGIC_HEADER("ResponsePacketMagicHeader"),
|
||||||
UNDERLOAD_PACKET_MAGIC_HEADER("UnderloadPacketMagicHeader"),
|
UNDERLOAD_PACKET_MAGIC_HEADER("UnderloadPacketMagicHeader"),
|
||||||
TRANSPORT_PACKET_MAGIC_HEADER("TransportPacketMagicHeader");
|
TRANSPORT_PACKET_MAGIC_HEADER("TransportPacketMagicHeader"),
|
||||||
|
SPECIAL_JUNK_I1("SpecialJunkI1"),
|
||||||
|
SPECIAL_JUNK_I2("SpecialJunkI2"),
|
||||||
|
SPECIAL_JUNK_I3("SpecialJunkI3"),
|
||||||
|
SPECIAL_JUNK_I4("SpecialJunkI4"),
|
||||||
|
SPECIAL_JUNK_I5("SpecialJunkI5");
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,17 @@ public final class Interface {
|
|||||||
private final Optional<Integer> junkPacketMaxSize;
|
private final Optional<Integer> junkPacketMaxSize;
|
||||||
private final Optional<Integer> initPacketJunkSize;
|
private final Optional<Integer> initPacketJunkSize;
|
||||||
private final Optional<Integer> responsePacketJunkSize;
|
private final Optional<Integer> responsePacketJunkSize;
|
||||||
private final Optional<Long> initPacketMagicHeader;
|
private final Optional<Integer> cookieReplyPacketJunkSize;
|
||||||
private final Optional<Long> responsePacketMagicHeader;
|
private final Optional<Integer> transportPacketJunkSize;
|
||||||
private final Optional<Long> underloadPacketMagicHeader;
|
private final Optional<String> initPacketMagicHeader;
|
||||||
private final Optional<Long> transportPacketMagicHeader;
|
private final Optional<String> responsePacketMagicHeader;
|
||||||
|
private final Optional<String> underloadPacketMagicHeader;
|
||||||
|
private final Optional<String> transportPacketMagicHeader;
|
||||||
|
private final Optional<String> specialJunkI1;
|
||||||
|
private final Optional<String> specialJunkI2;
|
||||||
|
private final Optional<String> specialJunkI3;
|
||||||
|
private final Optional<String> specialJunkI4;
|
||||||
|
private final Optional<String> specialJunkI5;
|
||||||
|
|
||||||
private Interface(final Builder builder) {
|
private Interface(final Builder builder) {
|
||||||
// Defensively copy to ensure immutability even if the Builder is reused.
|
// Defensively copy to ensure immutability even if the Builder is reused.
|
||||||
@@ -71,10 +78,17 @@ public final class Interface {
|
|||||||
junkPacketMaxSize = builder.junkPacketMaxSize;
|
junkPacketMaxSize = builder.junkPacketMaxSize;
|
||||||
initPacketJunkSize = builder.initPacketJunkSize;
|
initPacketJunkSize = builder.initPacketJunkSize;
|
||||||
responsePacketJunkSize = builder.responsePacketJunkSize;
|
responsePacketJunkSize = builder.responsePacketJunkSize;
|
||||||
|
cookieReplyPacketJunkSize = builder.cookieReplyPacketJunkSize;
|
||||||
|
transportPacketJunkSize = builder.transportPacketJunkSize;
|
||||||
initPacketMagicHeader = builder.initPacketMagicHeader;
|
initPacketMagicHeader = builder.initPacketMagicHeader;
|
||||||
responsePacketMagicHeader = builder.responsePacketMagicHeader;
|
responsePacketMagicHeader = builder.responsePacketMagicHeader;
|
||||||
underloadPacketMagicHeader = builder.underloadPacketMagicHeader;
|
underloadPacketMagicHeader = builder.underloadPacketMagicHeader;
|
||||||
transportPacketMagicHeader = builder.transportPacketMagicHeader;
|
transportPacketMagicHeader = builder.transportPacketMagicHeader;
|
||||||
|
specialJunkI1 = builder.specialJunkI1;
|
||||||
|
specialJunkI2 = builder.specialJunkI2;
|
||||||
|
specialJunkI3 = builder.specialJunkI3;
|
||||||
|
specialJunkI4 = builder.specialJunkI4;
|
||||||
|
specialJunkI5 = builder.specialJunkI5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,6 +142,12 @@ public final class Interface {
|
|||||||
case "s2":
|
case "s2":
|
||||||
builder.parseResponsePacketJunkSize(attribute.getValue());
|
builder.parseResponsePacketJunkSize(attribute.getValue());
|
||||||
break;
|
break;
|
||||||
|
case "s3":
|
||||||
|
builder.parseCookieReplyPacketJunkSize(attribute.getValue());
|
||||||
|
break;
|
||||||
|
case "s4":
|
||||||
|
builder.parseTransportPacketJunkSize(attribute.getValue());
|
||||||
|
break;
|
||||||
case "h1":
|
case "h1":
|
||||||
builder.parseInitPacketMagicHeader(attribute.getValue());
|
builder.parseInitPacketMagicHeader(attribute.getValue());
|
||||||
break;
|
break;
|
||||||
@@ -140,6 +160,21 @@ public final class Interface {
|
|||||||
case "h4":
|
case "h4":
|
||||||
builder.parseTransportPacketMagicHeader(attribute.getValue());
|
builder.parseTransportPacketMagicHeader(attribute.getValue());
|
||||||
break;
|
break;
|
||||||
|
case "i1":
|
||||||
|
builder.parseSpecialJunkI1(attribute.getValue());
|
||||||
|
break;
|
||||||
|
case "i2":
|
||||||
|
builder.parseSpecialJunkI2(attribute.getValue());
|
||||||
|
break;
|
||||||
|
case "i3":
|
||||||
|
builder.parseSpecialJunkI3(attribute.getValue());
|
||||||
|
break;
|
||||||
|
case "i4":
|
||||||
|
builder.parseSpecialJunkI4(attribute.getValue());
|
||||||
|
break;
|
||||||
|
case "i5":
|
||||||
|
builder.parseSpecialJunkI5(attribute.getValue());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.TOP_LEVEL,
|
throw new BadConfigException(Section.INTERFACE, Location.TOP_LEVEL,
|
||||||
Reason.UNKNOWN_ATTRIBUTE, attribute.getKey());
|
Reason.UNKNOWN_ATTRIBUTE, attribute.getKey());
|
||||||
@@ -166,10 +201,17 @@ public final class Interface {
|
|||||||
&& junkPacketMaxSize.equals(other.junkPacketMaxSize)
|
&& junkPacketMaxSize.equals(other.junkPacketMaxSize)
|
||||||
&& initPacketJunkSize.equals(other.initPacketJunkSize)
|
&& initPacketJunkSize.equals(other.initPacketJunkSize)
|
||||||
&& responsePacketJunkSize.equals(other.responsePacketJunkSize)
|
&& responsePacketJunkSize.equals(other.responsePacketJunkSize)
|
||||||
|
&& cookieReplyPacketJunkSize.equals(other.cookieReplyPacketJunkSize)
|
||||||
|
&& transportPacketJunkSize.equals(other.transportPacketJunkSize)
|
||||||
&& initPacketMagicHeader.equals(other.initPacketMagicHeader)
|
&& initPacketMagicHeader.equals(other.initPacketMagicHeader)
|
||||||
&& responsePacketMagicHeader.equals(other.responsePacketMagicHeader)
|
&& responsePacketMagicHeader.equals(other.responsePacketMagicHeader)
|
||||||
&& underloadPacketMagicHeader.equals(other.underloadPacketMagicHeader)
|
&& underloadPacketMagicHeader.equals(other.underloadPacketMagicHeader)
|
||||||
&& transportPacketMagicHeader.equals(other.transportPacketMagicHeader);
|
&& transportPacketMagicHeader.equals(other.transportPacketMagicHeader)
|
||||||
|
&& specialJunkI1.equals(other.specialJunkI1)
|
||||||
|
&& specialJunkI2.equals(other.specialJunkI2)
|
||||||
|
&& specialJunkI3.equals(other.specialJunkI3)
|
||||||
|
&& specialJunkI4.equals(other.specialJunkI4)
|
||||||
|
&& specialJunkI5.equals(other.specialJunkI5);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -294,12 +336,30 @@ public final class Interface {
|
|||||||
return responsePacketJunkSize;
|
return responsePacketJunkSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the cookieReplyPacketJunkSize used for the AmneziaWG interface.
|
||||||
|
*
|
||||||
|
* @return the cookieReplyPacketJunkSize, or {@code Optional.empty()} if none is configured
|
||||||
|
*/
|
||||||
|
public Optional<Integer> getCookieReplyPacketJunkSize() {
|
||||||
|
return cookieReplyPacketJunkSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the transportPacketJunkSize used for the AmneziaWG interface.
|
||||||
|
*
|
||||||
|
* @return the transportPacketJunkSize, or {@code Optional.empty()} if none is configured
|
||||||
|
*/
|
||||||
|
public Optional<Integer> getTransportPacketJunkSize() {
|
||||||
|
return transportPacketJunkSize;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the initPacketMagicHeader used for the AmneziaWG interface.
|
* Returns the initPacketMagicHeader used for the AmneziaWG interface.
|
||||||
*
|
*
|
||||||
* @return the initPacketMagicHeader, or {@code Optional.empty()} if none is configured
|
* @return the initPacketMagicHeader, or {@code Optional.empty()} if none is configured
|
||||||
*/
|
*/
|
||||||
public Optional<Long> getInitPacketMagicHeader() {
|
public Optional<String> getInitPacketMagicHeader() {
|
||||||
return initPacketMagicHeader;
|
return initPacketMagicHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,7 +368,7 @@ public final class Interface {
|
|||||||
*
|
*
|
||||||
* @return the responsePacketMagicHeader, or {@code Optional.empty()} if none is configured
|
* @return the responsePacketMagicHeader, or {@code Optional.empty()} if none is configured
|
||||||
*/
|
*/
|
||||||
public Optional<Long> getResponsePacketMagicHeader() {
|
public Optional<String> getResponsePacketMagicHeader() {
|
||||||
return responsePacketMagicHeader;
|
return responsePacketMagicHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,7 +377,7 @@ public final class Interface {
|
|||||||
*
|
*
|
||||||
* @return the underloadPacketMagicHeader, or {@code Optional.empty()} if none is configured
|
* @return the underloadPacketMagicHeader, or {@code Optional.empty()} if none is configured
|
||||||
*/
|
*/
|
||||||
public Optional<Long> getUnderloadPacketMagicHeader() {
|
public Optional<String> getUnderloadPacketMagicHeader() {
|
||||||
return underloadPacketMagicHeader;
|
return underloadPacketMagicHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,10 +386,55 @@ public final class Interface {
|
|||||||
*
|
*
|
||||||
* @return the transportPacketMagicHeader, or {@code Optional.empty()} if none is configured
|
* @return the transportPacketMagicHeader, or {@code Optional.empty()} if none is configured
|
||||||
*/
|
*/
|
||||||
public Optional<Long> getTransportPacketMagicHeader() {
|
public Optional<String> getTransportPacketMagicHeader() {
|
||||||
return transportPacketMagicHeader;
|
return transportPacketMagicHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the specialJunkI1 used for the AmneziaWG interface.
|
||||||
|
*
|
||||||
|
* @return the specialJunkI1, or {@code Optional.empty()} if none is configured
|
||||||
|
*/
|
||||||
|
public Optional<String> getSpecialJunkI1() {
|
||||||
|
return specialJunkI1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the specialJunkI2 used for the AmneziaWG interface.
|
||||||
|
*
|
||||||
|
* @return the specialJunkI2, or {@code Optional.empty()} if none is configured
|
||||||
|
*/
|
||||||
|
public Optional<String> getSpecialJunkI2() {
|
||||||
|
return specialJunkI2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the specialJunkI3 used for the AmneziaWG interface.
|
||||||
|
*
|
||||||
|
* @return the specialJunkI3, or {@code Optional.empty()} if none is configured
|
||||||
|
*/
|
||||||
|
public Optional<String> getSpecialJunkI3() {
|
||||||
|
return specialJunkI3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the specialJunkI4 used for the AmneziaWG interface.
|
||||||
|
*
|
||||||
|
* @return the specialJunkI4, or {@code Optional.empty()} if none is configured
|
||||||
|
*/
|
||||||
|
public Optional<String> getSpecialJunkI4() {
|
||||||
|
return specialJunkI4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the specialJunkI5 used for the AmneziaWG interface.
|
||||||
|
*
|
||||||
|
* @return the specialJunkI5, or {@code Optional.empty()} if none is configured
|
||||||
|
*/
|
||||||
|
public Optional<String> getSpecialJunkI5() {
|
||||||
|
return specialJunkI5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
@@ -346,10 +451,17 @@ public final class Interface {
|
|||||||
hash = 31 * hash + junkPacketMaxSize.hashCode();
|
hash = 31 * hash + junkPacketMaxSize.hashCode();
|
||||||
hash = 31 * hash + initPacketJunkSize.hashCode();
|
hash = 31 * hash + initPacketJunkSize.hashCode();
|
||||||
hash = 31 * hash + responsePacketJunkSize.hashCode();
|
hash = 31 * hash + responsePacketJunkSize.hashCode();
|
||||||
|
hash = 31 * hash + cookieReplyPacketJunkSize.hashCode();
|
||||||
|
hash = 31 * hash + transportPacketJunkSize.hashCode();
|
||||||
hash = 31 * hash + initPacketMagicHeader.hashCode();
|
hash = 31 * hash + initPacketMagicHeader.hashCode();
|
||||||
hash = 31 * hash + responsePacketMagicHeader.hashCode();
|
hash = 31 * hash + responsePacketMagicHeader.hashCode();
|
||||||
hash = 31 * hash + underloadPacketMagicHeader.hashCode();
|
hash = 31 * hash + underloadPacketMagicHeader.hashCode();
|
||||||
hash = 31 * hash + transportPacketMagicHeader.hashCode();
|
hash = 31 * hash + transportPacketMagicHeader.hashCode();
|
||||||
|
hash = 31 * hash + specialJunkI1.hashCode();
|
||||||
|
hash = 31 * hash + specialJunkI2.hashCode();
|
||||||
|
hash = 31 * hash + specialJunkI3.hashCode();
|
||||||
|
hash = 31 * hash + specialJunkI4.hashCode();
|
||||||
|
hash = 31 * hash + specialJunkI5.hashCode();
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,10 +506,17 @@ public final class Interface {
|
|||||||
junkPacketMaxSize.ifPresent(jmax -> sb.append("Jmax = ").append(jmax).append('\n'));
|
junkPacketMaxSize.ifPresent(jmax -> sb.append("Jmax = ").append(jmax).append('\n'));
|
||||||
initPacketJunkSize.ifPresent(s1 -> sb.append("S1 = ").append(s1).append('\n'));
|
initPacketJunkSize.ifPresent(s1 -> sb.append("S1 = ").append(s1).append('\n'));
|
||||||
responsePacketJunkSize.ifPresent(s2 -> sb.append("S2 = ").append(s2).append('\n'));
|
responsePacketJunkSize.ifPresent(s2 -> sb.append("S2 = ").append(s2).append('\n'));
|
||||||
|
cookieReplyPacketJunkSize.ifPresent(s3 -> sb.append("S3 = ").append(s3).append('\n'));
|
||||||
|
transportPacketJunkSize.ifPresent(s4 -> sb.append("S4 = ").append(s4).append('\n'));
|
||||||
initPacketMagicHeader.ifPresent(h1 -> sb.append("H1 = ").append(h1).append('\n'));
|
initPacketMagicHeader.ifPresent(h1 -> sb.append("H1 = ").append(h1).append('\n'));
|
||||||
responsePacketMagicHeader.ifPresent(h2 -> sb.append("H2 = ").append(h2).append('\n'));
|
responsePacketMagicHeader.ifPresent(h2 -> sb.append("H2 = ").append(h2).append('\n'));
|
||||||
underloadPacketMagicHeader.ifPresent(h3 -> sb.append("H3 = ").append(h3).append('\n'));
|
underloadPacketMagicHeader.ifPresent(h3 -> sb.append("H3 = ").append(h3).append('\n'));
|
||||||
transportPacketMagicHeader.ifPresent(h4 -> sb.append("H4 = ").append(h4).append('\n'));
|
transportPacketMagicHeader.ifPresent(h4 -> sb.append("H4 = ").append(h4).append('\n'));
|
||||||
|
specialJunkI1.ifPresent(i1 -> sb.append("I1 = ").append(i1).append('\n'));
|
||||||
|
specialJunkI2.ifPresent(i2 -> sb.append("I2 = ").append(i2).append('\n'));
|
||||||
|
specialJunkI3.ifPresent(i3 -> sb.append("I3 = ").append(i3).append('\n'));
|
||||||
|
specialJunkI4.ifPresent(i4 -> sb.append("I4 = ").append(i4).append('\n'));
|
||||||
|
specialJunkI5.ifPresent(i5 -> sb.append("I5 = ").append(i5).append('\n'));
|
||||||
sb.append("PrivateKey = ").append(keyPair.getPrivateKey().toBase64()).append('\n');
|
sb.append("PrivateKey = ").append(keyPair.getPrivateKey().toBase64()).append('\n');
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
@@ -417,10 +536,17 @@ public final class Interface {
|
|||||||
junkPacketMaxSize.ifPresent(jmax -> sb.append("jmax=").append(jmax).append('\n'));
|
junkPacketMaxSize.ifPresent(jmax -> sb.append("jmax=").append(jmax).append('\n'));
|
||||||
initPacketJunkSize.ifPresent(s1 -> sb.append("s1=").append(s1).append('\n'));
|
initPacketJunkSize.ifPresent(s1 -> sb.append("s1=").append(s1).append('\n'));
|
||||||
responsePacketJunkSize.ifPresent(s2 -> sb.append("s2=").append(s2).append('\n'));
|
responsePacketJunkSize.ifPresent(s2 -> sb.append("s2=").append(s2).append('\n'));
|
||||||
|
cookieReplyPacketJunkSize.ifPresent(s3 -> sb.append("s3=").append(s3).append('\n'));
|
||||||
|
transportPacketJunkSize.ifPresent(s4 -> sb.append("s4=").append(s4).append('\n'));
|
||||||
initPacketMagicHeader.ifPresent(h1 -> sb.append("h1=").append(h1).append('\n'));
|
initPacketMagicHeader.ifPresent(h1 -> sb.append("h1=").append(h1).append('\n'));
|
||||||
responsePacketMagicHeader.ifPresent(h2 -> sb.append("h2=").append(h2).append('\n'));
|
responsePacketMagicHeader.ifPresent(h2 -> sb.append("h2=").append(h2).append('\n'));
|
||||||
underloadPacketMagicHeader.ifPresent(h3 -> sb.append("h3=").append(h3).append('\n'));
|
underloadPacketMagicHeader.ifPresent(h3 -> sb.append("h3=").append(h3).append('\n'));
|
||||||
transportPacketMagicHeader.ifPresent(h4 -> sb.append("h4=").append(h4).append('\n'));
|
transportPacketMagicHeader.ifPresent(h4 -> sb.append("h4=").append(h4).append('\n'));
|
||||||
|
specialJunkI1.ifPresent(i1 -> sb.append("i1=").append(i1).append('\n'));
|
||||||
|
specialJunkI2.ifPresent(i2 -> sb.append("i2=").append(i2).append('\n'));
|
||||||
|
specialJunkI3.ifPresent(i3 -> sb.append("i3=").append(i3).append('\n'));
|
||||||
|
specialJunkI4.ifPresent(i4 -> sb.append("i4=").append(i4).append('\n'));
|
||||||
|
specialJunkI5.ifPresent(i5 -> sb.append("i5=").append(i5).append('\n'));
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -453,13 +579,27 @@ public final class Interface {
|
|||||||
// Defaults to not present.
|
// Defaults to not present.
|
||||||
private Optional<Integer> responsePacketJunkSize = Optional.empty();
|
private Optional<Integer> responsePacketJunkSize = Optional.empty();
|
||||||
// Defaults to not present.
|
// Defaults to not present.
|
||||||
private Optional<Long> initPacketMagicHeader = Optional.empty();
|
private Optional<Integer> cookieReplyPacketJunkSize = Optional.empty();
|
||||||
// Defaults to not present.
|
// Defaults to not present.
|
||||||
private Optional<Long> responsePacketMagicHeader = Optional.empty();
|
private Optional<Integer> transportPacketJunkSize = Optional.empty();
|
||||||
// Defaults to not present.
|
// Defaults to not present.
|
||||||
private Optional<Long> underloadPacketMagicHeader = Optional.empty();
|
private Optional<String> initPacketMagicHeader = Optional.empty();
|
||||||
// Defaults to not present.
|
// Defaults to not present.
|
||||||
private Optional<Long> transportPacketMagicHeader = Optional.empty();
|
private Optional<String> responsePacketMagicHeader = Optional.empty();
|
||||||
|
// Defaults to not present.
|
||||||
|
private Optional<String> underloadPacketMagicHeader = Optional.empty();
|
||||||
|
// Defaults to not present.
|
||||||
|
private Optional<String> transportPacketMagicHeader = Optional.empty();
|
||||||
|
// Defaults to not present.
|
||||||
|
private Optional<String> specialJunkI1 = Optional.empty();
|
||||||
|
// Defaults to not present.
|
||||||
|
private Optional<String> specialJunkI2 = Optional.empty();
|
||||||
|
// Defaults to not present.
|
||||||
|
private Optional<String> specialJunkI3 = Optional.empty();
|
||||||
|
// Defaults to not present.
|
||||||
|
private Optional<String> specialJunkI4 = Optional.empty();
|
||||||
|
// Defaults to not present.
|
||||||
|
private Optional<String> specialJunkI5 = Optional.empty();
|
||||||
|
|
||||||
|
|
||||||
public Builder addAddress(final InetNetwork address) {
|
public Builder addAddress(final InetNetwork address) {
|
||||||
@@ -613,37 +753,101 @@ public final class Interface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder parseInitPacketMagicHeader(final String initPacketMagicHeader) throws BadConfigException {
|
public Builder parseCookieReplyPacketJunkSize(final String cookieReplyPacketJunkSize) throws BadConfigException {
|
||||||
try {
|
try {
|
||||||
return setInitPacketMagicHeader(Long.parseLong(initPacketMagicHeader));
|
return setCookieReplyPacketJunkSize(Integer.parseInt(cookieReplyPacketJunkSize));
|
||||||
} catch (final NumberFormatException e) {
|
} catch (final NumberFormatException e) {
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.INIT_PACKET_MAGIC_HEADER, initPacketMagicHeader, e);
|
throw new BadConfigException(Section.INTERFACE, Location.COOKIE_REPLY_PACKET_JUNK_SIZE, cookieReplyPacketJunkSize, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder parseTransportPacketJunkSize(final String transportPacketJunkSize) throws BadConfigException {
|
||||||
|
try {
|
||||||
|
return setTransportPacketJunkSize(Integer.parseInt(transportPacketJunkSize));
|
||||||
|
} catch (final NumberFormatException e) {
|
||||||
|
throw new BadConfigException(Section.INTERFACE, Location.TRANSPORT_PACKET_JUNK_SIZE, transportPacketJunkSize, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder parseInitPacketMagicHeader(final String initPacketMagicHeader) throws BadConfigException {
|
||||||
|
if (initPacketMagicHeader == null || initPacketMagicHeader.trim().isEmpty()) {
|
||||||
|
this.initPacketMagicHeader = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.initPacketMagicHeader = Optional.of(initPacketMagicHeader.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder parseResponsePacketMagicHeader(final String responsePacketMagicHeader) throws BadConfigException {
|
public Builder parseResponsePacketMagicHeader(final String responsePacketMagicHeader) throws BadConfigException {
|
||||||
try {
|
if (responsePacketMagicHeader == null || responsePacketMagicHeader.trim().isEmpty()) {
|
||||||
|
this.responsePacketMagicHeader = Optional.empty();
|
||||||
return setResponsePacketMagicHeader(Long.parseLong(responsePacketMagicHeader));
|
} else {
|
||||||
} catch (final NumberFormatException e) {
|
this.responsePacketMagicHeader = Optional.of(responsePacketMagicHeader.trim());
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.RESPONSE_PACKET_MAGIC_HEADER, responsePacketMagicHeader, e);
|
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder parseUnderloadPacketMagicHeader(final String underloadPacketMagicHeader) throws BadConfigException {
|
public Builder parseUnderloadPacketMagicHeader(final String underloadPacketMagicHeader) throws BadConfigException {
|
||||||
try {
|
if (underloadPacketMagicHeader == null || underloadPacketMagicHeader.trim().isEmpty()) {
|
||||||
return setUnderloadPacketMagicHeader(Long.parseLong(underloadPacketMagicHeader));
|
this.underloadPacketMagicHeader = Optional.empty();
|
||||||
} catch (final NumberFormatException e) {
|
} else {
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.UNDERLOAD_PACKET_MAGIC_HEADER, underloadPacketMagicHeader, e);
|
this.underloadPacketMagicHeader = Optional.of(underloadPacketMagicHeader.trim());
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder parseTransportPacketMagicHeader(final String transportPacketMagicHeader) throws BadConfigException {
|
public Builder parseTransportPacketMagicHeader(final String transportPacketMagicHeader) throws BadConfigException {
|
||||||
try {
|
if (transportPacketMagicHeader == null || transportPacketMagicHeader.trim().isEmpty()) {
|
||||||
return setTransportPacketMagicHeader(Long.parseLong(transportPacketMagicHeader));
|
this.transportPacketMagicHeader = Optional.empty();
|
||||||
} catch (final NumberFormatException e) {
|
} else {
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.TRANSPORT_PACKET_MAGIC_HEADER, transportPacketMagicHeader, e);
|
this.transportPacketMagicHeader = Optional.of(transportPacketMagicHeader.trim());
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder parseSpecialJunkI1(final String specialJunkI1) throws BadConfigException {
|
||||||
|
if (specialJunkI1 == null || specialJunkI1.trim().isEmpty()) {
|
||||||
|
this.specialJunkI1 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI1 = Optional.of(specialJunkI1.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder parseSpecialJunkI2(final String specialJunkI2) throws BadConfigException {
|
||||||
|
if (specialJunkI2 == null || specialJunkI2.trim().isEmpty()) {
|
||||||
|
this.specialJunkI2 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI2 = Optional.of(specialJunkI2.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder parseSpecialJunkI3(final String specialJunkI3) throws BadConfigException {
|
||||||
|
if (specialJunkI3 == null || specialJunkI3.trim().isEmpty()) {
|
||||||
|
this.specialJunkI3 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI3 = Optional.of(specialJunkI3.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder parseSpecialJunkI4(final String specialJunkI4) throws BadConfigException {
|
||||||
|
if (specialJunkI4 == null || specialJunkI4.trim().isEmpty()) {
|
||||||
|
this.specialJunkI4 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI4 = Optional.of(specialJunkI4.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder parseSpecialJunkI5(final String specialJunkI5) throws BadConfigException {
|
||||||
|
if (specialJunkI5 == null || specialJunkI5.trim().isEmpty()) {
|
||||||
|
this.specialJunkI5 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI5 = Optional.of(specialJunkI5.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder parsePrivateKey(final String privateKey) throws BadConfigException {
|
public Builder parsePrivateKey(final String privateKey) throws BadConfigException {
|
||||||
@@ -715,35 +919,100 @@ public final class Interface {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setInitPacketMagicHeader(final long initPacketMagicHeader) throws BadConfigException {
|
public Builder setCookieReplyPacketJunkSize(final int cookieReplyPacketJunkSize) throws BadConfigException {
|
||||||
if (initPacketMagicHeader < 0)
|
if (cookieReplyPacketJunkSize < 0)
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.INIT_PACKET_MAGIC_HEADER,
|
throw new BadConfigException(Section.INTERFACE, Location.COOKIE_REPLY_PACKET_JUNK_SIZE,
|
||||||
Reason.INVALID_VALUE, String.valueOf(initPacketMagicHeader));
|
Reason.INVALID_VALUE, String.valueOf(cookieReplyPacketJunkSize));
|
||||||
this.initPacketMagicHeader = initPacketMagicHeader == 0 ? Optional.empty() : Optional.of(initPacketMagicHeader);
|
this.cookieReplyPacketJunkSize = cookieReplyPacketJunkSize == 0 ? Optional.empty() : Optional.of(cookieReplyPacketJunkSize);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setResponsePacketMagicHeader(final long responsePacketMagicHeader) throws BadConfigException {
|
public Builder setTransportPacketJunkSize(final int transportPacketJunkSize) throws BadConfigException {
|
||||||
if (responsePacketMagicHeader < 0)
|
if (transportPacketJunkSize < 0)
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.RESPONSE_PACKET_MAGIC_HEADER,
|
throw new BadConfigException(Section.INTERFACE, Location.TRANSPORT_PACKET_JUNK_SIZE,
|
||||||
Reason.INVALID_VALUE, String.valueOf(responsePacketMagicHeader));
|
Reason.INVALID_VALUE, String.valueOf(transportPacketJunkSize));
|
||||||
this.responsePacketMagicHeader = responsePacketMagicHeader == 0 ? Optional.empty() : Optional.of(responsePacketMagicHeader);
|
this.transportPacketJunkSize = transportPacketJunkSize == 0 ? Optional.empty() : Optional.of(transportPacketJunkSize);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setUnderloadPacketMagicHeader(final long underloadPacketMagicHeader) throws BadConfigException {
|
public Builder setInitPacketMagicHeader(final String initPacketMagicHeader) throws BadConfigException {
|
||||||
if (underloadPacketMagicHeader < 0)
|
if (initPacketMagicHeader == null || initPacketMagicHeader.trim().isEmpty()) {
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.UNDERLOAD_PACKET_MAGIC_HEADER,
|
this.initPacketMagicHeader = Optional.empty();
|
||||||
Reason.INVALID_VALUE, String.valueOf(underloadPacketMagicHeader));
|
} else {
|
||||||
this.underloadPacketMagicHeader = underloadPacketMagicHeader == 0 ? Optional.empty() : Optional.of(underloadPacketMagicHeader);
|
this.initPacketMagicHeader = Optional.of(initPacketMagicHeader.trim());
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setTransportPacketMagicHeader(final long transportPacketMagicHeader) throws BadConfigException {
|
public Builder setResponsePacketMagicHeader(final String responsePacketMagicHeader) throws BadConfigException {
|
||||||
if (transportPacketMagicHeader < 0)
|
if (responsePacketMagicHeader == null || responsePacketMagicHeader.trim().isEmpty()) {
|
||||||
throw new BadConfigException(Section.INTERFACE, Location.TRANSPORT_PACKET_MAGIC_HEADER,
|
this.responsePacketMagicHeader = Optional.empty();
|
||||||
Reason.INVALID_VALUE, String.valueOf(transportPacketMagicHeader));
|
} else {
|
||||||
this.transportPacketMagicHeader = transportPacketMagicHeader == 0 ? Optional.empty() : Optional.of(transportPacketMagicHeader);
|
this.responsePacketMagicHeader = Optional.of(responsePacketMagicHeader.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setUnderloadPacketMagicHeader(final String underloadPacketMagicHeader) throws BadConfigException {
|
||||||
|
if (underloadPacketMagicHeader == null || underloadPacketMagicHeader.trim().isEmpty()) {
|
||||||
|
this.underloadPacketMagicHeader = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.underloadPacketMagicHeader = Optional.of(underloadPacketMagicHeader.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setTransportPacketMagicHeader(final String transportPacketMagicHeader) throws BadConfigException {
|
||||||
|
if (transportPacketMagicHeader == null || transportPacketMagicHeader.trim().isEmpty()) {
|
||||||
|
this.transportPacketMagicHeader = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.transportPacketMagicHeader = Optional.of(transportPacketMagicHeader.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setSpecialJunkI1(final String specialJunkI1) throws BadConfigException {
|
||||||
|
if (specialJunkI1 == null || specialJunkI1.trim().isEmpty()) {
|
||||||
|
this.specialJunkI1 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI1 = Optional.of(specialJunkI1.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setSpecialJunkI2(final String specialJunkI2) throws BadConfigException {
|
||||||
|
if (specialJunkI2 == null || specialJunkI2.trim().isEmpty()) {
|
||||||
|
this.specialJunkI2 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI2 = Optional.of(specialJunkI2.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setSpecialJunkI3(final String specialJunkI3) throws BadConfigException {
|
||||||
|
if (specialJunkI3 == null || specialJunkI3.trim().isEmpty()) {
|
||||||
|
this.specialJunkI3 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI3 = Optional.of(specialJunkI3.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setSpecialJunkI4(final String specialJunkI4) throws BadConfigException {
|
||||||
|
if (specialJunkI4 == null || specialJunkI4.trim().isEmpty()) {
|
||||||
|
this.specialJunkI4 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI4 = Optional.of(specialJunkI4.trim());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setSpecialJunkI5(final String specialJunkI5) throws BadConfigException {
|
||||||
|
if (specialJunkI5 == null || specialJunkI5.trim().isEmpty()) {
|
||||||
|
this.specialJunkI5 = Optional.empty();
|
||||||
|
} else {
|
||||||
|
this.specialJunkI5 = Optional.of(specialJunkI5.trim());
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ android {
|
|||||||
namespace = pkg
|
namespace = pkg
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = pkg
|
applicationId = pkg
|
||||||
targetSdk = 34
|
targetSdk = 35
|
||||||
versionCode = providers.gradleProperty("amneziawgVersionCode").get().toInt()
|
versionCode = providers.gradleProperty("amneziawgVersionCode").get().toInt()
|
||||||
versionName = providers.gradleProperty("amneziawgVersionName").get()
|
versionName = providers.gradleProperty("amneziawgVersionName").get()
|
||||||
buildConfigField("int", "MIN_SDK_VERSION", minSdk.toString())
|
buildConfigField("int", "MIN_SDK_VERSION", minSdk.toString())
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class AppListDialogFragment : DialogFragment() {
|
|||||||
val packageName = it.packageName
|
val packageName = it.packageName
|
||||||
val appInfo = it.applicationInfo
|
val appInfo = it.applicationInfo
|
||||||
val appData =
|
val appData =
|
||||||
ApplicationData(appInfo.loadIcon(pm), appInfo.loadLabel(pm).toString(), packageName, currentlySelectedApps.contains(packageName))
|
ApplicationData(appInfo?.loadIcon(pm) ?: pm.defaultActivityIcon, appInfo?.loadLabel(pm)?.toString() ?: packageName, packageName, currentlySelectedApps.contains(packageName))
|
||||||
applicationData.add(appData)
|
applicationData.add(appData)
|
||||||
appData.addOnPropertyChangedCallback(object : Observable.OnPropertyChangedCallback() {
|
appData.addOnPropertyChangedCallback(object : Observable.OnPropertyChangedCallback() {
|
||||||
override fun onPropertyChanged(sender: Observable?, propertyId: Int) {
|
override fun onPropertyChanged(sender: Observable?, propertyId: Int) {
|
||||||
|
|||||||
@@ -88,6 +88,20 @@ class InterfaceProxy : BaseObservable, Parcelable {
|
|||||||
notifyPropertyChanged(BR.responsePacketJunkSize)
|
notifyPropertyChanged(BR.responsePacketJunkSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@get:Bindable
|
||||||
|
var cookieReplyPacketJunkSize: String = ""
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
notifyPropertyChanged(BR.cookieReplyPacketJunkSize)
|
||||||
|
}
|
||||||
|
|
||||||
|
@get:Bindable
|
||||||
|
var transportPacketJunkSize: String = ""
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
notifyPropertyChanged(BR.transportPacketJunkSize)
|
||||||
|
}
|
||||||
|
|
||||||
@get:Bindable
|
@get:Bindable
|
||||||
var initPacketMagicHeader: String = ""
|
var initPacketMagicHeader: String = ""
|
||||||
set(value) {
|
set(value) {
|
||||||
@@ -116,6 +130,41 @@ class InterfaceProxy : BaseObservable, Parcelable {
|
|||||||
notifyPropertyChanged(BR.transportPacketMagicHeader)
|
notifyPropertyChanged(BR.transportPacketMagicHeader)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@get:Bindable
|
||||||
|
var specialJunkI1: String = ""
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
notifyPropertyChanged(BR.specialJunkI1)
|
||||||
|
}
|
||||||
|
|
||||||
|
@get:Bindable
|
||||||
|
var specialJunkI2: String = ""
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
notifyPropertyChanged(BR.specialJunkI2)
|
||||||
|
}
|
||||||
|
|
||||||
|
@get:Bindable
|
||||||
|
var specialJunkI3: String = ""
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
notifyPropertyChanged(BR.specialJunkI3)
|
||||||
|
}
|
||||||
|
|
||||||
|
@get:Bindable
|
||||||
|
var specialJunkI4: String = ""
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
notifyPropertyChanged(BR.specialJunkI4)
|
||||||
|
}
|
||||||
|
|
||||||
|
@get:Bindable
|
||||||
|
var specialJunkI5: String = ""
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
notifyPropertyChanged(BR.specialJunkI5)
|
||||||
|
}
|
||||||
|
|
||||||
@get:Bindable
|
@get:Bindable
|
||||||
var privateKey: String = ""
|
var privateKey: String = ""
|
||||||
set(value) {
|
set(value) {
|
||||||
@@ -144,10 +193,17 @@ class InterfaceProxy : BaseObservable, Parcelable {
|
|||||||
junkPacketMaxSize = parcel.readString() ?: ""
|
junkPacketMaxSize = parcel.readString() ?: ""
|
||||||
initPacketJunkSize = parcel.readString() ?: ""
|
initPacketJunkSize = parcel.readString() ?: ""
|
||||||
responsePacketJunkSize = parcel.readString() ?: ""
|
responsePacketJunkSize = parcel.readString() ?: ""
|
||||||
|
cookieReplyPacketJunkSize = parcel.readString() ?: ""
|
||||||
|
transportPacketJunkSize = parcel.readString() ?: ""
|
||||||
initPacketMagicHeader = parcel.readString() ?: ""
|
initPacketMagicHeader = parcel.readString() ?: ""
|
||||||
responsePacketMagicHeader = parcel.readString() ?: ""
|
responsePacketMagicHeader = parcel.readString() ?: ""
|
||||||
underloadPacketMagicHeader = parcel.readString() ?: ""
|
underloadPacketMagicHeader = parcel.readString() ?: ""
|
||||||
transportPacketMagicHeader = parcel.readString() ?: ""
|
transportPacketMagicHeader = parcel.readString() ?: ""
|
||||||
|
specialJunkI1 = parcel.readString() ?: ""
|
||||||
|
specialJunkI2 = parcel.readString() ?: ""
|
||||||
|
specialJunkI3 = parcel.readString() ?: ""
|
||||||
|
specialJunkI4 = parcel.readString() ?: ""
|
||||||
|
specialJunkI5 = parcel.readString() ?: ""
|
||||||
privateKey = parcel.readString() ?: ""
|
privateKey = parcel.readString() ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,10 +220,17 @@ class InterfaceProxy : BaseObservable, Parcelable {
|
|||||||
junkPacketMaxSize = other.junkPacketMaxSize.map { it.toString() }.orElse("")
|
junkPacketMaxSize = other.junkPacketMaxSize.map { it.toString() }.orElse("")
|
||||||
initPacketJunkSize = other.initPacketJunkSize.map { it.toString() }.orElse("")
|
initPacketJunkSize = other.initPacketJunkSize.map { it.toString() }.orElse("")
|
||||||
responsePacketJunkSize = other.responsePacketJunkSize.map { it.toString() }.orElse("")
|
responsePacketJunkSize = other.responsePacketJunkSize.map { it.toString() }.orElse("")
|
||||||
initPacketMagicHeader = other.initPacketMagicHeader.map { it.toString() }.orElse("")
|
cookieReplyPacketJunkSize = other.cookieReplyPacketJunkSize.map { it.toString() }.orElse("")
|
||||||
responsePacketMagicHeader = other.responsePacketMagicHeader.map { it.toString() }.orElse("")
|
transportPacketJunkSize = other.transportPacketJunkSize.map { it.toString() }.orElse("")
|
||||||
underloadPacketMagicHeader = other.underloadPacketMagicHeader.map { it.toString() }.orElse("")
|
initPacketMagicHeader = other.initPacketMagicHeader.orElse("")
|
||||||
transportPacketMagicHeader = other.transportPacketMagicHeader.map { it.toString() }.orElse("")
|
responsePacketMagicHeader = other.responsePacketMagicHeader.orElse("")
|
||||||
|
underloadPacketMagicHeader = other.underloadPacketMagicHeader.orElse("")
|
||||||
|
transportPacketMagicHeader = other.transportPacketMagicHeader.orElse("")
|
||||||
|
specialJunkI1 = other.specialJunkI1.orElse("")
|
||||||
|
specialJunkI2 = other.specialJunkI2.orElse("")
|
||||||
|
specialJunkI3 = other.specialJunkI3.orElse("")
|
||||||
|
specialJunkI4 = other.specialJunkI4.orElse("")
|
||||||
|
specialJunkI5 = other.specialJunkI5.orElse("")
|
||||||
val keyPair = other.keyPair
|
val keyPair = other.keyPair
|
||||||
privateKey = keyPair.privateKey.toBase64()
|
privateKey = keyPair.privateKey.toBase64()
|
||||||
}
|
}
|
||||||
@@ -197,10 +260,17 @@ class InterfaceProxy : BaseObservable, Parcelable {
|
|||||||
if (junkPacketMaxSize.isNotEmpty()) builder.parseJunkPacketMaxSize(junkPacketMaxSize)
|
if (junkPacketMaxSize.isNotEmpty()) builder.parseJunkPacketMaxSize(junkPacketMaxSize)
|
||||||
if (initPacketJunkSize.isNotEmpty()) builder.parseInitPacketJunkSize(initPacketJunkSize)
|
if (initPacketJunkSize.isNotEmpty()) builder.parseInitPacketJunkSize(initPacketJunkSize)
|
||||||
if (responsePacketJunkSize.isNotEmpty()) builder.parseResponsePacketJunkSize(responsePacketJunkSize)
|
if (responsePacketJunkSize.isNotEmpty()) builder.parseResponsePacketJunkSize(responsePacketJunkSize)
|
||||||
|
if (cookieReplyPacketJunkSize.isNotEmpty()) builder.parseCookieReplyPacketJunkSize(cookieReplyPacketJunkSize)
|
||||||
|
if (transportPacketJunkSize.isNotEmpty()) builder.parseTransportPacketJunkSize(transportPacketJunkSize)
|
||||||
if (initPacketMagicHeader.isNotEmpty()) builder.parseInitPacketMagicHeader(initPacketMagicHeader)
|
if (initPacketMagicHeader.isNotEmpty()) builder.parseInitPacketMagicHeader(initPacketMagicHeader)
|
||||||
if (responsePacketMagicHeader.isNotEmpty()) builder.parseResponsePacketMagicHeader(responsePacketMagicHeader)
|
if (responsePacketMagicHeader.isNotEmpty()) builder.parseResponsePacketMagicHeader(responsePacketMagicHeader)
|
||||||
if (underloadPacketMagicHeader.isNotEmpty()) builder.parseUnderloadPacketMagicHeader(underloadPacketMagicHeader)
|
if (underloadPacketMagicHeader.isNotEmpty()) builder.parseUnderloadPacketMagicHeader(underloadPacketMagicHeader)
|
||||||
if (transportPacketMagicHeader.isNotEmpty()) builder.parseTransportPacketMagicHeader(transportPacketMagicHeader)
|
if (transportPacketMagicHeader.isNotEmpty()) builder.parseTransportPacketMagicHeader(transportPacketMagicHeader)
|
||||||
|
if (specialJunkI1.isNotEmpty()) builder.parseSpecialJunkI1(specialJunkI1)
|
||||||
|
if (specialJunkI2.isNotEmpty()) builder.parseSpecialJunkI2(specialJunkI2)
|
||||||
|
if (specialJunkI3.isNotEmpty()) builder.parseSpecialJunkI3(specialJunkI3)
|
||||||
|
if (specialJunkI4.isNotEmpty()) builder.parseSpecialJunkI4(specialJunkI4)
|
||||||
|
if (specialJunkI5.isNotEmpty()) builder.parseSpecialJunkI5(specialJunkI5)
|
||||||
if (privateKey.isNotEmpty()) builder.parsePrivateKey(privateKey)
|
if (privateKey.isNotEmpty()) builder.parsePrivateKey(privateKey)
|
||||||
return builder.build()
|
return builder.build()
|
||||||
}
|
}
|
||||||
@@ -217,10 +287,17 @@ class InterfaceProxy : BaseObservable, Parcelable {
|
|||||||
dest.writeString(junkPacketMaxSize)
|
dest.writeString(junkPacketMaxSize)
|
||||||
dest.writeString(initPacketJunkSize)
|
dest.writeString(initPacketJunkSize)
|
||||||
dest.writeString(responsePacketJunkSize)
|
dest.writeString(responsePacketJunkSize)
|
||||||
|
dest.writeString(cookieReplyPacketJunkSize)
|
||||||
|
dest.writeString(transportPacketJunkSize)
|
||||||
dest.writeString(initPacketMagicHeader)
|
dest.writeString(initPacketMagicHeader)
|
||||||
dest.writeString(responsePacketMagicHeader)
|
dest.writeString(responsePacketMagicHeader)
|
||||||
dest.writeString(underloadPacketMagicHeader)
|
dest.writeString(underloadPacketMagicHeader)
|
||||||
dest.writeString(transportPacketMagicHeader)
|
dest.writeString(transportPacketMagicHeader)
|
||||||
|
dest.writeString(specialJunkI1)
|
||||||
|
dest.writeString(specialJunkI2)
|
||||||
|
dest.writeString(specialJunkI3)
|
||||||
|
dest.writeString(specialJunkI4)
|
||||||
|
dest.writeString(specialJunkI5)
|
||||||
dest.writeString(privateKey)
|
dest.writeString(privateKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -390,6 +390,52 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/response_packet_junk_size_label"
|
app:layout_constraintTop_toBottomOf="@+id/response_packet_junk_size_label"
|
||||||
tools:text="18" />
|
tools:text="18" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cookie_reply_packet_junk_size_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:labelFor="@+id/cookie_reply_packet_junk_size_text"
|
||||||
|
android:text="@string/cookie_reply_packet_junk_size"
|
||||||
|
android:visibility="@{!config.interface.cookieReplyPacketJunkSize.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/response_packet_junk_size_text" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cookie_reply_packet_junk_size_text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@{config.interface.cookieReplyPacketJunkSize}"
|
||||||
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
||||||
|
android:visibility="@{!config.interface.cookieReplyPacketJunkSize.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/cookie_reply_packet_junk_size_label"
|
||||||
|
tools:text="20" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/transport_packet_junk_size_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:labelFor="@+id/transport_packet_junk_size_text"
|
||||||
|
android:text="@string/transport_packet_junk_size"
|
||||||
|
android:visibility="@{!config.interface.transportPacketJunkSize.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/cookie_reply_packet_junk_size_text" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/transport_packet_junk_size_text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@{config.interface.transportPacketJunkSize}"
|
||||||
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
||||||
|
android:visibility="@{!config.interface.transportPacketJunkSize.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/transport_packet_junk_size_label"
|
||||||
|
tools:text="22" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/init_packet_magic_header_label"
|
android:id="@+id/init_packet_magic_header_label"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -399,7 +445,7 @@
|
|||||||
android:text="@string/init_packet_magic_header"
|
android:text="@string/init_packet_magic_header"
|
||||||
android:visibility="@{!config.interface.initPacketMagicHeader.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
android:visibility="@{!config.interface.initPacketMagicHeader.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/response_packet_junk_size_text" />
|
app:layout_constraintTop_toBottomOf="@+id/transport_packet_junk_size_text" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/init_packet_magic_header_text"
|
android:id="@+id/init_packet_magic_header_text"
|
||||||
@@ -482,12 +528,152 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/transport_packet_magic_header_label"
|
app:layout_constraintTop_toBottomOf="@+id/transport_packet_magic_header_label"
|
||||||
tools:text="1766607858" />
|
tools:text="1766607858" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i1_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:labelFor="@+id/special_junk_i1_text"
|
||||||
|
android:text="@string/special_junk_i1"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI1.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/transport_packet_magic_header_text" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i1_text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:contentDescription="@string/special_junk_i1"
|
||||||
|
android:nextFocusUp="@id/transport_packet_magic_header_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i2_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i2_text"
|
||||||
|
android:onClick="@{ClipboardUtils::copyTextView}"
|
||||||
|
android:text="@{config.interface.specialJunkI1}"
|
||||||
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI1.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i1_label"
|
||||||
|
tools:text="<b 0x10001c00c00050001000000df00210473746c730561646f626506636f6d2d636e09656467657375697465036e657400c02b00050001000001e200350473746c730561646f626506636f6d2d636e09656467657375697465036e65740b676c6f62616c726564697206616b61646e73c047c0580005000100>" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i2_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:labelFor="@+id/special_junk_i2_text"
|
||||||
|
android:text="@string/special_junk_i2"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI2.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i1_text" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i2_text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:contentDescription="@string/special_junk_i2"
|
||||||
|
android:nextFocusUp="@id/special_junk_i1_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i3_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i3_text"
|
||||||
|
android:onClick="@{ClipboardUtils::copyTextView}"
|
||||||
|
android:text="@{config.interface.specialJunkI2}"
|
||||||
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI2.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i2_label"
|
||||||
|
tools:text="<b 0x1234>" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i3_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:labelFor="@+id/special_junk_i3_text"
|
||||||
|
android:text="@string/special_junk_i3"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI3.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i2_text" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i3_text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:contentDescription="@string/special_junk_i3"
|
||||||
|
android:nextFocusUp="@id/special_junk_i2_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i4_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i4_text"
|
||||||
|
android:onClick="@{ClipboardUtils::copyTextView}"
|
||||||
|
android:text="@{config.interface.specialJunkI3}"
|
||||||
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI3.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i3_label"
|
||||||
|
tools:text="<b 0x1234567890>" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i4_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:labelFor="@+id/special_junk_i4_text"
|
||||||
|
android:text="@string/special_junk_i4"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI4.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i3_text" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i4_text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:contentDescription="@string/special_junk_i4"
|
||||||
|
android:nextFocusUp="@id/special_junk_i3_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i5_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i5_text"
|
||||||
|
android:onClick="@{ClipboardUtils::copyTextView}"
|
||||||
|
android:text="@{config.interface.specialJunkI4}"
|
||||||
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI4.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i4_label"
|
||||||
|
tools:text="<b 0xdeadbeef>" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i5_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:labelFor="@+id/special_junk_i5_text"
|
||||||
|
android:text="@string/special_junk_i5"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI5.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i4_text" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/special_junk_i5_text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:contentDescription="@string/special_junk_i5"
|
||||||
|
android:nextFocusUp="@id/special_junk_i4_text"
|
||||||
|
android:nextFocusDown="@id/applications_text"
|
||||||
|
android:nextFocusForward="@id/applications_text"
|
||||||
|
android:onClick="@{ClipboardUtils::copyTextView}"
|
||||||
|
android:text="@{config.interface.specialJunkI5}"
|
||||||
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
||||||
|
android:visibility="@{!config.interface.specialJunkI5.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i5_label"
|
||||||
|
tools:text="<rc 12><t><rd 18>" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
<androidx.constraintlayout.widget.Barrier
|
||||||
android:id="@+id/amnezia_barrier"
|
android:id="@+id/amnezia_barrier"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:barrierDirection="bottom"
|
app:barrierDirection="bottom"
|
||||||
app:constraint_referenced_ids="transport_packet_magic_header_text" />
|
app:constraint_referenced_ids="transport_packet_magic_header_text,special_junk_i1_text,special_junk_i2_text,special_junk_i3_text,special_junk_i4_text,special_junk_i5_text" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/applications_label"
|
android:id="@+id/applications_label"
|
||||||
@@ -504,7 +690,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/applications"
|
android:contentDescription="@string/applications"
|
||||||
android:nextFocusUp="@id/mtu_text"
|
android:nextFocusUp="@id/special_junk_i5_text"
|
||||||
android:nextFocusDown="@id/peers_layout"
|
android:nextFocusDown="@id/peers_layout"
|
||||||
android:nextFocusForward="@id/peers_layout"
|
android:nextFocusForward="@id/peers_layout"
|
||||||
android:onClick="@{ClipboardUtils::copyTextView}"
|
android:onClick="@{ClipboardUtils::copyTextView}"
|
||||||
|
|||||||
@@ -346,12 +346,56 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:imeOptions="actionNext"
|
android:imeOptions="actionNext"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:nextFocusUp="@id/junk_packet_max_size_text"
|
android:nextFocusUp="@id/init_packet_junk_size_text"
|
||||||
android:nextFocusDown="@id/response_packet_magic_header_text"
|
android:nextFocusDown="@id/cookie_reply_packet_junk_size_text"
|
||||||
android:nextFocusForward="@id/init_packet_magic_header_text"
|
android:nextFocusForward="@id/cookie_reply_packet_junk_size_text"
|
||||||
android:text="@={config.interface.responsePacketJunkSize}" />
|
android:text="@={config.interface.responsePacketJunkSize}" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/cookie_reply_packet_junk_size_layout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:hint="@string/cookie_reply_packet_junk_size"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/response_packet_junk_size_layout">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/cookie_reply_packet_junk_size_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="number"
|
||||||
|
android:nextFocusUp="@id/response_packet_junk_size_text"
|
||||||
|
android:nextFocusDown="@id/transport_packet_junk_size_text"
|
||||||
|
android:nextFocusForward="@id/transport_packet_junk_size_text"
|
||||||
|
android:text="@={config.interface.cookieReplyPacketJunkSize}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/transport_packet_junk_size_layout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:hint="@string/transport_packet_junk_size"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/cookie_reply_packet_junk_size_layout">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/transport_packet_junk_size_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="number"
|
||||||
|
android:nextFocusUp="@id/cookie_reply_packet_junk_size_text"
|
||||||
|
android:nextFocusDown="@id/init_packet_magic_header_text"
|
||||||
|
android:nextFocusForward="@id/init_packet_magic_header_text"
|
||||||
|
android:text="@={config.interface.transportPacketJunkSize}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/init_packet_magic_header_layout"
|
android:id="@+id/init_packet_magic_header_layout"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -359,7 +403,7 @@
|
|||||||
android:hint="@string/init_packet_magic_header"
|
android:hint="@string/init_packet_magic_header"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/response_packet_junk_size_layout"
|
app:layout_constraintTop_toBottomOf="@+id/transport_packet_junk_size_layout"
|
||||||
android:layout_margin="4dp">
|
android:layout_margin="4dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
@@ -367,8 +411,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:imeOptions="actionNext"
|
android:imeOptions="actionNext"
|
||||||
android:inputType="number"
|
android:inputType="textNoSuggestions"
|
||||||
android:nextFocusUp="@id/init_packet_junk_size_text"
|
android:nextFocusUp="@id/transport_packet_junk_size_text"
|
||||||
android:nextFocusDown="@id/underload_packet_magic_header_text"
|
android:nextFocusDown="@id/underload_packet_magic_header_text"
|
||||||
android:nextFocusForward="@id/response_packet_magic_header_text"
|
android:nextFocusForward="@id/response_packet_magic_header_text"
|
||||||
android:text="@={config.interface.initPacketMagicHeader}" />
|
android:text="@={config.interface.initPacketMagicHeader}" />
|
||||||
@@ -389,7 +433,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:imeOptions="actionNext"
|
android:imeOptions="actionNext"
|
||||||
android:inputType="number"
|
android:inputType="textNoSuggestions"
|
||||||
android:nextFocusUp="@id/response_packet_junk_size_text"
|
android:nextFocusUp="@id/response_packet_junk_size_text"
|
||||||
android:nextFocusDown="@id/transport_packet_magic_header_text"
|
android:nextFocusDown="@id/transport_packet_magic_header_text"
|
||||||
android:nextFocusForward="@id/underload_packet_magic_header_text"
|
android:nextFocusForward="@id/underload_packet_magic_header_text"
|
||||||
@@ -411,9 +455,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:imeOptions="actionNext"
|
android:imeOptions="actionNext"
|
||||||
android:inputType="number"
|
android:inputType="textNoSuggestions"
|
||||||
android:nextFocusUp="@id/init_packet_magic_header_text"
|
android:nextFocusUp="@id/init_packet_magic_header_text"
|
||||||
android:nextFocusDown="@id/set_excluded_applications"
|
android:nextFocusDown="@id/special_junk_i1_text"
|
||||||
android:nextFocusForward="@id/transport_packet_magic_header_text"
|
android:nextFocusForward="@id/transport_packet_magic_header_text"
|
||||||
android:text="@={config.interface.underloadPacketMagicHeader}" />
|
android:text="@={config.interface.underloadPacketMagicHeader}" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
@@ -432,12 +476,122 @@
|
|||||||
android:id="@+id/transport_packet_magic_header_text"
|
android:id="@+id/transport_packet_magic_header_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionNext"
|
||||||
android:inputType="number"
|
android:inputType="textNoSuggestions"
|
||||||
android:nextFocusUp="@id/response_packet_magic_header_text"
|
android:nextFocusUp="@id/response_packet_magic_header_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i1_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i1_text"
|
||||||
|
android:text="@={config.interface.transportPacketMagicHeader}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/special_junk_i1_layout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:hint="@string/special_junk_i1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/transport_packet_magic_header_layout">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/special_junk_i1_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusUp="@id/transport_packet_magic_header_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i2_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i2_text"
|
||||||
|
android:text="@={config.interface.specialJunkI1}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/special_junk_i2_layout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:hint="@string/special_junk_i2"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i1_layout">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/special_junk_i2_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusUp="@id/special_junk_i1_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i3_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i3_text"
|
||||||
|
android:text="@={config.interface.specialJunkI2}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/special_junk_i3_layout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:hint="@string/special_junk_i3"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i2_layout">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/special_junk_i3_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusUp="@id/special_junk_i2_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i4_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i4_text"
|
||||||
|
android:text="@={config.interface.specialJunkI3}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/special_junk_i4_layout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:hint="@string/special_junk_i4"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i3_layout">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/special_junk_i4_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusUp="@id/special_junk_i3_text"
|
||||||
|
android:nextFocusDown="@id/special_junk_i5_text"
|
||||||
|
android:nextFocusForward="@id/special_junk_i5_text"
|
||||||
|
android:text="@={config.interface.specialJunkI4}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/special_junk_i5_layout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:hint="@string/special_junk_i5"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/special_junk_i4_layout">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/special_junk_i5_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusUp="@id/special_junk_i4_text"
|
||||||
android:nextFocusDown="@id/set_excluded_applications"
|
android:nextFocusDown="@id/set_excluded_applications"
|
||||||
android:nextFocusForward="@id/set_excluded_applications"
|
android:nextFocusForward="@id/set_excluded_applications"
|
||||||
android:text="@={config.interface.transportPacketMagicHeader}" />
|
android:text="@={config.interface.specialJunkI5}" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
@@ -446,7 +600,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="4dp"
|
android:layout_margin="4dp"
|
||||||
android:nextFocusUp="@id/dns_servers_text"
|
android:nextFocusUp="@id/special_junk_i5_text"
|
||||||
android:nextFocusDown="@id/peers_layout"
|
android:nextFocusDown="@id/peers_layout"
|
||||||
android:nextFocusForward="@id/peers_layout"
|
android:nextFocusForward="@id/peers_layout"
|
||||||
android:onClick="@{fragment::onRequestSetExcludedIncludedApplications}"
|
android:onClick="@{fragment::onRequestSetExcludedIncludedApplications}"
|
||||||
@@ -455,7 +609,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/transport_packet_magic_header_layout"
|
app:layout_constraintTop_toBottomOf="@id/special_junk_i5_layout"
|
||||||
app:rippleColor="?attr/colorSecondary"
|
app:rippleColor="?attr/colorSecondary"
|
||||||
tools:text="4 excluded applications" />
|
tools:text="4 excluded applications" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -165,10 +165,17 @@
|
|||||||
<string name="junk_packet_max_size">Junk packet maximum size</string>
|
<string name="junk_packet_max_size">Junk packet maximum size</string>
|
||||||
<string name="init_packet_junk_size">Init packet junk size</string>
|
<string name="init_packet_junk_size">Init packet junk size</string>
|
||||||
<string name="response_packet_junk_size">Response packet junk size</string>
|
<string name="response_packet_junk_size">Response packet junk size</string>
|
||||||
|
<string name="cookie_reply_packet_junk_size">Cookie reply packet junk size</string>
|
||||||
|
<string name="transport_packet_junk_size">Transport packet junk size</string>
|
||||||
<string name="init_packet_magic_header">Init packet magic header</string>
|
<string name="init_packet_magic_header">Init packet magic header</string>
|
||||||
<string name="response_packet_magic_header">Response packet magic header</string>
|
<string name="response_packet_magic_header">Response packet magic header</string>
|
||||||
<string name="underload_packet_magic_header">Underload packet magic header</string>
|
<string name="underload_packet_magic_header">Underload packet magic header</string>
|
||||||
<string name="transport_packet_magic_header">Transport packet magic header</string>
|
<string name="transport_packet_magic_header">Transport packet magic header</string>
|
||||||
|
<string name="special_junk_i1">Special junk I1</string>
|
||||||
|
<string name="special_junk_i2">Special junk I2</string>
|
||||||
|
<string name="special_junk_i3">Special junk I3</string>
|
||||||
|
<string name="special_junk_i4">Special junk I4</string>
|
||||||
|
<string name="special_junk_i5">Special junk I5</string>
|
||||||
<string name="multiple_tunnels_summary_off">Turning on one tunnel will turn off others</string>
|
<string name="multiple_tunnels_summary_off">Turning on one tunnel will turn off others</string>
|
||||||
<string name="multiple_tunnels_summary_on">Multiple tunnels may be turned on simultaneously</string>
|
<string name="multiple_tunnels_summary_on">Multiple tunnels may be turned on simultaneously</string>
|
||||||
<string name="multiple_tunnels_title">Allow multiple simultaneous tunnels</string>
|
<string name="multiple_tunnels_title">Allow multiple simultaneous tunnels</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user