diff --git a/component/ssr/obfs/tls12_ticket_auth.go b/component/ssr/obfs/tls12_ticket_auth.go index b9977b7..b4c1089 100644 --- a/component/ssr/obfs/tls12_ticket_auth.go +++ b/component/ssr/obfs/tls12_ticket_auth.go @@ -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])) diff --git a/config/config.go b/config/config.go index cf6a767..b9e42dd 100644 --- a/config/config.go +++ b/config/config.go @@ -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 {