Commit Graph

83 Commits

Author SHA1 Message Date
kozabrada123 aac31726ec Reuse gateway backends, don't duplicate them for voice gateway (#493) 2024-04-30 16:17:47 +02:00
kozabrada123 b2fd3e18cc Move Shared<T> to types/mod.rs, bump some dependencies (#492)
* deps: bump rustls to 0.21.11

This is done to fix CVE-2024-32650, which practically shouldn't affect
us but it's still better not to use vulnerable dependencies.

* deps: bump h2 to 0.3.26

This is done to fix another vulnerability, which should also not affect
us (non-critical, in h2 servers)

* fix: move Shared<T> to types/mod.rs
2024-04-28 14:15:57 +02:00
kozabrada123 74d6785e50 Primitive voice implementation (feature/voice) (#457)
* Add Webrtc Identify & Ready

* Add more webrtc typings

* Attempt an untested voice gateway implementation

* fmt

* Merge with main

* Same allow as for voice as normal gateway

* Test error observer

* Minor updates

* More derives

* Even more derives

* Small types update

* e

* Minor doc fixes

* Modernise voice gateway

* Add default impl for voicegatewayerror

* Make voice event fields pub

* Event updates via the scientific method

* ??

* Fix bad request in voice gateway init

* Voice gateway updates

* Fix error failing to 'deserialize' properly

* Update voice identify

* Clarify FIXME related to #430

* Update to v7

* Create seperate voice_gateway.rs and voice_udp.rs

* Restructure voice to new module

* fix: deserialization error in speaking bitflags

* feat: kinda janky ip discovery impl

* feat: return ip discovery data + minor update

* feat: packet parsing!

* fix: voice works again

* feat: add voice_media_sink_wants

(comitting uncommited changes to merge)

* chore: rename events/webrtc to events/voice_gateway

* Add UdpHandle

* chore: clippy + other misc updates

* fix: attempt to fix failing wasm build

* chore: yes clippy, that is indeed an unneeded return statement

* feat: add VoiceData struct

* feat: add VoiceData reference to UdpHandler

* feat: decryption?

* chore: formatting

* feat: add ssrc definition (op 12)

* feat: add untested sending & asbtract nonce generation

* feat: Public api! (sorta)

* small updates

* feat: add sequence number

* chore: yes

* feat: merge VoiceHandler into official development

* chore: yes clippy, you are special

* fix: duplicated gateway events

* feat: first try at vgw wasm compat

* fix: blunder

* fix: gateway connect using wrong url

* fix: properly using encrypted data, bad practice for buffer creation

* chore: split voice udp

* feat: udp error handling, create udp/backends

* fix: its the same

* chore: clarify UDP on WASM

* api: split voice gateway and udp features, test for voice gateway in WASM

* feat: new encryption modes, minor code quality

* docs: document voice encryption modes

* chore: unused imports

* chore: update getrandom version to match wasm version

* chore: update on packet size FIXME

* drop buf asap

* Okay can't do that actually

* tests: add nonce test

* normal tests work?

* docs: fix doc warning, fix incorrect refrences to 'webrtc'

* chore: json isn't a doc test

* tests: better gateway auth test

* testing tests

* update voice heartbeat, fix the new test issue

* committed too much

* fix: unused import

* fix: use ip discovery address as string, not as Vec<u8>

* chore: less obnoxious logging

* chore: better unimplemented voice modes handling

* chore: remove unused variable

* chore: use matches macro

* add voice examples, make gateway ones clearer

* rename voice example

* chore: remove unused VoiceHandler

* fix: implement gateway Reconnect and InvalidSession

* Typo

Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>

* Fix a bunch of typos

Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>

* fix: error handling while loading native certs

* fix: guh

* use be for nonce bytes

* fix: refactor gw and vgw closures

* remove outdated docs

---------

Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
2024-04-16 17:18:21 +02:00
Flori 64feb91680 License change (#477) 2024-01-31 23:59:42 +01:00
Dirk Stolle c5bfac66e5 Fix a few typos (#471) 2024-01-31 22:27:53 +01:00
bitfl0wer b8ba92cf07 Include license header everywhere 2024-01-30 17:19:34 +01:00
bitfl0wer 196a36a5fe Write documentation for observe 2024-01-21 20:13:00 +01:00
bitfl0wer 48fddb7378 rustfmt 2024-01-21 17:07:30 +01:00
bitfl0wer 39b1f1fa72 Replace use of Arc<RwLock<T>> with Shared<T> 2024-01-21 17:07:19 +01:00
bitfl0wer 92654989e8 Define type alias `Shared` 2024-01-21 17:06:43 +01:00
kozabrada123 7a878d03ac Revert "Mess w/ the tests to see if it really works"
This reverts commit 7b975e3c95.
2024-01-19 16:05:34 +01:00
kozabrada123 7b975e3c95 Mess w/ the tests to see if it really works 2024-01-19 15:53:24 +01:00
kozabrada123 1f5a6e5266 feat: switch safina_timer for tokio, fix sleep duration overflow in examples 2024-01-19 15:48:59 +01:00
kozabrada123 f97f9dafe5 fix error 2024-01-19 15:06:27 +01:00
kozabrada123 77b3a42b1c feat: fix heartbeat time on WASM 2024-01-19 14:55:23 +01:00
bitfl0wer 022bf9f320 add wasm friendly task spawning 2023-11-22 14:23:36 +01:00
bitfl0wer f8979b7feb Remove 'handle', add wasm friendly task spawning 2023-11-22 14:23:33 +01:00
bitfl0wer e629334f3f Add FIXME comments for wasm compatibility 2023-11-21 17:10:19 +01:00
bitfl0wer 5bd4b627c5 Revert "Spawn local gateway task on wasm32"
This reverts commit 3c419e8310.
2023-11-20 15:14:34 +01:00
bitfl0wer 509733bfb8 Revert "Refactor heartbeat task to support WebAssembly"
This reverts commit 8c2364b8d0.
2023-11-20 15:14:28 +01:00
bitfl0wer 8c2364b8d0 Refactor heartbeat task to support WebAssembly 2023-11-20 14:57:45 +01:00
bitfl0wer 3c419e8310 Spawn local gateway task on wasm32 2023-11-20 14:47:13 +01:00
bitfl0wer 7956a0e3cb Fix build on wasm32 2023-11-20 00:07:16 +01:00
bitfl0wer 1203e20358 Implement wasm Backend 2023-11-19 22:23:24 +01:00
bitfl0wer 8f0d8813eb Better feature locking, add wasm.rs 2023-11-19 22:04:18 +01:00
bitfl0wer 73342d5dd7 reorganize files 2023-11-19 21:21:34 +01:00
bitfl0wer 6fd6bdcbbc Give tungstenite types distinct names 2023-11-19 21:15:10 +01:00
bitfl0wer b3e7876ccf feature lock backend_tungstenite 2023-11-19 19:18:25 +01:00
bitfl0wer a4d5ebb689 Resolve merge conflicts 2023-11-19 19:12:29 +01:00
bitfl0wer 79e70c43a2 Merge branch 'websockets-backend' into feature/wasm32-unknown 2023-11-19 18:35:35 +01:00
bitfl0wer 0e16e55d64 Fix references to heartbeat_thread_communicator 2023-11-19 18:27:49 +01:00
Vincent Junge 5bd8f32a6a remove superfluous return 2023-11-19 17:47:48 +01:00
Vincent Junge c0ce540da6 for got unwrap :3 2023-11-19 17:18:08 +01:00
Vincent Junge dd9945068f removed leftover type aliases 2023-11-19 17:15:00 +01:00
Vincent Junge 0f446f43b4 removed outdated comment 2023-11-19 17:13:52 +01:00
Vincent Junge 4f207d55d9 prepare for platform-dependant websockets backend 2023-11-19 17:08:53 +01:00
bitfl0wer 19f8403bcf Make HBHandler<T,S> struct instead of trait
Make HeartbeatHandler a generic struct instead of a struct with a trait.
Reduces redundant code
2023-11-19 17:07:08 +01:00
bitfl0wer 70812c529a Move Heartbeathandler code together 2023-11-19 16:44:38 +01:00
bitfl0wer f4ae80fee9 temp: impl heartbeathandlercapable 2023-11-19 16:43:21 +01:00
bitfl0wer b3ebdd69fc Add TODO comment 2023-11-19 16:42:48 +01:00
bitfl0wer 50cd93aae1 Add kill send to WasmGateway 2023-11-19 16:42:05 +01:00
bitfl0wer 926a9fc90e TEMP: Compile wasm dependencies&code per default
TODO: Check todos before merging into dev
2023-11-19 12:52:11 +01:00
bitfl0wer 9f45094bd9 Add todos 2023-11-19 12:51:13 +01:00
bitfl0wer 565a0cd745 Impl spawn() for wasm gateway 2023-11-19 12:51:07 +01:00
bitfl0wer 9ae07a15d7 start implementing wasm gateway 2023-11-19 01:31:04 +01:00
bitfl0wer 5aeba447af Remove trait bound: From tungstenite::Message 2023-11-18 21:42:48 +01:00
bitfl0wer a0d14ceaf9 Add MessageCapable trait implementation for
WsMessage
2023-11-18 20:02:50 +01:00
bitfl0wer 6ae715988d Refactor WasmGateway struct and import statements 2023-11-18 20:02:45 +01:00
bitfl0wer 39e61a73e9 Remove is_error method from MessageCapable trait 2023-11-18 20:02:39 +01:00
bitfl0wer 287b72c99c Implement MessageCapable trait methods in gateway
default module
2023-11-18 20:02:28 +01:00