mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-06-28 09:16:55 +00:00
Update dashboard.py
This commit is contained in:
parent
6beddaebfd
commit
dbbcfe957b
@ -362,10 +362,10 @@ class WireguardConfiguration:
|
|||||||
"PrivateKey": self.PrivateKey,
|
"PrivateKey": self.PrivateKey,
|
||||||
"Address": self.Address,
|
"Address": self.Address,
|
||||||
"ListenPort": self.ListenPort,
|
"ListenPort": self.ListenPort,
|
||||||
"PreUp": f"{self.PreUp}",
|
"PreUp": f"",
|
||||||
"PreDown": f"{self.PreDown}",
|
"PreDown": f"",
|
||||||
"PostUp": f"{self.PostUp}",
|
"PostUp": f"",
|
||||||
"PostDown": f"{self.PostDown}",
|
"PostDown": f"",
|
||||||
"SaveConfig": "true"
|
"SaveConfig": "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1047,7 +1047,7 @@ class WireguardConfiguration:
|
|||||||
dataChanged = False
|
dataChanged = False
|
||||||
with open(self.configPath, 'r') as f:
|
with open(self.configPath, 'r') as f:
|
||||||
original = [l.rstrip("\n") for l in f.readlines()]
|
original = [l.rstrip("\n") for l in f.readlines()]
|
||||||
allowEdit = ["Address", "PreUp", "PostUp", "PreDown", "PostDown", "ListenPort"]
|
allowEdit = ["Address", "ListenPort"]
|
||||||
if self.Protocol == 'awg':
|
if self.Protocol == 'awg':
|
||||||
allowEdit += ["Jc", "Jmin", "Jmax", "S1", "S2", "H1", "H2", "H3", "H4"]
|
allowEdit += ["Jc", "Jmin", "Jmax", "S1", "S2", "H1", "H2", "H3", "H4"]
|
||||||
start = original.index("[Interface]")
|
start = original.index("[Interface]")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user