chore: правка форматирования
This commit is contained in:
1 parent
3ee9087323
commit
971b1ac8fc
13 files changed
+44
-43
No files matched your search
@@ -234,7 +234,9 @@ func writeBondFrameToNextLane(ctx context.Context, lanes []*lane, typ byte, seq
|
||||
|
||||
func (h *Handler) copyBondToTCP(ctx context.Context, connID uint64, tcpConn net.Conn, recvCh <-chan bondframe.Frame) {
|
||||
chunks := bondframe.Reorder(ctx, tcpConn, recvCh, bondframe.ReorderHooks{
|
||||
OnOverflow: func(_ int) { h.Deps.log().Errorf("[bond %d] pending map overflow (>%d), closing", connID, bondframe.PendingCap) },
|
||||
OnOverflow: func(_ int) {
|
||||
h.Deps.log().Errorf("[bond %d] pending map overflow (>%d), closing", connID, bondframe.PendingCap)
|
||||
},
|
||||
OnUnknownType: func(typ byte) { h.Deps.log().Errorf("[bond %d] unknown frame type %d", connID, typ) },
|
||||
OnWriteError: func(err error) { h.Deps.log().Errorf("[bond %d] local TCP write error: %v", connID, err) },
|
||||
OnCloseWrite: h.Deps.log().Debugf,
|
||||
|
||||
@@ -266,7 +266,9 @@ func (c *serverConn) run() {
|
||||
|
||||
func (c *serverConn) copyBondToBackend(backendConn net.Conn) {
|
||||
chunks := bondframe.Reorder(c.ctx, backendConn, c.recvCh, bondframe.ReorderHooks{
|
||||
OnOverflow: func(_ int) { c.deps.log().Errorf("[bond %d] pending map overflow (>%d), closing", c.id, bondframe.PendingCap) },
|
||||
OnOverflow: func(_ int) {
|
||||
c.deps.log().Errorf("[bond %d] pending map overflow (>%d), closing", c.id, bondframe.PendingCap)
|
||||
},
|
||||
OnUnknownType: func(typ byte) { c.deps.log().Errorf("[bond %d] unknown frame type %d", c.id, typ) },
|
||||
OnWriteError: func(err error) { c.deps.log().Errorf("[bond %d] backend write error: %v", c.id, err) },
|
||||
OnCloseWrite: c.deps.log().Debugf,
|
||||
|
||||
@@ -23,14 +23,14 @@ type GetCredsFunc = common.GetCredsFunc
|
||||
|
||||
// Params — конфигурация TURN/wrap для пула.
|
||||
type Params struct {
|
||||
Host string
|
||||
Port string
|
||||
Link string
|
||||
Host string
|
||||
Port string
|
||||
Link string
|
||||
TransportUDP bool
|
||||
ObfKey []byte
|
||||
GetCreds GetCredsFunc
|
||||
KCPProfile kcptun.Profile
|
||||
KCPFEC kcptun.FEC
|
||||
ObfKey []byte
|
||||
GetCreds GetCredsFunc
|
||||
KCPProfile kcptun.Profile
|
||||
KCPFEC kcptun.FEC
|
||||
}
|
||||
|
||||
// BondHandler распределяет одно принятое TCP-соединение по всем активным сессиям пула.
|
||||
@@ -278,4 +278,3 @@ func createSmuxSession(ctx context.Context, deps *Deps, params *Params, peer *ne
|
||||
|
||||
return smuxSess, cleanup, nil
|
||||
}
|
||||
|
||||
@@ -129,4 +129,3 @@ func (c *prefixedConn) Read(p []byte) (int, error) {
|
||||
}
|
||||
return c.Conn.Read(p)
|
||||
}
|
||||
|
||||
@@ -33,12 +33,12 @@ type AuthHandler interface {
|
||||
|
||||
// Params — per-stream конфигурация TURN/wrap, общая для DTLS и TURN циклов.
|
||||
type Params struct {
|
||||
Host string
|
||||
Port string
|
||||
Link string
|
||||
Host string
|
||||
Port string
|
||||
Link string
|
||||
TransportUDP bool
|
||||
ObfKey []byte
|
||||
GetCreds GetCredsFunc
|
||||
ObfKey []byte
|
||||
GetCreds GetCredsFunc
|
||||
}
|
||||
|
||||
// ErrFatal возвращается из Run, когда поток встречает условие, требующее
|
||||
|
||||
Reference in new issue
Block a user