mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-12-22 15:47:59 +08:00
chore: format code
This commit is contained in:
parent
d0b95e91f5
commit
8ee452f544
@ -124,4 +124,4 @@ const (
|
||||
HTTPVersion2 HTTPVersion = "h2"
|
||||
// HTTPVersion3 is HTTP/3.
|
||||
HTTPVersion3 HTTPVersion = "h3"
|
||||
)
|
||||
)
|
||||
|
@ -47,7 +47,7 @@ func withHosts(hosts R.Hosts, mapping *cache.LruCache[netip.Addr, string]) middl
|
||||
if err == nil {
|
||||
resp.Id = r.Id
|
||||
resp.Question = r.Question
|
||||
handleCName(resp,record.Domain)
|
||||
handleCName(resp, record.Domain)
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
@ -84,7 +84,7 @@ func withHosts(hosts R.Hosts, mapping *cache.LruCache[netip.Addr, string]) middl
|
||||
case D.TypeAAAA:
|
||||
handleIPs()
|
||||
case D.TypeCNAME:
|
||||
handleCName(r,record.Domain)
|
||||
handleCName(r, record.Domain)
|
||||
default:
|
||||
return next(ctx, r)
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ func setMsgTTL(msg *D.Msg, ttl uint32) {
|
||||
}
|
||||
|
||||
func isIPRequest(q D.Question) bool {
|
||||
return q.Qclass == D.ClassINET && (q.Qtype == D.TypeA || q.Qtype == D.TypeAAAA||q.Qtype==D.TypeCNAME)
|
||||
return q.Qclass == D.ClassINET && (q.Qtype == D.TypeA || q.Qtype == D.TypeAAAA || q.Qtype == D.TypeCNAME)
|
||||
}
|
||||
|
||||
func transform(servers []NameServer, resolver *Resolver) []dnsClient {
|
||||
|
@ -44,7 +44,7 @@ func Parse(options ...Option) error {
|
||||
|
||||
if cfg.General.ExternalController != "" {
|
||||
go route.Start(cfg.General.ExternalController, cfg.General.ExternalControllerTLS,
|
||||
cfg.General.Secret, cfg.TLS.Certificate, cfg.TLS.PrivateKey,cfg.General.LogLevel==log.DEBUG)
|
||||
cfg.General.Secret, cfg.TLS.Certificate, cfg.TLS.PrivateKey, cfg.General.LogLevel == log.DEBUG)
|
||||
}
|
||||
|
||||
executor.ApplyConfig(cfg, true)
|
||||
|
Loading…
Reference in New Issue
Block a user