Commit Graph

51 Commits

Author SHA1 Message Date
Joachim Bauch b1c78f6e9d
Use DNS monitor from static GRPC clients configuration. 2024-01-30 17:03:45 +01:00
Joachim Bauch 0d15971506
Dump previous goroutines if leakcheck fails. 2023-12-07 12:04:29 +01:00
Joachim Bauch c134883138
Switch to atomic types from Go 1.19 2023-10-30 09:32:46 +01:00
Joachim Bauch 8e98ad3438
Add tests for dialout messages. 2023-10-26 10:43:52 +02:00
Joachim Bauch 35135433c2
Return response if session tries to join room again. 2023-09-05 15:43:46 +02:00
Joachim Bauch e9140178f9
Use GeoIP overrides if no GeoIP database is configured. 2023-08-07 11:41:51 +02:00
Joachim Bauch c4ae9cdc6c
Simplify "WaitForUsersJoined" in tests. 2023-06-12 10:03:28 +02:00
Joachim Bauch 2f6e2ba87c
Allow internal clients to set / change the "inCall" flags. 2023-02-20 13:25:37 +01:00
Joachim Bauch bb24bf5f0d
Implement switchto messages. 2023-01-30 15:41:55 +01:00
Joachim Bauch 6395b87577
Test: log number of active read/write pumps in case of error.
Also dump goroutines to help tracking down what is blocking cleanup.
2023-01-18 14:26:40 +01:00
Joachim Bauch cbb6d9ca53
Update capabilities if no hello v2 token key is found in cache.
This is necessary to detect updated Talk setups where the signaling server
might have cached capabilities without the v2 token key but the clients
are trying to connect with a hello v2 token. Fetch updated capabilities in
such cases (but throttle to about one invalidation per minute).
2022-08-04 08:55:21 +02:00
Joachim Bauch 184c941f8a
Support plain Ed25519 key as returned by Nextcloud / PHP. 2022-08-03 16:33:48 +02:00
Joachim Bauch 156bc360ff
Add hello version "2.0" that authenticates connections using a JWT. 2022-08-03 16:33:45 +02:00
Joachim Bauch deaa17acc5
Implement per-backend session limit for clusters. 2022-07-13 11:52:20 +02:00
Joachim Bauch f0eb80b6fd
Add tests for virtual sessions. 2022-07-12 12:10:01 +02:00
Joachim Bauch 95d5e50705
Disconnect sessions with the same room session id synchronously.
Previously there was a difference in the events being received by other
sessions for the clustered case compared to the single-server case.
Now the events / ordering are the same for both cases.
2022-07-11 10:39:06 +02:00
Joachim Bauch 66e502dc9b
Fix handling of "unshareScreen" messages and add test.
Also update tests for "requestoffer" / "sendoffer".
2022-07-08 17:09:22 +02:00
Joachim Bauch ab26dfe90d
Add testcase for initial permissions in a room. 2022-07-08 15:11:50 +02:00
Joachim Bauch 545bce0082
Fix and add test for clustered disconnect of duplicate room ids. 2022-07-08 14:57:29 +02:00
Joachim Bauch e99d843c65
Add testcase for anonymous clients needing to join new room. 2022-07-08 14:21:50 +02:00
Joachim Bauch d3f8876d25
Merge pull request #281 from strukturag/refactor-async-events
Clustering support
2022-07-07 16:24:15 +02:00
Joachim Bauch f7db8a38e1
Send initial "welcome" message when clients connect.
This can be used to detect server features before performing the
actual "hello" handshake.
2022-07-07 09:57:10 +02:00
Joachim Bauch ec62503bd3
Support arbitrary capabilities values. 2022-07-04 13:53:02 +02:00
Joachim Bauch 24eab34da7
Allow configuring backends through etcd. 2022-06-30 11:35:36 +02:00
Joachim Bauch 20cc51c2fe
grpc: Automatically detect if a target is the current server itself.
This allows configuring the same list of targets for all instances without
having to setup the "own" address differently for each server.
2022-06-30 11:35:35 +02:00
Joachim Bauch 0e144906a4
Added tests for clustered behaviour. 2022-06-30 11:35:33 +02:00
Joachim Bauch a0d3af14e0
Add initial clustering support. 2022-06-30 11:35:28 +02:00
Joachim Bauch 0115c97946
Refactor asynchronous events to central location. 2022-06-24 13:37:35 +02:00
Joachim Bauch 800ece1d90
Support combining ping requests of different rooms on the same backend. 2022-05-17 16:38:16 +02:00
Joachim Bauch 39cc523477
Add "permission" for sessions that may not receive display names.
By default, the "join" events contain the whole userdata as received
from the "auth" response. This might include a "displayname" field
containing the display name of the associated user.

