fix: valid WireGuard interface candidate name (app.py)
This commit is contained in:
parent
02762cc651
commit
a9f6c86c7c
1 changed files with 2 additions and 2 deletions
4
app.py
4
app.py
|
|
@ -12,7 +12,7 @@ from contextlib import asynccontextmanager
|
|||
from contextvars import ContextVar
|
||||
|
||||
log = logging.getLogger("butler")
|
||||
VERSION = "2.3.8"
|
||||
VERSION = "2.3.9"
|
||||
|
||||
API_DIR = os.environ.get("API_KEY_DIR", "/data/api")
|
||||
VAULT_CACHE_DIR = os.environ.get("VAULT_CACHE_DIR", "/data/vault-cache")
|
||||
|
|
@ -2409,7 +2409,7 @@ def _media_tunnel_install_command(role: Literal["vps", "emby"], peer_public_key:
|
|||
+lines.extend(["", "[Peer]", "PublicKey = {peer_public_key}", "AllowedIPs = {settings['peer']}"])
|
||||
+if {settings['endpoint']!r}: lines.append("Endpoint = " + {settings['endpoint']!r})
|
||||
+if {settings['keepalive']!r}: lines.append("PersistentKeepalive = " + str({settings['keepalive']!r}))
|
||||
+candidate = root / "wg-media-candidate.conf"
|
||||
+candidate = root / "wgmtest.conf"
|
||||
+candidate.write_text("\\n".join(lines) + "\\n")
|
||||
+os.chmod(candidate, 0o600)
|
||||
+check = subprocess.run(["wg-quick", "strip", str(candidate)], text=True, capture_output=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue