CI / Build & Quality Checks (push) Successful in 1m42s
CI / Docker image build & smoke test (push) Skipped
CI / Secret scan (gitleaks) (push) Successful in 6s
CI / Trigger Desktop Build (push) Successful in 7s
CI / Playwright smoke (e2e) (push) Successful in 2m22s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
16 lines
1.1 KiB
Python
16 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
"""Self-signed https server on :443 serving the client well-known with the
|
|
LiveKit focus for the local calls stack (see scripts/dev-homeserver.sh calls)."""
|
|
import http.server, os, ssl, json
|
|
BODY = json.dumps({"m.homeserver": {"base_url": "http://localhost:8008"}, "org.matrix.msc4143.rtc_foci": [{"type": "livekit", "livekit_service_url": "http://127.0.0.1:8070"}]}).encode()
|
|
class H(http.server.BaseHTTPRequestHandler):
|
|
def do_GET(self):
|
|
if self.path.startswith('/.well-known/matrix/client'):
|
|
self.send_response(200); self.send_header('Content-Type','application/json'); self.send_header('Access-Control-Allow-Origin','*'); self.send_header('Content-Length',str(len(BODY))); self.end_headers(); self.wfile.write(BODY)
|
|
else:
|
|
self.send_response(404); self.end_headers()
|
|
def log_message(self,*a): pass
|
|
srv = http.server.ThreadingHTTPServer(('127.0.0.1', 443), H)
|
|
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER); ctx.load_cert_chain(os.environ.get('CERT', 'wk.crt'), os.environ.get('KEY', 'wk.key')); srv.socket = ctx.wrap_socket(srv.socket, server_side=True)
|
|
srv.serve_forever()
|