Add new AmneziaWG parameters (implemented in 3.0/3.1) (#1363)
Docker Build and Push / docker_build (push) Waiting to run
Docker Build and Push / docker_scan (push) Blocked by required conditions

This commit is contained in:
Evgeny Volferts
2026-10-29 10:46:10 +01:00
committed by GitHub
parent d4661a8f0f
commit fa13569d4b
5 changed files with 62 additions and 11 deletions
@@ -197,7 +197,7 @@ const deleteConfigurationModal = ref(false)
v-model="data[key]"
:id="'configuration_' + key">
</div>
<div v-for="key in ['Jc', 'Jmin', 'Jmax', 'S1', 'S2', 'S3', 'S4', 'H1', 'H2', 'H3', 'H4', 'I1', 'I2', 'I3', 'I4', 'I5']"
<div v-for="key in ['Jc', 'Jmin', 'Jmax', 'S1', 'S2', 'S3', 'S4', 'H1', 'H2', 'H3', 'H4', 'I1', 'I2', 'I3', 'I4', 'I5', 'HeaderProtectionKey', 'ContentPaddingAddition', 'RekeyAfterTime', 'RekeyTimeout', 'RejectAfterTime', 'KeepaliveTimeout', 'MaxHandshakeAttempts', 'RandomTrailers', 'DisableCookies']"
v-if="configurationInfo.Protocol === 'awg'">
<label :for="'configuration_' + key" class="form-label">
<small class="text-muted">
+24 -9
View File
@@ -49,11 +49,20 @@ export default {
H2: 0,
H3: 0,
H4: 0,
I1: "0",
I2: "0",
I3: "0",
I4: "0",
I5: "0"
I1: "",
I2: "",
I3: "",
I4: "",
I5: "",
HeaderProtectionKey: "",
ContentPaddingAddition: "0-64",
RekeyAfterTime: "100-140",
RekeyTimeout: "4-7",
RejectAfterTime: "160-200",
KeepaliveTimeout: "8-12",
MaxHandshakeAttempts: "14-20",
RandomTrailers: "on",
DisableCookies: "on"
},
numberOfAvailableIPs: "0",
error: false,
@@ -72,9 +81,15 @@ export default {
this.newConfiguration[key] = this.rand(1, 2**31);
});
// Initialize I1 to I5 as "0"
['I1', 'I2', 'I3', 'I4', 'I5'].forEach(key => {
this.newConfiguration[key] = "0";
// Initialize HeaderProtectionKey
let headerProtectionKey = new Uint8Array(32);
window.crypto.getRandomValues(headerProtectionKey);
this.newConfiguration.HeaderProtectionKey = btoa(String.fromCharCode(...headerProtectionKey));
// S1-S4 are recommended be the same to work with RandomTrailers and must 12 or more to work with HeaderProtectionKey
let constantS = 12 + this.rand(1, 2**5);
['S1', 'S2', 'S3', 'S4'].forEach(key => {
this.newConfiguration[key] = constantS;
});
},
methods: {
@@ -388,7 +403,7 @@ export default {
<div class="card rounded-3"
v-if="this.newConfiguration.Protocol === 'awg'"
v-for="key in ['Jc', 'Jmin', 'Jmax', 'S1', 'S2', 'S3', 'S4', 'H1', 'H2', 'H3', 'H4', 'I1', 'I2', 'I3', 'I4', 'I5']">
v-for="key in ['Jc', 'Jmin', 'Jmax', 'S1', 'S2', 'S3', 'S4', 'H1', 'H2', 'H3', 'H4', 'I1', 'I2', 'I3', 'I4', 'I5', 'HeaderProtectionKey', 'ContentPaddingAddition', 'RekeyAfterTime', 'RekeyTimeout', 'RejectAfterTime', 'KeepaliveTimeout', 'MaxHandshakeAttempts', 'RandomTrailers', 'DisableCookies']">
<div class="card-header">{{ key }}</div>
<div class="card-body">
<input type="text"