1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-14 20:55:57 +01:00
Commit graph

143 commits

Author SHA1 Message Date
Juliusz Chroboczek
ea4f14ee0a Enforce clearchat permissions in the server.
It was only being enforced in the client.
2024-05-08 15:38:51 +02:00
Juliusz Chroboczek
a76f225bc0 Implement command /identify. 2024-05-01 23:38:31 +02:00
Juliusz Chroboczek
e7e8a9b555 Add method Addr to client. 2024-05-01 23:38:21 +02:00
Juliusz Chroboczek
2f5c21d161 Implement accessors for stateful tokens. 2024-05-01 22:39:48 +02:00
Juliusz Chroboczek
3409f5a27f Replace uses of os.IsExist and os.IsNotExist with errors.Is.
The former don't properly unwrap errors.
2024-04-14 13:34:32 +02:00
Juliusz Chroboczek
68887f13d5 Rename tokens.Edit to Extend. 2024-04-14 13:21:55 +02:00
Juliusz Chroboczek
b8f7c68338 Return correct error message for invalid tokens. 2024-03-03 15:42:46 +01:00
Juliusz Chroboczek
89f947df1f Rework handling of authorisation errors.
We'd sometimes return "Internal server error" on authentication
failures.  This should be gone now.
2024-03-03 13:43:50 +01:00
Juliusz Chroboczek
29e006037c Allow proxyURL to contain a path.
We now support or reasonable values for proxyURL, such as "http:"
or "/galene".
2024-02-24 12:46:30 +01:00
Juliusz Chroboczek
1c042b55af Fix typo in error message. 2023-12-09 17:32:16 +01:00
Juliusz Chroboczek
00fbfafeeb Make unbounded channels explicit.
We used to have unbounded channels embedded within rtpconn
and webClient.  Make the structure explicit and testable.
2023-12-09 17:27:38 +01:00
Juliusz Chroboczek
76066a1a10 Fix error handling in maketoken. 2023-05-04 03:31:09 +02:00
Juliusz Chroboczek
1879ec81ea Don't send empty version fields.
We used to send a null version field in every message.  Don't.
2023-04-29 19:59:36 +02:00
Juliusz Chroboczek
8775ce6406 Keep track of issuer and creation date in tokens. 2023-04-08 21:13:35 +02:00
Juliusz Chroboczek
c501b76d2b Rework selection of simulcast tracks.
We used to hard-wire the rid identifiers.  We now assume that
the simulcast streams are ordered in decreasing order of quality.
2023-04-06 12:40:22 +02:00
Juliusz Chroboczek
4c9e00d874 Report username errors to client.
We now report ErrUsernameRequired and ErrDuplicateUsername
errors by setting the "error" field of messages.
2023-04-04 01:22:05 +02:00
Juliusz Chroboczek
8aa95f5e22 Add protocol messages for managing tokens. 2023-04-04 00:59:54 +02:00
Juliusz Chroboczek
aa53b78b2c Distinguish between no username and empty username. 2023-04-03 22:58:38 +02:00
Juliusz Chroboczek
a1c1345719 Server-side support for protocol 2.
The "time" field of messages is now a string in RFC 3339 format,
and there is a new "error" field in messages.
2023-04-03 22:58:38 +02:00
Juliusz Chroboczek
cba04e7de5 Fix typo in handling of join messages. 2023-04-03 22:33:36 +02:00
Juliusz Chroboczek
cc52e39ce4 Make some errors non-fatal.
Don't disconnect the client for some more errors.
2022-12-17 01:00:49 +01:00
Juliusz Chroboczek
8a2357de21 Only send chat history when joining.
When we moved the chat history to the client goroutine back in 0.6,
we started sending the history whenever the group configuration changed.
Only send it when first joining the group.  Thanks to Rémi Nollet.
2022-10-07 00:22:03 +02:00
Juliusz Chroboczek
0fe3ed2e15 Fix chathistory and display of anonymous users.
Chathistory messages were formatted incorrectly.
We were also not formatting correctly messages from
anonymous users.
2022-09-06 19:03:50 +02:00
Juliusz Chroboczek
3a2efbcc7e Send chathistory messages in the client goroutine.
We used to send the chat history from the reader goroutine,
which would cause them to race with the join message.
2022-09-06 03:03:50 +02:00
Juliusz Chroboczek
533e4b9b32 Version the protocol.
The handshake message now contains a list of supported protocol
versions.  Version mismatch is currently a warning, but it will be a
hard error in the future.
2022-09-02 14:30:51 +02:00
Juliusz Chroboczek
4bc873a574 Publish websocket endpoint in group status. 2022-09-01 14:55:52 +02:00
Juliusz Chroboczek
fc9f28fd68 Minor cleanups. 2022-04-23 18:43:01 +02:00
Juliusz Chroboczek
1b492114ad Fix typo in permissionsChangedAction. 2022-03-04 22:23:25 +01:00
Juliusz Chroboczek
de3a016f4d Set the username in the server when using tokens.
This avoids the need to pass the username in the URL without
requiring the client to parse tokens.
2022-02-20 15:33:11 +01:00
Juliusz Chroboczek
a86fb08f6c Replace ClientPermissions with a list of strings.
Now that we support external auth, the permissions list is
open-ended.  Make it a list for simplicity.
2022-02-19 23:44:57 +01:00
Juliusz Chroboczek
03811db37d Implement token authentication. 2022-02-18 13:35:17 +01:00
Juliusz Chroboczek
24187430e8 Rename client status to data, add group data.
We now distinguish between status, which is maintained by the server,
and data, which is provided by the client.  In addition to client data,
we now support group data.
2022-01-29 23:28:08 +01:00
Juliusz Chroboczek
710cc3cc14 Add ability to set initial user status.
Setting the status after joining (using the "setstatus" action)
may cause multiple "user" messages to be sent to clients.  Add
the ability to set the initial status at join time.
2022-01-28 22:21:19 +01:00
Juliusz Chroboczek
39976d6d0d Protect webClient.actions with its own mutex.
(*webClient).action may be called with the group mutex taken,
and therefore cannot take the client mutex.
2021-12-11 01:33:47 +01:00
Juliusz Chroboczek
abed33d654 Fix missing line break in subgroups command. 2021-11-29 17:33:46 +01:00
Juliusz Chroboczek
c7c3c9c6b0 Export group status in .status.json. 2021-10-30 19:12:06 +02:00
Juliusz Chroboczek
019f365981 Remove accessors for group description fields.
Consult the description directly.
2021-10-30 18:34:35 +02:00
Juliusz Chroboczek
869eb9b839 Move password checking into group.go.
It used to be delegated to clients.
2021-10-27 04:15:44 +02:00
Juliusz Chroboczek
09c5ba0d06 Protect against tracks without a stream. 2021-09-16 17:19:19 +02:00
Juliusz Chroboczek
e81ee4af5e Remove userId and userName from rtpconn.
They're redundant with the client field.
2021-09-16 16:53:44 +02:00
Juliusz Chroboczek
f683675ab4 Use a dedicated error value for anonymous users. 2021-09-09 22:26:08 +02:00
Juliusz Chroboczek
48a9b10ce8 Use spatial scalability when simulcast is not available.
If the client requested a low-resolution stream and there is none,
switch to SID=0.
2021-08-03 13:14:11 +02:00
Juliusz Chroboczek
3d21a79880 Don't carry up tracks explicitly.
Left over from the old data structure.
2021-08-03 02:51:44 +02:00
Juliusz Chroboczek
51c31ab729 Improve error handling for negotiation failures.
Now that we constrain tracks in offers properly, there is no need
to manually check that the codecs have been matched correctly.
2021-08-02 20:00:23 +02:00
Juliusz Chroboczek
816b7a54df Restrict negotiation of downstream codecs, allow multiple profiles.
We now restrict the allowable codecs in the downstream direction,
which leads to a clean failure instead of a silent track.  We also
allow multiple profiles for a single codec.
2021-08-02 18:08:37 +02:00
Juliusz Chroboczek
efb298f002 Use sendonly transceiver for down tracks, embed receiver in track. 2021-08-01 13:33:01 +02:00
Juliusz Chroboczek
b527c8757a Add chathistory message. 2021-07-31 14:42:26 +02:00
Juliusz Chroboczek
97a5bf60ad Send the locked user-friendly message in the group status. 2021-07-30 19:44:39 +02:00
Juliusz Chroboczek
3b98e123e0 Send a message of kind "kicked" instead of "error". 2021-07-30 19:38:02 +02:00
Juliusz Chroboczek
a5c97fd849 Add System permission.
This replaces the OverridePermissions method, and is communicated
to clients that can reliably and safely identify a system user.
2021-07-30 19:26:34 +02:00