Commit Graph

31 Commits

Author SHA1 Message Date
Raja Subramanian 2e22911dcd Remove backwards compatibility support for TURN auth. (#4539)
This was indiecated in release v1.12.0 - https://github.com/livekit/livekit/releases/tag/v1.12.0
2026-05-22 17:00:42 +05:30
cnderrauber 89faaeba82 Apply ttl check only when authenticate allocation creating (#4526)
* Apply ttl check only when authenticate allocation creating

TTL check could reject allocation/persmission refresh in
security enhancement #4505, cause long-live session disconnect
when turn credential is expired.
Only check ttl on allocation creating to prevent abusing leaked
credential but keep long-live session work.
2026-05-15 14:55:05 +08:00
Raja Subramanian cf20c9cd05 Add expiry to TURN password. (#4515)
* Add expiry to TURN password.

Defaults to 5m. For backwards compatibility expiry = 0 skips adding it.

* fix variable shadowing
2026-05-09 12:15:01 +05:30
Raja Subramanian 3de6f517e5 Add TURN permission handler. (#4505)
* Add TURN permission handler.

- Turn off permissions to private/link local/multicast and internal IPs
- Add a list of CIDRs that can be used for more things to deny
  permission to.

* unused

* add config for allowing private IPs, used in testing

* add a TTL to user name and use it to auth

* allow list for restricted peer CIDRs
2026-05-06 23:43:11 +05:30
Omar Pakker e9b113c8f2 Make the TURN bind address configurable and allow for multiple addresses. (#4315) 2026-03-30 14:46:10 +08:00
cnderrauber e963953817 Refine ipv6 support (#4352)
* Refine ipv6 support

* go mod

* check ipv4 is set in turn
2026-03-09 20:43:00 +08:00
Raja Subramanian b8ddd0f98c Taking interface{} -> any modernize bits (#4204) 2025-12-28 05:22:12 +05:30
Raja Subramanian 26822b6b49 ParseUsername utility for TURN user name. (#3547)
* ParseUsername utility for TURN user name.

NOTE: There is no state, so no need for struct method, but just doing it
similar to CreateUsername which also does not have state, but uses
struct method.

* missed base62 decode
2025-03-22 13:16:13 +05:30
cnderrauber 54f9f7de51 upgrade to pion/webrtc v4 (#3213) 2024-11-28 16:05:38 +08:00
David Zhao 0b0431b765 Per-session TURN credentials (#2080)
Switching to using session specific TURN credentials instead of shared
credentials per Room. Also eliminates need to load Room from Redis
during TURN authentication
2023-09-17 10:08:35 -07:00
David Zhao 981fb7cac7 Adding license notices (#1913)
* Adding license notices

* remove from config
2023-07-27 16:43:19 -07:00
Benjamin Pracht a08cd23b6d Adopt pion logging initialization moving to protocol (#1667) 2023-04-28 10:51:41 -07:00
David Colburn b97d59b8db consolidate room internal (#1030)
* consolidate room internal

* create room internal map

* pipelined room read

* check error

* fix pipelined reads

* clean up after test
2022-09-22 15:59:27 -07:00
cnderrauber c401ca58af turn packet and bytes stats used for telemetry and load control (#969)
* stats for turn

* add connections stats

* stats for standalone turn server only

* wire update
2022-08-31 11:00:27 +08:00
Alessio 558be854be Add turn relay start and end port configuration (#733) 2022-06-13 15:03:12 -07:00
David Colburn 13c91678bf Remove egress store (#552)
* Remove egress store

* fix imports
2022-03-22 12:37:31 -07:00
David Colburn 20f21cce2b Egress (#455)
* egress updates

* pass egressInfo to delete

* update typefakes

* export StartEgress

* update protocol

* new rpc, rename stores

* add json tag

* update tests

* update protocol
2022-02-24 14:57:14 -08:00
David Zhao c122c98e4d Improved logging configuration (#342) 2022-01-15 10:28:03 -08:00
Raja Subramanian 3a9009ae12 type definition of room name (#311)
* WIP commit

* update protocol

* Fixing a test and catching one place where casting was missed

* Fix one more spot which need conversion from livekit.RoomName -> string

* do not covert list
2022-01-02 16:49:16 +05:30
lukasIO 0d0a275101 Turn with external tls termination (#168)
* add TURN TCP port for plain tcp listener

* use externalTLS turn config option

* remove unused TCPPort config option
2021-12-14 13:36:02 -08:00
David Colburn 1d626ba053 Update turn (#147)
* more generic turn server

* public turn realm name

* support turn cert itself in config

* remove cert/key from config

* double auth handler

* generate

Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>
2021-10-18 16:14:27 -05:00
David Colburn 2a3fb5f0e7 move logging to protocol (#109) 2021-09-09 00:45:42 -07:00
David Colburn 1f1eea383f add ctx to interfaces (#105)
* add ctx to interfaces

* use existing context
2021-08-30 20:31:24 -05:00
David Colburn 69c1d4c295 Interfaces (#97)
* create interface

* move room manager to interface

* interfaces

* updates

* fix loop

* fix fakes

* remove node types
2021-08-28 18:28:08 -05:00
PJC 9016da1936 check turn domain and port range (#90)
* check negative turn port

* check turn domain

* domain check test code
2021-08-23 10:49:16 -07:00
hn8 06c44ca8f6 feat: support UDP in TURN (#61)
1. Add UDP option to TURN
2. GetLocalIPAddress default to IPv4
2021-07-19 09:21:59 -07:00
hn8 99e9997d0a feat: support SetLogger & SetLoggerFactory (#57)
* upgrade logr to stable release v1.0.0

* feat: support SetLogger & SetLoggerFactory
2021-07-18 21:28:09 -07:00
David Zhao 6751361187 Feature: codec restrictions.
In order to ensure clients are publishing with compatible codecs, the server can enforce codec restrictions.
2021-07-02 16:54:54 -07:00
David Colburn e543aaa98a turn server tls (#38)
* tls

* acm

* use cert/key files

* turn -> turns

* turn cert config

* updates

* move panic

* tidy

* final updates
2021-07-01 17:00:49 -05:00
David Zhao e20c831c14 automatic configuration of TURN, with per-room credentials. version 0.6.0 2021-03-07 23:30:21 -08:00
David Zhao fa2ffa46e7 Embedded TURN server 2021-03-06 22:47:48 -08:00