AmneziaWG 1.5 support
parent
e71179a2d4
commit
efa90544bd
|
|
@ -37,6 +37,10 @@ class AmneziaConfiguration(WireguardConfiguration):
|
|||
self.I3 = "0"
|
||||
self.I4 = "0"
|
||||
self.I5 = "0"
|
||||
self.J1 = "0"
|
||||
self.J2 = "0"
|
||||
self.J3 = "0"
|
||||
self.Itime = "0"
|
||||
|
||||
super().__init__(DashboardConfig, AllPeerJobs, AllPeerShareLinks, DashboardWebHooks, name, data, backup, startup, wg=False)
|
||||
|
||||
|
|
@ -79,7 +83,11 @@ class AmneziaConfiguration(WireguardConfiguration):
|
|||
"I2": self.I2,
|
||||
"I3": self.I3,
|
||||
"I4": self.I4,
|
||||
"I5": self.I5
|
||||
"I5": self.I5,
|
||||
"J1": self.J1,
|
||||
"J2": self.J2,
|
||||
"J3": self.J3,
|
||||
"Itime": self.Itime
|
||||
}
|
||||
|
||||
def createDatabase(self, dbName = None):
|
||||
|
|
|
|||
|
|
@ -194,7 +194,11 @@ class Peer:
|
|||
"I2": self.configuration.I2,
|
||||
"I3": self.configuration.I3,
|
||||
"I4": self.configuration.I4,
|
||||
"I5": self.configuration.I5
|
||||
"I5": self.configuration.I5,
|
||||
"J1": self.configuration.J1,
|
||||
"J2": self.configuration.J2,
|
||||
"J3": self.configuration.J3,
|
||||
"Itime": self.configuration.Itime
|
||||
})
|
||||
|
||||
peerSection = {
|
||||
|
|
|
|||
|
|
@ -124,6 +124,10 @@ class WireguardConfiguration:
|
|||
self.__parser["Interface"]["I3"] = self.I3
|
||||
self.__parser["Interface"]["I4"] = self.I4
|
||||
self.__parser["Interface"]["I5"] = self.I5
|
||||
self.__parser["Interface"]["J1"] = self.J1
|
||||
self.__parser["Interface"]["J2"] = self.J2
|
||||
self.__parser["Interface"]["J3"] = self.J3
|
||||
self.__parser["Interface"]["Itime"] = self.Itime
|
||||
|
||||
if "Backup" not in data.keys():
|
||||
self.createDatabase()
|
||||
|
|
@ -977,7 +981,7 @@ class WireguardConfiguration:
|
|||
original = [l.rstrip("\n") for l in f.readlines()]
|
||||
allowEdit = ["Address", "PreUp", "PostUp", "PreDown", "PostDown", "ListenPort", "Table"]
|
||||
if self.Protocol == 'awg':
|
||||
allowEdit += ["Jc", "Jmin", "Jmax", "S1", "S2", "S3", "S4", "H1", "H2", "H3", "H4", "I1", "I2", "I3", "I4", "I5"]
|
||||
allowEdit += ["Jc", "Jmin", "Jmax", "S1", "S2", "S3", "S4", "H1", "H2", "H3", "H4", "I1", "I2", "I3", "I4", "I5", "J1", "J2", "J3", "Itime"]
|
||||
start = original.index("[Interface]")
|
||||
try:
|
||||
end = original.index("[Peer]")
|
||||
|
|
|
|||
|
|
@ -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', 'J1', 'J2', 'J3', 'Itime']"
|
||||
v-if="configurationInfo.Protocol === 'awg'">
|
||||
<label :for="'configuration_' + key" class="form-label">
|
||||
<small class="text-muted">
|
||||
|
|
|
|||
|
|
@ -53,7 +53,11 @@ export default {
|
|||
I2: "0",
|
||||
I3: "0",
|
||||
I4: "0",
|
||||
I5: "0"
|
||||
I5: "0",
|
||||
J1: "0",
|
||||
J2: "0",
|
||||
J3: "0",
|
||||
Itime: "0"
|
||||
},
|
||||
numberOfAvailableIPs: "0",
|
||||
error: false,
|
||||
|
|
@ -388,7 +392,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', 'J1', 'J2', 'J3', 'Itime']">
|
||||
<div class="card-header">{{ key }}</div>
|
||||
<div class="card-body">
|
||||
<input type="text"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue