Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokoVoip 1.5: Server-side Websocket #117

Merged
merged 81 commits into from
Jul 3, 2020
Merged

Conversation

Itokoyamato
Copy link
Owner

@Itokoyamato Itokoyamato commented Jun 22, 2020

This PR brings the first iteration of a major rework of the way Tokovoip works, with some fixes along with it.
Many new parts have to work together.
I will work as fast as I can to fix issues, adjust and improve the system.

Todo:

  • Server-side websocket system
    • WS-server: websocket server (NodeJS)
    • FiveM Script: remote websocket connection
    • TS3 Plugin: websocket client
    • TS3 Plugin: automatic server discovery
  • TS3 Plugin: Voice Activation Detection support (Using radio no longer breaks it)
  • TS3 Plugin: Remove curl dependency
  • TS3 Plugin: Update RadioFX (broken by last TS update)
  • TS3 Plugin: add 'connect' button to manually trigger handshaking
  • TS3 Plugin: add 'disconnect' button to manually shutdown tokovoip
  • TS3 Plugin: trigger handshaking on channel join containing 'tokovoip' in name
  • TS3 Plugin: Add back the long gone 'Unmute All' button
  • Setup master server
  • Tests
    • Small scale tests
    • Large scale tests (in progress)
    • Fix issues recorded during tests
  • Update readme

Details:

For security reasons, FiveM aims to block any access to the player's local network through FiveM scripts, including websockets.
Previously, tokovoip would communicate with teamspeak locally, using websockets through the local network.
Since it will no longer be possible, a server-side alternative was required.
To keep things running properly, websockets are still used, however it now connects and proxies the data through a remote NodeJS server.

This does come at a hefty price.
Data has to go through the server, which means network usage and latency.
The player performance should not be too affected, except for those with slower connections.
This first implementation aims to satisfy fivem's requirements as soon as possible.
It is very inefficient data wise, since each player calculates everything for themselves, and sends it through.
The system was simply not built to run with a server in mind.

However, this does open the path to many things.
Of course a major rework will be required, but eventually, most of the work can be moved server-side, and optimized for it.
Considering how heavily tokovoip affects client performance currently, this would leave the client with very little work to do.

In the meantime, this first iteration will have to do, and will be required as soon as fivem blocks local websockets.

Note:

I have been in contact with fivem recently to keep each other aware of updates, and avoid issues like we've had in the last few months

@Itokoyamato Itokoyamato merged commit 51fce98 into master Jul 3, 2020
@Itokoyamato Itokoyamato deleted the feat-websocket-proxy branch July 3, 2020 18:57
@onvrb
Copy link

onvrb commented Jul 5, 2020

damn I just implemented this on my server like 2 days ago, I guess I gotta review everything all over again, feelsbadman

but good update, server-sided websocket ! yay !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants