MSR under reverse proxy?
-
It uses
document.location.hostname
(Javascript DOM), so it's already doing what you ask, it seems. Open the console log. It logs the URL it's trying to open.The server also logs connection attempts to
reactor.log
, and will note any conflict with theallows_ips
list, if you've configured that. -
I'm currently out of my home network, so no access to logs. But, Javascript's console is giving me this error:
ClientAPI.js:324 API: starting Reactor client API ClientAPI.js:228 API: opening ws://msr.mydomain:8111/wsapi ClientAPI.js:278 API: attempting ws connection to ws://msr.mydomain:8111/wsapi ClientAPI.js:280 API: got socket 1639471421927``` So, it's definitely trying to reach port 8111 on ws:// protocol. I'm using Synology Reverse Proxy to temporary get access to the web UI restricting by domain name and IP address and it's a very easy way to get access (in theory) when on the road (I'm using it with Vera as well).
-
OK. This doesn't show an error. Was there one? What it does show is the URL it's trying to connect to (does that seem right under the circumstances? Can that name resolve?) and a socket attempt and success. These will usually be followed by
API: connected to
andAPI: initial structure loaded
, if the WebSocket negotation/conversion is successful. I have no experience with this proxy, so I have no idea if it would even support WS connections.You might look at these to see if there's any help there:
-
OK. This doesn't show an error. Was there one? What it does show is the URL it's trying to connect to (does that seem right under the circumstances? Can that name resolve?) and a socket attempt and success. These will usually be followed by
API: connected to
andAPI: initial structure loaded
, if the WebSocket negotation/conversion is successful. I have no experience with this proxy, so I have no idea if it would even support WS connections.You might look at these to see if there's any help there:
@toggledbits I've already mapped websockets, but the problem is that it's trying to reach ws:// under 8111. Code is obfuscated, but I guess this line is probably writing the port as well
var _0x577573 = _0x36251f(0x107) + document[_0x36251f(0xd9)][_0x36251f(0x13b)] + _0x36251f(0x11f);
Looking at logs, it's writing:
API: opening ws://msr.mydomain:8111/wsapi
so it's something related to the port being added. I'm still out of home network, but I'll definitely look at logs when I'll be back.
-
Per my earlier post, it's using
document.location.hostname
. What's the URL that's showing in your browser when you access Reactor through the proxy? Does it change the port from 8111 to something else? -
Per my earlier post, it's using
document.location.hostname
. What's the URL that's showing in your browser when you access Reactor through the proxy? Does it change the port from 8111 to something else?@toggledbits nope, it's msr.mydomain:80 or 443 (I've tried both). So strange.
-
No worries, that's an easy fix. If I use
document.location.host
rather thandocument.location.hostname
, it will include the port if it's other than the standard. That will be in the next build. -
So, it's working, but only under HTTP. When under HTTPS, it tries to connect to ws:// instead of wss:// and it's failing. It's OK for me, since it's a private DNS and a reverse proxy, and I'm usually using it while in office to avoid the use of VPN. Thanks again for the quick fix!
-
I'll look into that.
-
T toggledbits locked this topic on