mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-10 06:16:53 -05:00
Fix typo
This commit is contained in:
parent
d1898b995f
commit
855925a805
@ -27,7 +27,7 @@ func (l *OutboundListener) add(conn net.Conn) {
|
||||
func (l *OutboundListener) Accept() (net.Conn, error) {
|
||||
select {
|
||||
case <-l.done.C():
|
||||
return nil, newError("listern closed")
|
||||
return nil, newError("listen closed")
|
||||
case c := <-l.buffer:
|
||||
return c, nil
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ func (d *DefaultDispatcher) Dispatch(ctx context.Context, destination net.Destin
|
||||
ctx = proxy.ContextWithTarget(ctx, destination)
|
||||
|
||||
outbound := ray.NewRay(ctx)
|
||||
snifferList := proxyman.ProtocoSniffersFromContext(ctx)
|
||||
snifferList := proxyman.ProtocolSniffersFromContext(ctx)
|
||||
if destination.Address.Family().IsDomain() || len(snifferList) == 0 {
|
||||
go d.routedDispatch(ctx, outbound, destination)
|
||||
} else {
|
||||
@ -110,7 +110,7 @@ func (d *DefaultDispatcher) routedDispatch(ctx context.Context, outbound ray.Out
|
||||
newError("taking detour [", tag, "] for [", destination, "]").WithContext(ctx).WriteToLog()
|
||||
dispatcher = handler
|
||||
} else {
|
||||
newError("nonexisting tag: ", tag).AtWarning().WithContext(ctx).WriteToLog()
|
||||
newError("non existing tag: ", tag).AtWarning().WithContext(ctx).WriteToLog()
|
||||
}
|
||||
} else {
|
||||
newError("default route for ", destination).WithContext(ctx).WriteToLog()
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
|
||||
// InboundOperation is the interface for operations that applies to inbound handlers.
|
||||
type InboundOperation interface {
|
||||
// ApplyInbound appliess this operation to the given inbound handler.
|
||||
// ApplyInbound applies this operation to the given inbound handler.
|
||||
ApplyInbound(context.Context, core.InboundHandler) error
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ func ContextWithProtocolSniffers(ctx context.Context, list []KnownProtocols) con
|
||||
return context.WithValue(ctx, protocolsKey, list)
|
||||
}
|
||||
|
||||
func ProtocoSniffersFromContext(ctx context.Context) []KnownProtocols {
|
||||
func ProtocolSniffersFromContext(ctx context.Context) []KnownProtocols {
|
||||
if list, ok := ctx.Value(protocolsKey).([]KnownProtocols); ok {
|
||||
return list
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ func (d *Done) Wait() {
|
||||
<-d.c
|
||||
}
|
||||
|
||||
// Close marks this Done 'done'. This method may be called mutliple times. All calls after first call will have no effect on its status.
|
||||
// Close marks this Done 'done'. This method may be called multiple times. All calls after first call will have no effect on its status.
|
||||
func (d *Done) Close() error {
|
||||
d.access.Lock()
|
||||
defer d.access.Unlock()
|
||||
|
@ -12,7 +12,7 @@ func executeAndFulfill(f func() error, done chan<- error) {
|
||||
close(done)
|
||||
}
|
||||
|
||||
// ExecuteAsync executes a function asychrously and return its result.
|
||||
// ExecuteAsync executes a function asynchronously and return its result.
|
||||
func ExecuteAsync(f func() error) <-chan error {
|
||||
done := make(chan error, 1)
|
||||
go executeAndFulfill(f, done)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package signal
|
||||
|
||||
// Notifier is an utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asychronously.
|
||||
// Notifier is an utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asynchronously.
|
||||
type Notifier struct {
|
||||
c chan struct{}
|
||||
}
|
||||
|
2
v2ray.go
2
v2ray.go
@ -130,7 +130,7 @@ func (s *Instance) Start() error {
|
||||
}
|
||||
|
||||
// RegisterFeature registers the given feature into V2Ray.
|
||||
// If feature is one of the following types, the corressponding feature in this Instance
|
||||
// If feature is one of the following types, the corresponding feature in this Instance
|
||||
// will be replaced: DNSClient, PolicyManager, Router, Dispatcher, InboundHandlerManager, OutboundHandlerManager.
|
||||
func (s *Instance) RegisterFeature(feature interface{}, instance Feature) error {
|
||||
running := false
|
||||
|
Loading…
Reference in New Issue
Block a user