Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion app/observatory/burst/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion app/proxyman/inbound/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/proxyman/outbound/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion common/protocol/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion core/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions core/xray.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions infra/conf/transport_internet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion proxy/blackhole/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion transport/internet/memory_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down