mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 03:32:33 +08:00
Chore: code style
This commit is contained in:
parent
558ac6b965
commit
68dd0622b8
|
@ -6,13 +6,13 @@ import (
|
|||
"encoding/binary"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Dreamacro/clash/common/pool"
|
||||
"github.com/Dreamacro/clash/component/ssr/tools"
|
||||
"github.com/Dreamacro/clash/log"
|
||||
)
|
||||
|
||||
type tlsAuthData struct {
|
||||
|
@ -63,7 +63,7 @@ func (t *tls12Ticket) Decode(b []byte) ([]byte, bool, error) {
|
|||
var h [5]byte
|
||||
t.recvBuffer.Read(h[:])
|
||||
if !bytes.Equal(h[:3], []byte{0x17, 0x3, 0x3}) {
|
||||
log.Println("incorrect magic number", h[:3], ", 0x170303 is expected")
|
||||
log.Warnln("incorrect magic number %x, 0x170303 is expected", h[:3])
|
||||
return nil, false, errTLS12TicketAuthIncorrectMagicNumber
|
||||
}
|
||||
size := int(binary.BigEndian.Uint16(h[3:5]))
|
||||
|
|
|
@ -403,7 +403,7 @@ func parseHosts(cfg *RawConfig) (*trie.DomainTrie, error) {
|
|||
|
||||
// add default hosts
|
||||
if err := tree.Insert("localhost", net.IP{127, 0, 0, 1}); err != nil {
|
||||
println(err.Error())
|
||||
log.Errorln("insert localhost to host error: %s", err.Error())
|
||||
}
|
||||
|
||||
if len(cfg.Hosts) != 0 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user