For privacy reasons in certain scenarios, some attendees should not
be able to know which other users are connected to a room, therefore
the "displayname" should be hidden for them. By default, no filtering
occurrs.
2022-04-26 14:47:01 +02:00
Joachim Bauch 2a491ec3f0
Use "T.Cleanup()" instead of manually deferred shutdown function. 2022-04-05 12:57:40 +02:00
Joachim Bauch 81a52389aa
Stop using deprecated ioutil package. 2022-04-05 12:48:27 +02:00
Joachim Bauch 614c5f6e21
Fix issues reported by revive. 2022-02-11 12:09:42 +01:00
Joachim Bauch 4630c5f38c
Add testcase with PERMISSION_MAY_PUBLISH_MEDIA. 2021-11-08 12:16:26 +01:00
Joachim Bauch 707b125730
Check individual audio/video permissions on change.
If a client publishes audio/video and no longer has the video permission,
the whole publisher will be closed. Previously this was only checking
the generic "media" permission.
2021-11-08 12:08:14 +01:00
Joachim Bauch 572176b4f5
Add first tests for split audio/video permissions. 2021-11-08 12:08:13 +01:00
Joachim Bauch b398591447
Only allow subscribing if both users are in the same room and call.
Previously it was possible to subscribe any stream if the session id of the
publisher was known.
2021-09-23 09:05:25 +02:00
Joachim Bauch ec71f29fee
Force HTTPS for backend connections in old-style configurations.
Prevents clients from sending a HTTP auth URL to trigger an insecure
connection from the signaling server to Nextcloud.
2021-07-07 09:16:59 +02:00
Joachim Bauch 2bbc0a4d3c
Fetch capabilities to check if "v3" signaling API of Talk should be used. 2021-06-08 10:23:27 +02:00
Joachim Bauch c8886d03c9
Simplify loopback NATS client.
Only use one goroutine per client instead of one per subscription.
This ensures that (like with the "real" client), all messages are
processed in order across different subscriptions.
2021-06-07 16:53:26 +02:00
Joachim Bauch 04d315b0a4
Wait for any messages to be processed before stopping Hub in tests. 2021-06-07 10:37:56 +02:00
Joachim Bauch 6e54d8f4f4
Attempt to fix flaky tests. 2021-06-04 15:46:21 +02:00
Joachim Bauch 15d5c93b0b
Support session resumption while a room is being joined.
If a client resumed a session while a (slow) backend request to join a room
was still active, the response could get lost.
2021-06-04 15:40:42 +02:00
Joachim Bauch 52c1514978
Always use auth userid in ping requests.
Fixes issue introduced in 3a2adffab6 where some
ping requests were not evaluated correctly if a userid was given in the room
session data.
2021-05-19 16:24:15 +02:00
Joachim Bauch 9cf796640c
Don't require certain order of own/other "joined" events. 2021-04-27 08:39:19 +02:00
Joachim Bauch c8e4bfe007
Fix various issues found by golangci-lint. 2021-04-26 17:25:52 +02:00
Joachim Bauch 0c53f10fd7
No need to manually close rooms in testing, will be done by hub on client disconnects. 2021-04-23 15:26:05 +02:00
Joachim Bauch 8052df4ef5
Wait for clients to be terminated before destroying hub in tests.
This should help with the flaky test failures on CI.
2021-04-23 15:12:09 +02:00
Joachim Bauch a5faca00cd
Pass backend when fetching room for managing virtual sessions.
The internal room id is different depending on the backend.
2021-04-23 14:39:42 +02:00
Joachim Bauch 3a2adffab6
Get userid from room session data if present. 2021-04-22 14:18:35 +02:00