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
This commit is contained in:
@@ -691,8 +691,11 @@ func (c *RTCClient) handleSignalResponse(res *livekit.SignalResponse) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *RTCClient) WaitUntilConnected() error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
|
||||
func (c *RTCClient) WaitUntilConnected(timeout time.Duration) error {
|
||||
if timeout == 0 {
|
||||
timeout = 20 * time.Second
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
for {
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user