Commit Graph

100 Commits

Author SHA1 Message Date
bitfl0wer ae6233b495
Lock reqwest at 0.11.23 2024-07-11 14:17:07 +02:00
bitfl0wer 0d40af069a
Revert reqwest 2024-07-11 14:13:02 +02:00
bitfl0wer 648cd21001
Eliminate openssl dependency from crate 2024-07-10 18:13:19 +02:00
bitfl0wer 215e576e90
Remove openssl from some packages' deps 2024-07-10 17:31:04 +02:00
Quat3rnion 39e7f89c78
Backend/guilds (#509)
* Fix SQL encode/decode for GuildFeatures

* Use distinct PermissionFlags type

* Add Emoji schema types, modify GuildBan with feature lock

* Add Schemas for pruning guild members

* Add schemas for interfacing with stickers backend routes

* Add schemas for interfacing with vanity-url backend routes

* Add schema for interfacing with guilds/id/welcome-screen route

* Make all Option<Vec> types Vec types with #[serde(default)]

* Add various types to support guilds/* api routes

* Add missing enums and structs for searching messages

* Use proper distinct types

* Add EmbedType enum

* Use distinct PermissionFlags type

* Changes supporting backend for VoiceState

* Changes supporting backend for AuditLog's
2024-06-27 08:45:51 +02:00
kozabrada123 89333d6353
Implement gateway options, zlib-stream compression (#508)
* feat: add GatewayOptions

* feat: implement zlib-stream compression

This also changes how gateway messages work.
Now each gateway backend converts its message into an
intermediary RawGatewayMessage, from which we inflate
and parse GatewayMessages.

Thanks to ByteAlex and their zlib-stream-rs crate, which
helped me understand how to parse a compressed websocket stream
2024-06-23 17:23:13 +02:00
kozabrada123 b3e62b2c33 always update to latest release of macros 2024-06-18 17:48:57 +02:00
kozabrada123 8d56259eac chorus macros 0.4.0 2024-06-18 17:35:39 +02:00
Quat3rnion d8560093f5 Use chorus_macros from path, since it's there anyway 2024-06-18 04:48:50 -04:00
Quat3rnion a5a0459d70
Backend related updates (#501)
(by Quat3rnion)

Some updates relating to usage with Symfonia:
* Using distinct types instead of primitives on some objects
* Add sqlx derives and implementations
* Make a facade type for Shared to be used in non-client contexts
2024-06-04 19:41:50 +02:00
kozabrada123 319748c0a7 Use WebSocketEvent derive instead of impl WebSocketEvent for .. (#491)
use derive macro instead of manual impl blocks
2024-04-28 08:32:05 +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
bitfl0wer 23c50cd262 bump version, add rust-version 2024-04-16 15:13:27 +02:00
bitfl0wer 3f06cc011c Change license to Mozilla Public License v2.0 2024-01-30 10:03:14 +01:00
bitfl0wer e15c947d33 Merge branch 'main' of https://github.com/polyphony-chat/chorus 2024-01-19 21:50:44 +01:00
bitfl0wer bb1d565b55 bump version to 0.14.0 2024-01-19 21:50:42 +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 77b3a42b1c feat: fix heartbeat time on WASM 2024-01-19 14:55:23 +01:00
bitfl0wer 9c7f430b06 bump package versions 2024-01-11 19:36:36 +01:00
bitfl0wer cceff86de1 bump reqwest to 0.11.23 2024-01-11 19:30:40 +01:00
bitfl0wer f74a8b2068 Bump version 2023-12-03 22:35:45 +01:00
bitfl0wer b03b703c22 Update reqwest dependency to version 0.11.22 2023-11-22 17:32:22 +01:00
bitfl0wer e828c3cada Bump version, explain why custom `reqwest` 2023-11-22 16:14:47 +01:00
bitfl0wer 8a588892b2 Add wasm-bindgen-futures 2023-11-22 14:24:01 +01:00
bitfl0wer 8c385ee39e Add wasm-bindgen to Cargo.toml 2023-11-20 11:41:32 +01:00
bitfl0wer 5826ccd923 add wasm-bindgen-test 2023-11-19 22:49:41 +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 9ae07a15d7 start implementing wasm gateway 2023-11-19 01:31:04 +01:00
bitfl0wer 29efae385e Apparently, the conditional dependency now works again. lol 2023-11-18 19:18:55 +01:00
bitfl0wer 81455afb7c Use upstream ws_stream_wasm 2023-11-18 19:13:26 +01:00
bitfl0wer 17a58f6f40 Use ws_stream_wasm fork 2023-11-18 15:27:22 +01:00
bitfl0wer b27f60b989 Move ws_stream_wasm to shared dependencies
Avoids conditional compiling bug i haven't yet fully found out. See:
https://cloud.bitfl0wer.de/s/KEcZs7PtQ3JZo8x
2023-11-16 16:28:55 +01:00
bitfl0wer bdfc261c93 Merge branch 'main' into feature/wasm32-unknown 2023-11-14 16:30:24 +01:00
Flori e055d8f04c Bump version 2023-11-14 16:02:51 +01:00
Flori 5e8fe3d24b Manually bump tungstenite to 0.20.1 in cargo.toml 2023-11-14 12:33:12 +01:00
bitfl0wer ec8d1c1f90 Replace tokio::time with safina-timer 2023-11-13 19:20:38 +01:00
bitfl0wer 641abe8ba6 Use patched reqwest with multipart-headers support 2023-11-13 17:34:16 +01:00
bitfl0wer 1b7450366f Include `rand` crate in all targets 2023-11-13 15:38:20 +01:00
bitfl0wer 9f81806ff1 remove sqlx from wasm-exclusion, add futures-timer 2023-11-13 15:29:37 +01:00
bitfl0wer af0178e15a compile-lock most wasm32 incompatibilities 2023-11-13 13:55:55 +01:00
bitfl0wer cc80bb50be Format changes 2023-11-13 12:57:17 +01:00
bitfl0wer 110ce51c05 + ws_stream_wasm, - dev-dependency on tokio/full 2023-11-13 12:43:00 +01:00
bitfl0wer 6af267c7cf HOTFIX: remove openssl, like it was intended 2023-11-12 18:04:47 +01:00
bitfl0wer c3d6937171 Remove openssl-dependency fully 2023-11-12 18:04:15 +01:00
bitfl0wer 279ac9d8ca Bump version for chorus 2023-11-12 17:41:59 +01:00
bitfl0wer 2f559b1397 Remove openssl, use rustls and rand instead 2023-11-12 17:20:32 +01:00
bitfl0wer 7938f0295e Add source url field trait 2023-09-03 21:00:48 +02:00
bitfl0wer db533f9700 Make Errors Hash and Eq, bump version 2023-09-03 16:55:19 +02:00