Tutorial TS3 Protocol

Asphyxia

Owner
Administrator
Joined
Apr 25, 2015
Messages
1,846
Solutions
2
Reaction score
2,201
Points
327
So as announced in a few threads, for those interested, here is the pretty much full TS3 protocol explained:
https://github.com/Splamy/TS3AudioBot/blob/master/TS3Client/ts3protocol.md

~Splamy

I have to give you a massive thanks for going through the effort of documenting and explaining the TS3 protocol. I know this was no game of hopscotch, you did some awesome research and documented it well. Do you feel a web-based TeamSpeak 3 client is feasible?

I have been doing some practicing and brainstorming ideas/ways one could carry out such a project.
 

Splamy

TeamSpeak Developer
Joined
Apr 26, 2016
Messages
72
Reaction score
101
Points
71
Well we are planning on making a rust implementation for the client (mostly for private use, but it will open source sooner or later). Rust being based on LLVM can be compiled to WebAssembly, so there's a chance this could maybe work. Our primary goal for now is to make a usable alternative to the normal ts3client with reasonable performance.
There are few apects I cant say anything about because I dont know enough:
- how custon audio input/output is handled in browers
- whether the performance of javascript is enough or webasm is needed.
- whether the required crypo libraries available for javascript
 

XRV-Webix

Member
Joined
May 2, 2016
Messages
111
Reaction score
55
Points
64
This will be awesome if someone can build up a musicbot without the need of a teamspeak client.
I see the futur musicbots being less resource consumative and the ability to have multiple bots/streams with only 1 binary running.
I hope that can be something doable.
 

Najsr

Moderator
TeamSpeak Developer
Joined
Apr 23, 2016
Messages
483
Reaction score
249
Points
167
Last edited:

Seebi

Member
Joined
Mar 9, 2016
Messages
1
Reaction score
2
Points
35
Nice work! ;)

TeamSpeak uses a custom protocol over a UDP connection, so a completely web based client will probably never be possible as you are not allowed to send UDP packets from JavaScript.
You could build a relay/proxy though, that communicates with a TS server and browsers access it through WebRTC or WebSockets.
 

Asphyxia

Owner
Administrator
Joined
Apr 25, 2015
Messages
1,846
Solutions
2
Reaction score
2,201
Points
327
Nice work! ;)

TeamSpeak uses a custom protocol over a UDP connection, so a completely web based client will probably never be possible as you are not allowed to send UDP packets from JavaScript.
You could build a relay/proxy though, that communicates with a TS server and browsers access it through WebRTC or WebSockets.
https://stackoverflow.com/questions/18897917/does-webrtc-use-tcp-or-udp

I also suggest giving a look at https://github.com/Johni0702/mumble-web

My concern has nothing to do with UDP (despite yeah it being an ass stab), just that support for such a client could involve the proprietary software vendor throwing in bits of code into new server versions that make a project taking <insert_period_of_time> a pain in the ass to continue working. Basically what I mean is if TeamSpeak 3 staff for whatever reason dislike the web client, they could attempt to block web-based clients which would be a pain-in-the-ass to keep fighting back and forth. Tug-O-War between open source and proprietary. :cool:

I guess absolutely worst case scenario, one could derive from TeamSpeak 3 an entirely open source forked remake focusing on web/mobile client availability. People do this stuff with online games all the time (think private servers).

Aside from struggling with WebRTC, there is also https://gafferongames.com/post/why_cant_i_send_udp_packets_from_a_browser/ which details netcode being great for UDP --- https://github.com/networkprotocol/netcode.io

It may be possible to work out some type of browser plugin for secure VoIP connections (w/ netcode). Having such an option in the realm of open source would drive VoIP security forward quickly.
 
Last edited:

Wooozel

Active Member
Joined
Dec 8, 2015
Messages
17
Reaction score
8
Points
78
i'll add some additions that are pretty interesting.
https://github.com/RedpointGames/netcode.io-browser
https://www.html5rocks.com/en/tutorials/webrtc/datachannels/
and take a look at the HTML5 SIP client
https://code.google.com/archive/p/sipml5/
(The protocol parsers (SIP, SDP...) are highly optimized using http://www.complang.org/ragel/ Ragel lookup tables and is suitable for embedded systems with limited memory and low computing power.) (sipML5 solution also contains webrtc2sip, click-to-call, webrtc4alland SIP TelePresence (Video Group chat) client components.)

btw as i know, google will have some interesting stuff we could need. some sneak peak: https://code.google.com/archive/p/google-voice-sipsorcery-dialplans/
 

Bluscream

Retired Staff
Contributor
Joined
May 8, 2015
Messages
967
Reaction score
934
Points
211

Asphyxia

Owner
Administrator
Joined
Apr 25, 2015
Messages
1,846
Solutions
2
Reaction score
2,201
Points
327
We (the ReSpeak organization) will not do this and we also encourage other people not to do this for the reason described here: https://github.com/ReSpeak/tsclientlib#miscellaneous
I am tied between your thoughts and @Bluscream 's

While I agree releasing TeamSpeak 3 server source could be dangerous to TeamSpeak's economy, they really put this on themselves. TeamSpeak 3 operates like a reseller contract. They basically have the knives all ready to go but they get salesmen to go door-to-door and split a share. This is an old strategy and will not work forever. They need users running to their software, lining up by the thousands to use it happily.

Discord is competitive because their approach to moneymaking involved getting many investors. Discord acquired over $10,000,000 from investors in a short period of time. They originally planned to only sell stickers to make money. Instead, they offer a monthly subscription from users. TeamSpeak 3 too could use a similar method but it would be quite difficult to enforce server-side because Discord is a centralized technology whereas TeamSpeak 3 servers are hosted by users. Having a healthy open source alternative to TeamSpeak 3 would improve the security of VoIP but could pose business risk to TeamSpeak's company. This is a tough decision to make, so I certainly can see how Splamy is thinking.
 
Last edited:

Bluscream

Retired Staff
Contributor
Joined
May 8, 2015
Messages
967
Reaction score
934
Points
211
Quick update, the whole hook works as plugin now, so it's as easy as installing the TS3Hook.ts3_plugin and starting Teamspeak with '-console'.
Also colors were added to easily see what messages are outgoing/incoming.

P.S. @Asphyxia Could you make a video tutorial/showcase for it?
 

Bluscream

Retired Staff
Contributor
Joined
May 8, 2015
Messages
967
Reaction score
934
Points
211
I thought this plugin is important enough to have it's own thread, so i created one here.
 

Splamy

TeamSpeak Developer
Joined
Apr 26, 2016
Messages
72
Reaction score
101
Points
71
Hey Splamy,

How looks that?
W2RiaDy.png
Looks fine, what is that for?
 
Top