spacebarchat merged with old fosscord client test

@Madeline Madeline authored on 29 Jun 2022
.docker Revert "fix: make API dockerfile use correct setup steps" 4 years ago
.github Update documents 4 years ago
api Respect register_dateOfBirth_required = false 4 years ago
bundle Merge branch 'master' into maddyrtc 4 years ago
cdn Do stuff for npm workspace 4 years ago
dashboard Do stuff for npm workspace 4 years ago
gateway Merge branch 'master' into maddyrtc 4 years ago
rtc Do stuff for npm workspace 4 years ago
util Merge branch 'master' into maddyrtc 4 years ago
webrtc More random bullshit 4 years ago
.dockerignore prettier formatted and simplified README links 4 years ago
.editorconfig :sparkles: add editor config 4 years ago
.gitignore Restore package locks 4 years ago
.prettierrc Global prettierrc, format build.js 4 years ago
COPYING Add licence file into fosscord-server repository 4 years ago
Dockerfile refactor(Docker): add working docker scripts (#671) 4 years ago
README.md Added README, added more UDP decryption stuff 4 years ago
crowdin.yml prettier formatted and simplified README links 4 years ago
docker-compose.yml refactor(Docker): add working docker scripts (#671) 4 years ago
fosscord-server.code-workspace prettier formatted and simplified README links 4 years ago
nginx.conf Improvements + dummy API configs 4 years ago
package.json Hotfix for workspace (#739) 4 years ago
README.md

Fosscord Server

Install

Setup fosscord-server as normal ( existing installations are fine, if you run voice on the same server on port 3004 you don't need to edit the regions_available_0_endpoint record of config )

Note: currently everything about webrtc is commented out ( because I was lazy ) If you want to test that, you're gonna have to do some fiddling, shouldn't be toooo difficult ( check SelectProtocols.ts, Identify.ts and theres probably smth in Server.ts I forgot about ). Also also make sure you set the listenIps in Identify.ts properly because otherwise the transport won't start

cd webrtc
ts-node src/start.ts # don't think the build script works lol

Current problems / setup / etc:

  • Webrtc DTLS fails to properly connect with browser voice. The handshake completes and is labeled completed by chrome://webrtc-internals, however mediasoup drops all RTP packets as the 'handshake is not completed' yet.

  • After the desktop client updates it's VoiceState to join a voice channel, upon leaving the VoiceState will not update to match, and the client is prevented from joining any new voice channels. The client also continuously plays the voice disconnected notification sound. Video demo

  • Desktop client cannot properly connect to voice/media servers due to the above, but also because somewhere in my signalling there is a problem. I haven't looked much into it.

  • When the client does magically decide to try to connect, it connects to signalling but then throws an error client-side about this.conn.setSelfMute not being a function

  • I have instead been testing voice using a fork of the reverse engineered client from this article, with some slight modifications ( I think it was just changing the email field the client uses to login from email -> login. Todo: these could be aliases in fosscord-server? )

  • This client can join a channel, connect to signalling, and does send packets to the UDP server. However, I can't seem to get decrpytion to work. As far as I know, I'm using the same key I'm sending. It turns out the client converts the secret_key: Number[] received into a string, but doing the same on the server-side before passing to the decrpyt method still just complains about a key mismatch.

Resources: