mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-26 17:03:02 +00:00
Reformat code
This commit is contained in:
parent
f57ec13880
commit
55efac7236
@ -3,11 +3,10 @@ package protocol
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"golang.org/x/sys/cpu"
|
||||
|
||||
"github.com/xtls/xray-core/common/bitmask"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/common/uuid"
|
||||
"golang.org/x/sys/cpu"
|
||||
)
|
||||
|
||||
// RequestCommand is a custom command in a proxy request.
|
||||
|
@ -485,7 +485,7 @@ func XtlsPadding(b *buf.Buffer, command byte, userUUID *[]byte, longPadding bool
|
||||
}
|
||||
paddingLen = int32(l.Int64())
|
||||
}
|
||||
if paddingLen > buf.Size - 21 - contentLen {
|
||||
if paddingLen > buf.Size-21-contentLen {
|
||||
paddingLen = buf.Size - 21 - contentLen
|
||||
}
|
||||
newbuffer := buf.New()
|
||||
|
@ -37,7 +37,6 @@ func NewDNS(ctx context.Context, config interface{}) (interface{}, error) {
|
||||
buf := make([]byte, 0x100)
|
||||
|
||||
off1, err := dns.PackDomainName(dns.Fqdn(config.(*Config).Domain), buf, 0, nil, false)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -240,8 +240,10 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
|
||||
return uConn, nil
|
||||
}
|
||||
|
||||
var href = regexp.MustCompile(`href="([/h].*?)"`)
|
||||
var dot = []byte(".")
|
||||
var (
|
||||
href = regexp.MustCompile(`href="([/h].*?)"`)
|
||||
dot = []byte(".")
|
||||
)
|
||||
|
||||
var maps struct {
|
||||
sync.Mutex
|
||||
|
Loading…
Reference in New Issue
Block a user