chore: правка форматирования
This commit is contained in:
1 parent
3ee9087323
commit
971b1ac8fc
13 files changed
+44
-43
No files matched your search
+12
-12
@@ -122,14 +122,14 @@ func main() {
|
||||
BondHandler: bondH.Handle,
|
||||
}
|
||||
tcpParams := &tcpfwd.Params{
|
||||
Host: cfg.TURN.Host,
|
||||
Port: cfg.TURN.Port,
|
||||
Link: cfg.VK.Link,
|
||||
Host: cfg.TURN.Host,
|
||||
Port: cfg.TURN.Port,
|
||||
Link: cfg.VK.Link,
|
||||
TransportUDP: cfg.TURN.TransportUDP,
|
||||
ObfKey: cfg.Obf.Key,
|
||||
GetCreds: tcpfwd.GetCredsFunc(vkAuth.GetCredentials),
|
||||
KCPProfile: cfg.KCP.Profile,
|
||||
KCPFEC: cfg.KCP.FEC,
|
||||
ObfKey: cfg.Obf.Key,
|
||||
GetCreds: tcpfwd.GetCredsFunc(vkAuth.GetCredentials),
|
||||
KCPProfile: cfg.KCP.Profile,
|
||||
KCPFEC: cfg.KCP.FEC,
|
||||
}
|
||||
if err := tcpfwd.Run(ctx, tcpDeps, tcpParams, peer, cfg.Proxy.Listen, cfg.TURN.N, cfg.Proxy.Mode == config.ProxyModeTCPFwdBond); err != nil {
|
||||
logger.Errorf("tcpfwd: %v", err)
|
||||
@@ -143,12 +143,12 @@ func main() {
|
||||
HandshakeSem: make(chan struct{}, dtlsHandshakeConcurrency),
|
||||
}
|
||||
udpParams := &udprelay.Params{
|
||||
Host: cfg.TURN.Host,
|
||||
Port: cfg.TURN.Port,
|
||||
Link: cfg.VK.Link,
|
||||
Host: cfg.TURN.Host,
|
||||
Port: cfg.TURN.Port,
|
||||
Link: cfg.VK.Link,
|
||||
TransportUDP: cfg.TURN.TransportUDP,
|
||||
ObfKey: cfg.Obf.Key,
|
||||
GetCreds: udprelay.GetCredsFunc(vkAuth.GetCredentials),
|
||||
ObfKey: cfg.Obf.Key,
|
||||
GetCreds: udprelay.GetCredsFunc(vkAuth.GetCredentials),
|
||||
}
|
||||
if err := udprelay.Run(ctx, udpDtlsDialer, vkAuth, logger, &connectedStreams, udpParams, peer, cfg.Proxy.Listen, cfg.TURN.N); err != nil {
|
||||
if errors.Is(err, udprelay.ErrFatal) {
|
||||
|
||||
+1
-1
@@ -11,6 +11,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/pion/dtls/v3"
|
||||
"github.com/samosvalishe/btp/internal/config"
|
||||
"github.com/samosvalishe/btp/internal/logx"
|
||||
"github.com/samosvalishe/btp/internal/proxy/bondserver"
|
||||
@@ -18,7 +19,6 @@ import (
|
||||
"github.com/samosvalishe/btp/internal/proxy/udpserver"
|
||||
"github.com/samosvalishe/btp/internal/transport/dtlsdial"
|
||||
"github.com/samosvalishe/btp/internal/wire/srtpmimicry"
|
||||
"github.com/pion/dtls/v3"
|
||||
)
|
||||
|
||||
// version is populated at build time via -ldflags "-X main.version=...".
|
||||
|
||||
Reference in new issue
Block a user