Commit graph

81 commits

Author SHA1 Message Date
Joachim Bauch 6e1a2f6d7e
Include list of supported features in websocket response. 2024-06-03 11:14:19 +02:00
Joachim Bauch 15edeca814
Support reloading GeoIP overrides. 2024-05-28 12:26:05 +02:00
Joachim Bauch be66d9425b
Support reloading trusted proxies. 2024-05-28 12:11:39 +02:00
Joachim Bauch 05810e10ce
Improve detection of actual client IP.
Based on recommendations from MDN.
2024-05-23 09:16:25 +02:00
Joachim Bauch 4c807c86e8
Throttle resume / internal hello. 2024-05-22 10:35:11 +02:00
Joachim Bauch 7f8e44b3b5
Add bruteforce detection to backend server room handler. 2024-05-22 10:34:29 +02:00
Joachim Bauch efb722a55e
Use interface instead of concrete "Hub" class for GRPC server. 2024-05-21 09:29:22 +02:00
Joachim Bauch 4b76a49355
Don't use unnecessary pointer to "json.RawMessage".
The slice is a pointer already.
2024-05-16 20:58:42 +02:00
Joachim Bauch aac4874e72
Make trusted proxies configurable and default to loopback / private IPs. 2024-05-16 14:44:00 +02:00
Joachim Bauch bad52af35a
Validate received SDP earlier. 2024-05-16 10:04:57 +02:00
Joachim Bauch 0ee976d377
Add Context to clients / sessions.
The Context will be closed when the client disconnects / the session is removed,
so any pending requests can be cancelled.
2024-05-16 09:07:59 +02:00
Joachim Bauch 54c4f1847a
Gracefully shut down signaling server on SIGUSR1.
This will wait for all non-internal sessions to be removed / expired
but stop accepting new connections.
2024-04-23 12:25:33 +02:00
Joachim Bauch 602452fa25
Support resuming sessions that exist on a different Hub in the cluster. 2024-04-23 11:52:43 +02:00
Joachim Bauch 2468443572
Add "HandlerClient" interface to support custom implementations. 2024-04-23 11:03:30 +02:00
Joachim Bauch 2e6cf7f86b
Don't keep expiration timestamp in each session.
Reduces memory size per session and make hub lock usage consistent.
2024-04-22 15:07:48 +02:00
Joachim Bauch a68454ceec
Reuse backoff waiting code for errors during GeoIP update. 2024-02-27 16:15:42 +01:00
Joachim Bauch 7d09c71ab9
Strongly type "StreamType". 2024-02-27 15:20:14 +01:00
Joachim Bauch e61845b086
Move common option list parsing code to own function. 2023-12-07 13:33:54 +01:00
Joachim Bauch 0f83392e2d
Skip options from default section when parsing "geoip-overrides". 2023-12-07 12:14:52 +01:00
Joachim Bauch c72c821687
Check backend when searching for session to use for dialout. 2023-10-31 08:33:46 +01:00
Joachim Bauch c134883138
Switch to atomic types from Go 1.19 2023-10-30 09:32:46 +01:00
Joachim Bauch 3a7b4c48dc
Pass along dialout status through transient data. 2023-10-26 09:53:58 +02:00
Joachim Bauch e1273a3c52
Keep list of possible dialout sessions. 2023-10-26 09:53:58 +02:00
Joachim Bauch d1544dcb2c
Implement message handler for dialout support. 2023-10-26 09:53:57 +02:00
Joachim Bauch b006903a56
Support passing TTL when setting transient data from clients. 2023-10-12 11:07:11 +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 d49d3704fa
Use interface for client callbacks. 2023-02-22 08:34:17 +01:00
Joachim Bauch 8353cbbb0f
Migrate to closer helper class. 2023-02-22 08:34:15 +01:00
Joachim Bauch 2f6e2ba87c
Allow internal clients to set / change the "inCall" flags. 2023-02-20 13:25:37 +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 e101e74672
Fix sending messages to virtual sessions on different servers. 2022-07-12 11:54:41 +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 608415c3ff
Track anonymous sessions not in rooms instead of clients.
Otherwise it would be possible for clients to reconnect to reset their
timer to join a room.
2022-07-08 15:52:32 +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 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 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 dcb5be956c
Implement "sendoffer" for remote sessions. 2022-06-30 11:35:33 +02:00
Joachim Bauch 36710c8aa9
Improve detection of decodable sessions that were created on a different server. 2022-06-30 11:35:32 +02:00
Joachim Bauch a0d3af14e0
Add initial clustering support. 2022-06-30 11:35:28 +02:00
Joachim Bauch ece2903413
Trigger "joined" events through async messages. 2022-06-24 13:37:37 +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 c0f56ff81a
Merge pull request #239 from strukturag/toggle-audio-video
Support toggling audio/video in subscribed streams.
2022-05-10 11:39:10 +02:00