mirror of
https://github.com/hackdiaz-dev/free-turn-proxy.git
synced 2026-10-12 09:41:53 +02:00
style: gofmt/goimports новых файлов
Применить gofmt и goimports к файлам, добавленным в недавних разбиениях (udprelay/loop.go, udprelay/run.go, vkauth/token_oksession.go). Группы импортов теперь по порядку stdlib / external / internal.
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
neturl "net/url"
|
||||
|
||||
"github.com/samosvalishe/btp/internal/client/browserprofile"
|
||||
"github.com/google/uuid"
|
||||
"github.com/samosvalishe/btp/internal/client/browserprofile"
|
||||
|
||||
tlsclient "github.com/bogdanfinn/tls-client"
|
||||
)
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/cbeuw/connutil"
|
||||
"github.com/samosvalishe/btp/internal/client/vkauth"
|
||||
"github.com/samosvalishe/btp/internal/proxy/common"
|
||||
"github.com/samosvalishe/btp/internal/stats"
|
||||
"github.com/samosvalishe/btp/internal/wire/srtpmimicry"
|
||||
"github.com/samosvalishe/btp/internal/client/vkauth"
|
||||
"github.com/cbeuw/connutil"
|
||||
)
|
||||
|
||||
// DTLSLoop keeps a single DTLS termination alive for streamID, restarting it
|
||||
|
||||
@@ -52,10 +52,10 @@ var ErrFatal = errors.New("udprelay: fatal error")
|
||||
// are owned by Run and exposed here so DTLSLoop/TURNLoop can share them when
|
||||
// called directly (Run wires them automatically).
|
||||
type Deps struct {
|
||||
DTLSDialer *dtlsdial.Dialer
|
||||
Auth AuthHandler
|
||||
Log logx.Logger
|
||||
ActiveLocalPeer *atomic.Value
|
||||
DTLSDialer *dtlsdial.Dialer
|
||||
Auth AuthHandler
|
||||
Log logx.Logger
|
||||
ActiveLocalPeer *atomic.Value
|
||||
ConnectedStreams *atomic.Int32
|
||||
// fatalCh is an internal signalling channel; set by Run, written by
|
||||
// TURNLoop, and drained by Run to propagate the fatal error up.
|
||||
@@ -94,12 +94,12 @@ func Run(ctx context.Context, dtlsDialer *dtlsdial.Dialer, auth AuthHandler, log
|
||||
fatalCh := make(chan error, 1)
|
||||
var activeLocalPeer atomic.Value
|
||||
deps := &Deps{
|
||||
DTLSDialer: dtlsDialer,
|
||||
Auth: auth,
|
||||
Log: logger,
|
||||
ActiveLocalPeer: &activeLocalPeer,
|
||||
DTLSDialer: dtlsDialer,
|
||||
Auth: auth,
|
||||
Log: logger,
|
||||
ActiveLocalPeer: &activeLocalPeer,
|
||||
ConnectedStreams: connectedStreams,
|
||||
fatalCh: fatalCh,
|
||||
fatalCh: fatalCh,
|
||||
}
|
||||
|
||||
// runCtx is cancelled when a fatal error is detected (via fatalCh), which
|
||||
|
||||
Reference in New Issue
Block a user