diff --git a/lua/gmod_integration/server/sv__websocket.lua b/lua/gmod_integration/server/sv__websocket.lua index 2382d80..f52f5c4 100644 --- a/lua/gmod_integration/server/sv__websocket.lua +++ b/lua/gmod_integration/server/sv__websocket.lua @@ -24,7 +24,8 @@ end require("gwsockets") local function getWebSocketURL() - return "wss://" .. gmInte.config.websocketFQDN + local method = gmInte.isPrivateIP(gmInte.config.websocketFQDN) && "ws" || "wss" + return method .. "://" .. gmInte.config.websocketFQDN end local socket = GWSockets.createWebSocket(getWebSocketURL())