feat: fix YouTask peer enable + add Made by Galyaviev signature
- peer_enable: make PSK optional, only pass --client-preshared-key if non-empty - peer_enable: strip /32 suffix from client_address before passing to wg-peerctl - All pages: add "Made by Galyaviev" in Dancing Script handwritten font - login.html: styled login page with signature below card - base.html: signature in sidebar footer - style.css: .made-by Dancing Script style Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+7
-5
@@ -563,11 +563,11 @@ def peer_enable(peer_id: int):
|
||||
|
||||
name = item.get("name", "")
|
||||
pk = item.get("public_key", "")
|
||||
addr = item.get("client_address", "")
|
||||
addr = (item.get("client_address", "") or "").split("/")[0] # strip /32 if present
|
||||
routes = item.get("advertised_routes", "") or ""
|
||||
psk = item.get("peer_psk", "") or ""
|
||||
if not (name and pk and addr and psk):
|
||||
flash("Недостаточно данных для включения peer (нужны name/public key/address/psk)", "error")
|
||||
if not (name and pk):
|
||||
flash("Недостаточно данных для включения peer", "error")
|
||||
return redirect(url_for("index"))
|
||||
|
||||
cmd = [
|
||||
@@ -575,10 +575,12 @@ def peer_enable(peer_id: int):
|
||||
"add",
|
||||
"--client-name", name,
|
||||
"--client-public-key", pk,
|
||||
"--client-address", addr,
|
||||
"--client-preshared-key", psk,
|
||||
"--persistent-keepalive", "25",
|
||||
]
|
||||
if addr:
|
||||
cmd += ["--client-address", addr]
|
||||
if psk:
|
||||
cmd += ["--client-preshared-key", psk]
|
||||
if routes:
|
||||
cmd += ["--client-routes", routes]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user