Juliusz Chroboczek
031590b4e9
Rename 'allow-tokens' to 'unrestricted-tokens'.
2023-04-10 14:42:01 +02:00
Juliusz Chroboczek
3a6551c733
Implement "allow-tokens".
2023-04-04 01:22:05 +02:00
Juliusz Chroboczek
a6314a7384
Implement stateful tokens.
...
Stateful tokens look just like cryptographic tokens to the client.
Unlike cryptographic tokens, they are stored in a file and are
revokable and editable.
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
c58064d923
Move token handling into the separate module.
...
Tokens are now an interface, and all the token logic is encapsulated
in the token module.
2023-04-03 22:58:38 +02:00
Juliusz Chroboczek
f75b964a6b
Distinguish tokens with empty sub from no sub
...
We now distinguish between tokens that specify an empty username
(sub="") and tokens that don't specify sub. The latter are
considered invalid for now.
2023-01-14 23:19:51 +01:00
Juliusz Chroboczek
1eb7716766
Simplify group expiration.
2022-10-23 16:04:10 +02:00
Juliusz Chroboczek
16e2888d56
Add new configuration directive proxyURL.
...
The strategy of computing the base URL from the request doesn't
necessarily work if we're behind a reverse proxy. proxyURL
can be set in cases where our guess is incorrect.
Thanks to Dianne Skoll.
2022-10-21 13:28:11 +02:00
Juliusz Chroboczek
249c1c1132
Don't notify clients when description is unchanged.
...
When we fixed the handling of autolocked groups, we introduced
a bug where we spuriously notify clients even when the description
didn't change.
2022-10-07 03:02:35 +02:00
Juliusz Chroboczek
62517844a5
Ensure autolocked groups are locked on creation.
...
We used to autolock groups when the last user left, but not
when creating a group that was not in memory yet. Ensure that
groups are autolocked in all cases.
Thanks to Michael Ströder.
2022-09-22 17:32:55 +02:00
Juliusz Chroboczek
b20cb0e523
Simplify the interface to autoLockKick.
...
This just removes a minor optimisation.
2022-09-22 17:21:49 +02:00
Juliusz Chroboczek
bf142c41a0
Fix status generation for remote groups.
2022-09-16 20:45:54 +02:00
Juliusz Chroboczek
74a1243947
Fix TestPermissions.
...
This was broken when we moved GetPermission to Group.
Thanks to kiufta.
2022-09-09 14:14:24 +02:00
Juliusz Chroboczek
6bdcd504a7
Make GetPermission a method of Group.
2022-09-08 20:55:35 +02:00
Juliusz Chroboczek
b55e531aa5
Encode group location in the status.json file.
2022-09-01 15:38:29 +02:00
Juliusz Chroboczek
4bc873a574
Publish websocket endpoint in group status.
2022-09-01 14:55:52 +02:00
Juliusz Chroboczek
7d01f0339b
Avoid re-reading descriptions
...
We used to avoid re-reading descriptions when joining a group,
but we used to re-read them when updating the list of groups.
2022-07-12 20:06:34 +02:00
Juliusz Chroboczek
fd228b09c2
Fix checking for username when token is present.
2022-04-29 01:36:02 +02:00
Juliusz Chroboczek
fc9f28fd68
Minor cleanups.
2022-04-23 18:43:01 +02:00
Juliusz Chroboczek
fd09564c05
Remove H.264 Baseline profile.
...
Some devices only support the Constrained Baseline profile.
2022-03-22 01:03:56 +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
a9c9581465
Implement authPortal.
2022-02-19 23:58:31 +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
1d583e5367
Don't verify token issuer.
...
This makes it possible to use token authentication without
an authentication server.
2022-02-18 19:21:02 +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
e8fbfcb9ba
Avoid overflow in bitrate computation.
2022-01-25 20:11:28 +01:00
Juliusz Chroboczek
6fbdf0eab2
Use the new MIME type for AV1.
...
Chromium 91 and later uses "AV1" instead of "AV1X". Simulcast is
still broken.
2022-01-04 13:09:07 +01:00
Juliusz Chroboczek
3e52ac1253
Fix typo in GetConfiguration.
2021-10-31 22:43:01 +01:00
Juliusz Chroboczek
028ed7df6d
Parse config file in group.Update.
...
This makes for better error messages.
2021-10-30 19:31:34 +02:00
Juliusz Chroboczek
c7c3c9c6b0
Export group status in .status.json.
2021-10-30 19:12:06 +02:00
Juliusz Chroboczek
5e39c3a2a7
Move -redirect into the configuration file.
2021-10-30 18:54:39 +02:00
Juliusz Chroboczek
c0b30c8557
Move administrator password to data/config.json.
2021-10-30 18:54:39 +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
8c21ede9d2
Don't allow group names to start with a period.
2021-10-28 20:01:11 +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
c860fb96a3
Move server shutdown into group.go.
2021-09-11 15:42:14 +02:00
Juliusz Chroboczek
184bd30077
Protect against nil dereference in group.Get.
2021-09-11 15:14:13 +02:00
Juliusz Chroboczek
f683675ab4
Use a dedicated error value for anonymous users.
2021-09-09 22:26:08 +02:00
Juliusz Chroboczek
5beb13b21a
Early paranoia in group name validation.
...
We will fail malicious paths in openDescriptionFile, but it
doesn't harm to be paranoid early.
2021-08-24 00:31:46 +02:00
Juliusz Chroboczek
0d0a745aa3
Fix typo in KickError.Error.
2021-08-24 00:04:30 +02:00
Juliusz Chroboczek
475e36d884
Pass description to descriptionChanged.
...
Thanks to Jeroen van Veen.
2021-08-23 20:45:04 +02:00
Juliusz Chroboczek
2d1763a743
Remove obsolete test.
...
It's no longer easy to test group expiration.
2021-08-23 18:14:38 +02:00
Juliusz Chroboczek
06f2ecec16
Update the list of public groups when expiring.
...
Thanks to Jeroen van Veen for suggesting the feature.
2021-08-22 16:36:18 +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
f26cf32abb
Fix group_test.go.
2021-07-31 23:38:19 +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
Juliusz Chroboczek
eedfaccaff
Add locked and displayName to public-groups.json.
2021-07-16 20:01:54 +02:00
Juliusz Chroboczek
52a26327d7
Implement group status.
...
We now inform clients of the status of a group (locked, etc.). Also
cleans up the handling of administrative messages, which solves the
issue of receiving "user" before "joined".
2021-07-16 19:51:54 +02:00
Antonin Décimo
f89270e874
Fix typos.
2021-06-09 15:20:17 +02:00
Juliusz Chroboczek
3e00bb4293
AV1 support.
2021-05-15 19:54:07 +02:00
Juliusz Chroboczek
515c4a5cd0
Rename pushConns to requestConns, move into Client interface.
...
Also allow selecting just a single connection.
2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
6f9d7fc306
Scalable video coding (SVC).
2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
3f3b245926
Fix profile-id for VP9.
2021-05-13 12:59:47 +02:00
Juliusz Chroboczek
26bf8a341a
Don't send client parameters in delete message.
...
This avoids a race condition since the delete messages are sent
asynchronously.
2021-05-10 16:58:28 +02:00
Juliusz Chroboczek
795a40ceaf
Simulcast.
2021-05-08 21:12:29 +02:00
Juliusz Chroboczek
e24488ac62
Fix broken test.
2021-05-08 16:09:22 +02:00
Juliusz Chroboczek
99026c0e48
Implement option -udp-range.
2021-04-29 23:05:11 +02:00
Juliusz Chroboczek
cd6920d7e2
Allow group.API() to fail.
2021-04-29 21:10:04 +02:00
Juliusz Chroboczek
3ba2394be7
Implement user statuses.
...
The server now maintains a set of statuses for each user that are not
interpreted by the server but communicated to the other members of the
group using 'user' messages.
2021-04-28 17:01:05 +02:00
Juliusz Chroboczek
f0a39fca48
Send user permissions to client.
...
We now maintain the user list in the serverConnection.
2021-04-28 00:07:19 +02:00
Juliusz Chroboczek
189dfb4abe
Export and document group.Description.
...
This is useful for people writing administrative interfaces.
2021-04-22 17:58:30 +02:00
Juliusz Chroboczek
b660bc404c
Attempt to negotiate stereo Opus audio.
2021-03-13 16:29:58 +01:00
Juliusz Chroboczek
ea321be17a
Make Kick part of the Client interface.
...
All clients implement Kick, no need for a separate interface.
2021-02-26 16:20:13 +01:00
Juliusz Chroboczek
be2f2d7cb3
Fix typo in new client pushing code.
2021-02-15 13:43:10 +01:00
Juliusz Chroboczek
aaaaae5588
Add unit test for groups.
2021-02-14 20:14:12 +01:00
Juliusz Chroboczek
105515d56e
Add unit test for chat history.
2021-02-14 19:44:19 +01:00
Juliusz Chroboczek
fa625c693e
Push clients synchronously.
...
Doing this asynchronously was racy -- under extreme circumstances, a
client could be deleted before it was added.
2021-02-14 16:46:15 +01:00
Juliusz Chroboczek
c4e26b65b7
Tighten user check.
...
Don't allow a user with a wildcard password entry to use the same
username as a user with a specific entry even at the same privilege
level.
2021-02-06 23:32:42 +01:00
Juliusz Chroboczek
91c161e548
Don't cache group files for 5s.
...
A stat of a cached file is cheap, no need to micro-optimise.
2021-02-06 21:44:14 +01:00
Juliusz Chroboczek
b4240c4505
Don't reuse API between peer connections.
...
This turns out to be incorrect when a MediaEngine is attached.
2021-02-04 21:03:17 +01:00
Juliusz Chroboczek
14a4303664
Rework connection replacement.
...
We used to signal connection replacement by reusing the same connection
id. This turned out to be racy, as we couldn't reliably discard old
answers after a connection id was refused.
We now use a new id for every new connection, and explicitly signal
stream replacement in the offer message. This requires maintaining a
local id on the client side.
2021-01-31 23:59:17 +01:00
Juliusz Chroboczek
a15915e8fc
Tweak the autokick code.
2021-01-17 21:52:26 +01:00
Juliusz Chroboczek
c769a4aad4
Add autokick option.
2021-01-17 21:29:07 +01:00
Juliusz Chroboczek
6098d4af9d
Implement autolock.
2021-01-14 03:56:37 +01:00
Juliusz Chroboczek
2df05ca257
Fix typo in ReadPublicGroups.
2021-01-14 01:49:06 +01:00
Juliusz Chroboczek
98235afe06
Disallow unknown fields in group descriptions.
...
Make the de-facto "comment" and "contact" fields official.
2021-01-13 23:00:48 +01:00
Juliusz Chroboczek
61990ff1ef
Check all group files on startup, not just the toplevel directory.
2021-01-13 22:56:43 +01:00
Juliusz Chroboczek
43ed55a055
Update group API after description change.
2021-01-04 01:41:34 +01:00
Juliusz Chroboczek
f53276b89e
Simplify the protocol and the protocol interface.
...
Split the id field into id and source, where source indicates the sender
of the message and id the entity being sent. Remove the label request,
just use the offerer's username. Maintain the username within the
ServerConnection, this removes a parameter from some methods.
2021-01-03 12:17:30 +01:00
Juliusz Chroboczek
450601f0e8
Move ICE code into own module, add tests.
2021-01-02 00:21:17 +01:00
Juliusz Chroboczek
845dccc2bb
Implement coturn's use-auth-secret.
2021-01-01 23:50:34 +01:00
Juliusz Chroboczek
dbec9df288
Use Pion's JSON support for ICE configuration.
2021-01-01 22:28:38 +01:00
Juliusz Chroboczek
307c834b09
Check ICE configuration periodically.
2020-12-28 19:12:09 +01:00
Juliusz Chroboczek
89a9e6c738
Implement command-line option "relay-only".
2020-12-28 02:56:49 +01:00
Juliusz Chroboczek
a0418d26ec
Send RTC configuration with joined message.
...
This avoids one HTTP request, and is potentially more flexible.
2020-12-28 02:55:19 +01:00
Juliusz Chroboczek
d09c0f0a80
Make the value field of client messages carry arbitrary types.
2020-12-28 01:49:27 +01:00
Juliusz Chroboczek
5d38b0a231
Allow various codecs.
...
It is now possible to specify codecs other than VP8 and Opus. This
turns out not to be very useful, since VP8 is the only codec supported
by all browsers (in violation of the WebRTC spec, which mandates support
for H.264), and there is no good reason to use anything other than Opus
for audio.
2020-12-26 19:46:37 +01:00
Juliusz Chroboczek
d43a2b0104
Implement WallOps to send a warning to all operators.
2020-12-23 23:15:36 +01:00
Juliusz Chroboczek
4fde2c40e6
Run gofmt.
2020-12-19 17:38:47 +01:00
Juliusz Chroboczek
325f288189
Move to github.
2020-12-19 17:37:48 +01:00
Juliusz Chroboczek
66fb73d01e
Relicense under the MIT licence.
2020-12-19 17:26:33 +01:00
Juliusz Chroboczek
ef1c211b7f
SFU is now called Galène.
2020-12-06 19:51:02 +01:00
Juliusz Chroboczek
2d07c5d317
Move to Pion v3 API.
2020-12-06 11:15:59 +01:00
Juliusz Chroboczek
0e7bf0b348
Carry group around when pushing connections.
...
This avoids a race condition if the group changes before the connections
are pushed.
2020-12-05 00:07:34 +01:00
Juliusz Chroboczek
b134bfcf13
Improve error handling on join failure.
...
Solves the issue of groups with a name ending in "/".
2020-12-04 22:56:29 +01:00
Juliusz Chroboczek
27a2e45500
Implement /subgroups.
2020-12-02 19:47:32 +01:00
Juliusz Chroboczek
b30d4fe537
Add delay after login failure.
2020-12-02 00:07:31 +01:00
Juliusz Chroboczek
0265df6331
Expire idle groups from memory.
...
Also get rid of dead groups, they're not useful.
2020-12-01 21:07:44 +01:00