Reformat code

This commit is contained in:
世界 2022-05-18 15:29:01 +08:00
parent 778992eeb9
commit f046feb9ca
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
153 changed files with 82 additions and 229 deletions

View file

@ -5,10 +5,9 @@ import (
"encoding/binary"
"hash/fnv"
"golang.org/x/crypto/sha3"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/crypto"
"golang.org/x/crypto/sha3"
)
// Authenticate authenticates a byte array using Fnv hash.

View file

@ -5,7 +5,6 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/xtls/xray-core/common"
. "github.com/xtls/xray-core/proxy/vmess/encoding"
)

View file

@ -13,8 +13,6 @@ import (
"hash/fnv"
"io"
"golang.org/x/crypto/chacha20poly1305"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/bitmask"
"github.com/xtls/xray-core/common/buf"
@ -25,6 +23,7 @@ import (
"github.com/xtls/xray-core/common/serial"
"github.com/xtls/xray-core/proxy/vmess"
vmessaead "github.com/xtls/xray-core/proxy/vmess/aead"
"golang.org/x/crypto/chacha20poly1305"
)
func hashTimestamp(h hash.Hash, t protocol.Timestamp) []byte {

View file

@ -5,7 +5,6 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/buf"
"github.com/xtls/xray-core/common/protocol"

View file

@ -5,7 +5,6 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/buf"
"github.com/xtls/xray-core/common/net"

View file

@ -12,8 +12,6 @@ import (
"sync"
"time"
"golang.org/x/crypto/chacha20poly1305"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/bitmask"
"github.com/xtls/xray-core/common/buf"
@ -24,6 +22,7 @@ import (
"github.com/xtls/xray-core/common/task"
"github.com/xtls/xray-core/proxy/vmess"
vmessaead "github.com/xtls/xray-core/proxy/vmess/aead"
"golang.org/x/crypto/chacha20poly1305"
)
type sessionID struct {
@ -140,7 +139,6 @@ func (s *ServerSession) DecodeRequestHeader(reader io.Reader, isDrain bool) (*pr
buffer := buf.New()
drainer, err := drain.NewBehaviorSeedLimitedDrainer(int64(s.userValidator.GetBehaviorSeed()), 16+38, 3266, 64)
if err != nil {
return nil, newError("failed to initialize drainer").Base(err)
}