Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
78be6bf63d build(deps): bump flask-cors from 6.0.1 to 6.0.2 in /src
Bumps [flask-cors](https://github.com/corydolphin/flask-cors) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/corydolphin/flask-cors/releases)
- [Changelog](https://github.com/corydolphin/flask-cors/blob/main/CHANGELOG.md)
- [Commits](https://github.com/corydolphin/flask-cors/compare/6.0.1...6.0.2)

---
updated-dependencies:
- dependency-name: flask-cors
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 20:31:44 +00:00
3 changed files with 8 additions and 13 deletions

View File

@@ -18,18 +18,10 @@ def GetRemoteEndpoint() -> str:
@return:
"""
import socket
try:
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
s.connect(("1.1.1.1", 80)) # Connecting to a public IP
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
s.connect(("1.1.1.1", 80)) # Connecting to a public IP
wgd_remote_endpoint = s.getsockname()[0]
return str(wgd_remote_endpoint)
except (socket.error, OSError):
pass
try:
return socket.gethostbyname(socket.gethostname())
except (socket.error, OSError):
pass
return "127.0.0.1"
def StringToBoolean(value: str):

View File

@@ -404,7 +404,6 @@ class WireguardConfiguration:
try:
if "[Peer]" not in content:
current_app.logger.info(f"{self.Name} config has no [Peer] section")
self.Peers = []
return
peerStarts = content.index("[Peer]")
@@ -666,8 +665,9 @@ class WireguardConfiguration:
if not self.__wgSave():
return False, "Failed to save configuration through WireGuard"
self.getRestrictedPeers()
self.getPeers()
if numOfRestrictedPeers == len(listOfPublicKeys):
return True, f"Restricted {numOfRestrictedPeers} peer(s)"
return False, f"Restricted {numOfRestrictedPeers} peer(s) successfully. Failed to restrict {numOfFailedToRestrictPeers} peer(s)"
@@ -783,7 +783,9 @@ class WireguardConfiguration:
)
).mappings().fetchone()
if cur_i is not None:
# print(cur_i is None)
total_sent = cur_i['total_sent']
# print(cur_i is None)
total_receive = cur_i['total_receive']
cur_total_sent = float(data_usage[i][2]) / (1024 ** 3)
cur_total_receive = float(data_usage[i][1]) / (1024 ** 3)
@@ -1224,6 +1226,7 @@ class WireguardConfiguration:
def __validateOverridePeerSettings(self, key: str, value: str | int) -> tuple[bool, None] | tuple[bool, str]:
status = True
msg = None
print(value)
if key == "DNS" and value:
status, msg = ValidateDNSAddress(value)
elif key == "EndpointAllowedIPs" and value:

View File

@@ -3,7 +3,7 @@ ifcfg==0.24
psutil==7.1.3
pyotp==2.9.0
Flask==3.1.2
flask-cors==6.0.1
flask-cors==6.0.2
icmplib==3.0.4
gunicorn==23.0.0
requests==2.32.5