mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Fix typos (#3527)
This commit is contained in:
parent
c69d38ae82
commit
16de0937a8
39 changed files with 72 additions and 72 deletions
|
@ -85,7 +85,7 @@ func NewClient(
|
|||
return errors.New("failed to create nameserver").Base(err).AtWarning()
|
||||
}
|
||||
|
||||
// Priotize local domains with specific TLDs or without any dot to local DNS
|
||||
// Prioritize local domains with specific TLDs or those without any dot for the local DNS
|
||||
if _, isLocalDNS := server.(*LocalNameServer); isLocalDNS {
|
||||
ns.PrioritizedDomain = append(ns.PrioritizedDomain, localTLDsAndDotlessDomains...)
|
||||
ns.OriginalRules = append(ns.OriginalRules, localTLDsAndDotlessDomainsRule)
|
||||
|
|
|
@ -259,7 +259,7 @@ func (s *DoHNameServer) sendQuery(ctx context.Context, domain string, clientIP n
|
|||
})
|
||||
|
||||
// forced to use mux for DOH
|
||||
// dnsCtx = session.ContextWithMuxPrefered(dnsCtx, true)
|
||||
// dnsCtx = session.ContextWithMuxPreferred(dnsCtx, true)
|
||||
|
||||
var cancel context.CancelFunc
|
||||
dnsCtx, cancel = context.WithDeadline(dnsCtx, deadline)
|
||||
|
|
|
@ -30,8 +30,8 @@ func New(ctx context.Context, config *Config) (*Instance, error) {
|
|||
}
|
||||
log.RegisterHandler(g)
|
||||
|
||||
// start logger instantly on inited
|
||||
// other modules would log during init
|
||||
// Start logger instantly on initialization
|
||||
// Other modules would log during initialization
|
||||
if err := g.startInternal(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -209,7 +209,7 @@ func (h *HealthPing) PutResult(tag string, rtt time.Duration) {
|
|||
if !ok {
|
||||
// validity is 2 times to sampling period, since the check are
|
||||
// distributed in the time line randomly, in extreme cases,
|
||||
// previous checks are distributed on the left, and latters
|
||||
// Previous checks are distributed on the left, and later ones
|
||||
// on the right
|
||||
validity := h.Settings.Interval * time.Duration(h.Settings.SamplingCount) * 2
|
||||
r = NewHealthPingResult(h.Settings.SamplingCount, validity)
|
||||
|
|
|
@ -272,7 +272,7 @@ func TestServiceSubscribeSubsetOfFields(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestSerivceTestRoute(t *testing.T) {
|
||||
func TestServiceTestRoute(t *testing.T) {
|
||||
c := stats.NewChannel(&stats.ChannelConfig{
|
||||
SubscriberLimit: 1,
|
||||
BufferSize: 16,
|
||||
|
|
|
@ -95,7 +95,7 @@ func TestStatsChannel(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestStatsChannelUnsubcribe(t *testing.T) {
|
||||
func TestStatsChannelUnsubscribe(t *testing.T) {
|
||||
c := NewChannel(&ChannelConfig{Blocking: true})
|
||||
common.Must(c.Start())
|
||||
defer c.Close()
|
||||
|
|
|
@ -18,7 +18,7 @@ func TestStatsCounter(t *testing.T) {
|
|||
common.Must(err)
|
||||
|
||||
if v := c.Add(1); v != 1 {
|
||||
t.Fatal("unpexcted Add(1) return: ", v, ", wanted ", 1)
|
||||
t.Fatal("unexpected Add(1) return: ", v, ", wanted ", 1)
|
||||
}
|
||||
|
||||
if v := c.Set(0); v != 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue