code refactor for common package

This commit is contained in:
ginuerzh
2021-11-15 13:09:45 +08:00
parent ce3d62759a
commit 2c0ce35b0b
40 changed files with 61 additions and 61 deletions

View File

@ -4,7 +4,7 @@ import (
"context"
"net"
utils "github.com/go-gost/gost/pkg/internal/utils/quic"
quic_util "github.com/go-gost/gost/pkg/common/util/quic"
"github.com/go-gost/gost/pkg/listener"
"github.com/go-gost/gost/pkg/logger"
md "github.com/go-gost/gost/pkg/metadata"
@ -53,7 +53,7 @@ func (l *quicListener) Init(md md.Metadata) (err error) {
}
if l.md.cipherKey != nil {
conn = utils.QUICCipherConn(conn, l.md.cipherKey)
conn = quic_util.QUICCipherConn(conn, l.md.cipherKey)
}
config := &quic.Config{
@ -120,7 +120,7 @@ func (l *quicListener) mux(ctx context.Context, session quic.Session) {
return
}
conn := utils.QUICConn(session, stream)
conn := quic_util.QUICConn(session, stream)
select {
case l.connChan <- conn:
case <-stream.Context().Done():