relay over ws supossedly working

This commit is contained in:
Dobromir Popov
2026-06-30 21:06:39 +02:00
parent d0307fcc84
commit 61074a8fe8
6 changed files with 429 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ import argparse
import sys
import time
from .server import TrackerServer
from .server import TrackerServer, derive_relay_url_from_public_tracker_url
def main() -> None:
@@ -52,6 +52,7 @@ def main() -> None:
if args.command in {None, "start"}:
cluster_peers = [u.strip() for u in args.cluster_peers.split(",") if u.strip()]
relay_url = args.relay_url or derive_relay_url_from_public_tracker_url(args.self_url)
server = TrackerServer(
host=args.host,
port=args.port,
@@ -59,7 +60,7 @@ def main() -> None:
cluster_peers=cluster_peers or None,
cluster_self_url=args.self_url,
stats_db=getattr(args, "stats_db", None),
relay_url=args.relay_url,
relay_url=relay_url,
)
port = server.start()
print(f"meshnet-tracker listening on http://{args.host}:{port}", flush=True)