1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

fix some typo (#1482)

This commit is contained in:
Bo He 2021-12-27 12:33:08 +08:00 committed by GitHub
parent 423d566024
commit b057a37fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 18 additions and 18 deletions

View File

@ -64,7 +64,7 @@ func init() {
}
return loadJSONPB(bytes.NewReader(data))
default:
return nil, newError("unknow type")
return nil, newError("unknown type")
}
},
}))

View File

@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
/*
Package merge provides the capbility to merge multiple
Package merge provides the capability to merge multiple
JSON files or contents into one output.
Merge Rules:

View File

@ -58,7 +58,7 @@ func Merge(input interface{}, m map[string]interface{}) error {
return err
}
default:
return newError("unknow merge input type")
return newError("unknown merge input type")
}
return nil
}

View File

@ -52,7 +52,7 @@ func makeToJSONMergeFunc(converter func(v []byte) ([]byte, error)) MergeFunc {
return err
}
default:
return newError("unknow merge input type")
return newError("unknown merge input type")
}
return nil
}

View File

@ -34,7 +34,7 @@ type strategyLeastLoadConfig struct {
Baselines []duration.Duration `json:"baselines,omitempty"`
// expected nodes count to select
Expected int32 `json:"expected,omitempty"`
// max acceptable rtt, filter away high delay nodes. defalut 0
// max acceptable rtt, filter away high delay nodes. default 0
MaxRTT duration.Duration `json:"maxRTT,omitempty"`
// acceptable failure rate
Tolerance float64 `json:"tolerance,omitempty"`

View File

@ -63,7 +63,7 @@ func init() {
}
return loadV2JsonPb(data)
default:
return nil, newError("unknow type")
return nil, newError("unknown type")
}
},
}))

View File

@ -260,7 +260,7 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, wri
return err
}
// Plain HTTP request is not a stream. The request always finishes before response. Hense request has to be closed later.
// Plain HTTP request is not a stream. The request always finishes before response. Hence, request has to be closed later.
defer common.Close(link.Writer)
var result error = errWaitAnother

View File

@ -18,7 +18,7 @@ import (
"github.com/v2fly/v2ray-core/v4/transport/internet"
)
// Client is a inbound handler for Shadowsocks protocol
// Client is an inbound handler for Shadowsocks protocol
type Client struct {
serverPicker protocol.ServerPicker
policyManager policy.Manager

View File

@ -17,7 +17,7 @@ message Account {
// AuthType is the authentication type of Socks proxy.
enum AuthType {
// NO_AUTH is for anounymous authentication.
// NO_AUTH is for anonymous authentication.
NO_AUTH = 0;
// PASSWORD is for username/password authentication.
PASSWORD = 1;

View File

@ -69,7 +69,7 @@ func TestReadUsernamePassword(t *testing.T) {
t.Error("for input: ", testCase.Input, " expect username ", testCase.Username, " but actually ", username)
}
if testCase.Password != password {
t.Error("for input: ", testCase.Input, " expect passowrd ", testCase.Password, " but actually ", password)
t.Error("for input: ", testCase.Input, " expect password ", testCase.Password, " but actually ", password)
}
}
}

View File

@ -18,7 +18,7 @@ import (
"github.com/v2fly/v2ray-core/v4/transport/internet"
)
// Client is a inbound handler for trojan protocol
// Client is an inbound handler for trojan protocol
type Client struct {
serverPicker protocol.ServerPicker
policyManager policy.Manager
@ -103,7 +103,7 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter
return newError("failed to write A request payload").Base(err).AtWarning()
}
// Flush; bufferWriter.WriteMultiBufer now is bufferWriter.writer.WriteMultiBuffer
// Flush; bufferWriter.WriteMultiBuffer now is bufferWriter.writer.WriteMultiBuffer
if err = bufferWriter.SetBuffered(false); err != nil {
return newError("failed to flush payload").Base(err).AtWarning()
}

View File

@ -400,7 +400,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
// default: clientReader := reader
clientReader := encoding.DecodeBodyAddons(reader, request, requestAddons)
// from clientReader.ReadMultiBuffer to serverWriter.WriteMultiBufer
// from clientReader.ReadMultiBuffer to serverWriter.WriteMultiBuffer
if err := buf.Copy(clientReader, serverWriter, buf.UpdateActivity(timer)); err != nil {
return newError("failed to transfer request payload").Base(err).AtInfo()
}
@ -428,12 +428,12 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
}
}
// Flush; bufferWriter.WriteMultiBufer now is bufferWriter.writer.WriteMultiBuffer
// Flush; bufferWriter.WriteMultiBuffer now is bufferWriter.writer.WriteMultiBuffer
if err := bufferWriter.SetBuffered(false); err != nil {
return newError("failed to write A response payload").Base(err).AtWarning()
}
// from serverReader.ReadMultiBuffer to clientWriter.WriteMultiBufer
// from serverReader.ReadMultiBuffer to clientWriter.WriteMultiBuffer
if err := buf.Copy(serverReader, clientWriter, buf.UpdateActivity(timer)); err != nil {
return newError("failed to transfer response payload").Base(err).AtInfo()
}

View File

@ -143,12 +143,12 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
return err // ...
}
// Flush; bufferWriter.WriteMultiBufer now is bufferWriter.writer.WriteMultiBuffer
// Flush; bufferWriter.WriteMultiBuffer now is bufferWriter.writer.WriteMultiBuffer
if err := bufferWriter.SetBuffered(false); err != nil {
return newError("failed to write A request payload").Base(err).AtWarning()
}
// from clientReader.ReadMultiBuffer to serverWriter.WriteMultiBufer
// from clientReader.ReadMultiBuffer to serverWriter.WriteMultiBuffer
if err := buf.Copy(clientReader, serverWriter, buf.UpdateActivity(timer)); err != nil {
return newError("failed to transfer request payload").Base(err).AtInfo()
}
@ -167,7 +167,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
// default: serverReader := buf.NewReader(conn)
serverReader := encoding.DecodeBodyAddons(conn, request, responseAddons)
// from serverReader.ReadMultiBuffer to clientWriter.WriteMultiBufer
// from serverReader.ReadMultiBuffer to clientWriter.WriteMultiBuffer
if err := buf.Copy(serverReader, clientWriter, buf.UpdateActivity(timer)); err != nil {
return newError("failed to transfer response payload").Base(err).AtInfo()
}