Browse Source

Chore: Fix some spelling errors (#3976)

pull/3977/head
zonescape 2 weeks ago committed by yuhan6665
parent
commit
71cfea8aae
  1. 4
      app/log/log.go
  2. 2
      app/observatory/burst/ping.go
  3. 2
      app/proxyman/inbound/inbound.go
  4. 2
      app/proxyman/outbound/handler.go
  5. 2
      common/protocol/user.go
  6. 2
      core/config.go
  7. 4
      core/xray.go
  8. 4
      infra/conf/transport_internet.go
  9. 2
      proxy/blackhole/config.go
  10. 2
      transport/internet/memory_settings.go

4
app/log/log.go

@ -31,8 +31,8 @@ func New(ctx context.Context, config *Config) (*Instance, error) {
}
log.RegisterHandler(g)
// Start logger instantly on initialization
// Other modules would log during initialization
// start logger now,
// then other modules will be able to log during initialization
if err := g.startInternal(); err != nil {
return nil, err
}

2
app/observatory/burst/ping.go

@ -52,7 +52,7 @@ func newHTTPClient(ctxv context.Context, handler string, timeout time.Duration)
// MeasureDelay returns the delay time of the request to dest
func (s *pingClient) MeasureDelay() (time.Duration, error) {
if s.httpClient == nil {
panic("pingClient no initialized")
panic("pingClient not initialized")
}
req, err := http.NewRequest(http.MethodHead, s.destination, nil)
if err != nil {

2
app/proxyman/inbound/inbound.go

@ -13,7 +13,7 @@ import (
"github.com/xtls/xray-core/features/inbound"
)
// Manager is to manage all inbound handlers.
// Manager manages all inbound handlers.
type Manager struct {
access sync.RWMutex
untaggedHandler []inbound.Handler

2
app/proxyman/outbound/handler.go

@ -54,7 +54,7 @@ func getStatCounter(v *core.Instance, tag string) (stats.Counter, stats.Counter)
return uplinkCounter, downlinkCounter
}
// Handler is an implements of outbound.Handler.
// Handler implements outbound.Handler.
type Handler struct {
tag string
senderSettings *proxyman.SenderConfig

2
common/protocol/user.go

@ -7,7 +7,7 @@ import (
func (u *User) GetTypedAccount() (Account, error) {
if u.GetAccount() == nil {
return nil, errors.New("Account missing").AtWarning()
return nil, errors.New("Account is missing").AtWarning()
}
rawAccount, err := u.Account.GetInstance()

2
core/config.go

@ -30,7 +30,7 @@ type ConfigLoader func(input interface{}) (*Config, error)
// ConfigBuilder is a builder to build core.Config from filenames and formats
type ConfigBuilder func(files []*ConfigSource) (*Config, error)
// ConfigsMerger merge multiple json configs into on config
// ConfigsMerger merges multiple json configs into a single one
type ConfigsMerger func(files []*ConfigSource) (string, error)
var (

4
core/xray.go

@ -87,7 +87,7 @@ func (r *resolution) resolve(allFeatures []features.Feature) (bool, error) {
return true, err
}
// Instance combines all functionalities in Xray.
// Instance combines all Xray features.
type Instance struct {
access sync.Mutex
features []features.Feature
@ -228,7 +228,7 @@ func initInstanceWithConfig(config *Config, server *Instance) (bool, error) {
)
if server.featureResolutions != nil {
return true, errors.New("not all dependency are resolved.")
return true, errors.New("not all dependencies are resolved.")
}
if err := addInboundHandlers(server, config.Inbound); err != nil {

4
infra/conf/transport_internet.go

@ -568,7 +568,7 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
return nil, errors.New(`invalid "minClientVer": `, c.MinClientVer)
}
if u, err = strconv.ParseUint(s, 10, 8); err != nil {
return nil, errors.New(`"minClientVer[`, i, `]" should be lesser than 256`)
return nil, errors.New(`"minClientVer[`, i, `]" should be less than 256`)
} else {
config.MinClientVer[i] = byte(u)
}
@ -582,7 +582,7 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
return nil, errors.New(`invalid "maxClientVer": `, c.MaxClientVer)
}
if u, err = strconv.ParseUint(s, 10, 8); err != nil {
return nil, errors.New(`"maxClientVer[`, i, `]" should be lesser than 256`)
return nil, errors.New(`"maxClientVer[`, i, `]" should be less than 256`)
} else {
config.MaxClientVer[i] = byte(u)
}

2
proxy/blackhole/config.go

@ -17,7 +17,7 @@ Content-Length: 0
// ResponseConfig is the configuration for blackhole responses.
type ResponseConfig interface {
// WriteTo writes predefined response to the give buffer.
// WriteTo writes a predefined response to the specified buffer.
WriteTo(buf.Writer) int32
}

2
transport/internet/memory_settings.go

@ -2,7 +2,7 @@ package internet
import "github.com/xtls/xray-core/common/net"
// MemoryStreamConfig is a parsed form of StreamConfig. This is used to reduce the number of Protobuf parsings.
// MemoryStreamConfig is a parsed form of StreamConfig. It is used to reduce the number of Protobuf parses.
type MemoryStreamConfig struct {
Destination *net.Destination
ProtocolName string

Loading…
Cancel
Save