diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2025-12-11 21:57:54 +0100 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-12-11 21:57:54 +0100 |
| commit | af27ce1399b7b7836593bb236e93c99a2ec39716 (patch) | |
| tree | 398a048aff567c385211b3b2c7d6762cabc0f755 | |
| parent | 5cc8be366056baa29048acc11f4b5e14d5dbd652 (diff) | |
Switch to public websocket server
| -rw-r--r-- | src/Main.hs | 2 | ||||
| -rw-r--r-- | src/WebSocket.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs index 644b2d3..ed19f41 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -169,7 +169,7 @@ setup = do peerList <- JS.getElementById "peer_list" watchPeers gs server peerList - startClient "localhost" 9160 "" $ \conn -> do + startClient "a.discovery.erebosprotocol.net" 443 "" $ \conn -> do void $ forkIO $ forever $ do msg <- receiveMessage conn receivedFromCustomAddress server conn msg diff --git a/src/WebSocket.hs b/src/WebSocket.hs index c3e6e84..6adbfd9 100644 --- a/src/WebSocket.hs +++ b/src/WebSocket.hs @@ -46,7 +46,7 @@ instance PeerAddressType Connection where startClient :: String -> Int -> String -> (Connection -> IO ()) -> IO () startClient addr port path fun = do connUnique <- newUnique - let connAddress = "ws://" <> addr <> ":" <> show port <> "/" <> path + let connAddress = "wss://" <> addr <> ":" <> show port <> "/" <> path connJS <- js_initWebSocket (toJSString connAddress) connInQueue <- newChan let conn = Connection {..} |