[021] XenForo WebSockets [Deleted]

How is it managed if the client has a bad connection and lost the connection with the WS ? will it use the native system of XF? He will receive an error message ?
 
Does this addon support HTTP long polling for communication?
automatically fallback to it if the client does not support the web socket protocol.
 
021 updated [021] XenForo WebSockets with a new update entry:

1.1.3

Updated config for supervisorctl in setup helper script to properly stop soketi server processes.

For those who have already configured the soketi service on supervisorctl, it is recommended to do the following:
  • Stop soketi service supervisorctl stop soketi.your_domain.com
  • Kill all soketi server process: pkill -f soketi
  • Add the following content to the service config (usually located in one of the folders: /etc/supervisor/conf.d...

Read the rest of this update entry...
 
Maybe just stick to systemd? :)
It's so much easier to use and configure, plus there's no need to install another service or binary.

Bash:
[Unit]
Description=Soketi Websocket
After=network.target
StartLimitIntervalSec=30
StartLimitBurst=5

[Service]
Type=simple
User=soketiws
Restart=always
RestartSec=5s
LimitNOFILE=524288

WorkingDirectory=/var/www/domain.com
ExecStart=/usr/bin/soketi start --config=soketi.json

[Install]
WantedBy=multi-user.target
 
Maybe just stick to systemd? :)
It's so much easier to use and configure, plus there's no need to install another service or binary.

Bash:
[Unit]
Description=Soketi Websocket
After=network.target
StartLimitIntervalSec=30
StartLimitBurst=5

[Service]
Type=simple
User=soketiws
Restart=always
RestartSec=5s
LimitNOFILE=524288

WorkingDirectory=/var/www/domain.com
ExecStart=/usr/bin/soketi start --config=soketi.json

[Install]
WantedBy=multi-user.target
 
Using soketi on my server with nginx, but having some issues.

1. When I try to use the existing domain name with port 2096, the connection doesn't seem to work and keeps failing. Chrome DevTools shows:

Code:
WebSocket connection to 'wss://removed-domain-name:2096/app/D_OA4yRcSGKWR1gvMf67vnRypo508TNh?protocol=7&client=js&version=8.0.2&flash=false' failed: WebSocket is closed before the connection is established.

I tried using another subdomain so that I could configure nginx to listen on port 443 for it, but setting the Pusher host in the addon option doesn't seem to work. No matter what I put in there, the websocket connection tries to connect to the forum's domain. (it does use the port I specified, just not the host).

I tried using curl to debug.

This gives a 200:
Code:
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: my-subdomain" -H "Origin: https://my-subdomain" https://my-subdomain

This gives a 404:
Code:
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: my-subdomain" -H "Origin: https://my-subdomain" https://my-subdomain/app/D_OA4yRcSGKWR1gvMf67vnRypo508TNh?protocol=7&client=js&version=8.0.2&flash=false
 
Last edited:
This addon stops the "Who's online" location working, as everyone gets set to: BS\XFWebSockets\Pub\Controller\Broadcasting::Auth
 
This addon stops the "Who's online" location working, as everyone gets set to: BS\XFWebSockets\Pub\Controller\Broadcasting::Auth
Hello,

Please explain how these two things are related and why you decided that my add-on has to do with your problem.

Regards,
021
 
I'm talking about the members online page - https://xenforo.com/community/online/

With this addon enabled - everyone shows as "Viewing unknown page" with the path as above.

1684325503253.webp

I'm guessing this is because after the page loads, the websocket is called which then changes their currently viewing location.

In any case, disabling websockets obviously fixes this.
 
Using soketi on my server with nginx, but having some issues.

1. When I try to use the existing domain name with port 2096, the connection doesn't seem to work and keeps failing. Chrome DevTools shows:

Code:
WebSocket connection to 'wss://removed-domain-name:2096/app/D_OA4yRcSGKWR1gvMf67vnRypo508TNh?protocol=7&client=js&version=8.0.2&flash=false' failed: WebSocket is closed before the connection is established.

I tried using another subdomain so that I could configure nginx to listen on port 443 for it, but setting the Pusher host in the addon option doesn't seem to work. No matter what I put in there, the websocket connection tries to connect to the forum's domain. (it does use the port I specified, just not the host).

I tried using curl to debug.

This gives a 200:
Code:
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: my-subdomain" -H "Origin: https://my-subdomain" https://my-subdomain

This gives a 404:
Code:
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: my-subdomain" -H "Origin: https://my-subdomain" https://my-subdomain/app/D_OA4yRcSGKWR1gvMf67vnRypo508TNh?protocol=7&client=js&version=8.0.2&flash=false
just to close the loop on this--I had a typo in the port I opened on my firewall :P All is well now!
 
  • Like
Reactions: 021
Back
Top Bottom