feat(client): провайдер direct - прямо на сервер без TURN-реле
Тот же DTLS с обфускацией, сервер не меняется. По умолчанию один поток.
This commit is contained in:
1 parent
7df3a3fd91
commit
ee30afc922
17 files changed
+244
-102
No files matched your search
@@ -74,9 +74,6 @@ func TURNLoop(ctx context.Context, deps *Deps, params *Params, peer *net.UDPAddr
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case pair := <-connchan:
|
||||
if !deps.allocPace.Wait(ctx) {
|
||||
return
|
||||
}
|
||||
c := make(chan error, 1)
|
||||
go deps.guard(func() { oneTURN(ctx, deps, params, peer, pair.pipe, streamID, c) })()
|
||||
|
||||
@@ -234,7 +231,7 @@ func oneTURN(ctx context.Context, deps *Deps, params *Params, peer *net.UDPAddr,
|
||||
c <- err
|
||||
}()
|
||||
|
||||
stream, derr := DialTURN(ctx, params.Host, params.Port, params.TransportUDP, peer, streamID, params.GetCreds, deps.log())
|
||||
stream, derr := params.Dial(ctx, streamID)
|
||||
if derr != nil {
|
||||
if deps.Auth.IsAuthError(derr) {
|
||||
deps.Auth.HandleAuthError(streamID)
|
||||
|
||||
Reference in new issue
Block a user