Files
omegle-matrix-bridge/proxy/main.py
T
2026-04-21 18:14:04 +02:00

28 lines
564 B
Python

import asyncio
import logging
import websockets
from dotenv import load_dotenv
from config import LOCAL_HOST, LOCAL_PORT
from websocket_client import handle_connection
load_dotenv()
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
datefmt="%H:%M:%S",
)
async def main():
await websockets.serve(handle_connection, LOCAL_HOST, LOCAL_PORT)
await asyncio.Future()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
logging.info("Shutting down...")