Merge branch 'master' of github.com:v2ray/v2ray-core into domainsocket

This commit is contained in:
Shelikhoo
2018-04-05 19:11:33 +08:00
216 changed files with 4951 additions and 1909 deletions
Regular → Executable
+4 -7
View File
@@ -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
}
@@ -37,7 +37,7 @@ func (op *AddUserOperation) ApplyInbound(ctx context.Context, handler core.Inbou
}
um, ok := p.(proxy.UserManager)
if !ok {
return newError("proxy is not an UserManager")
return newError("proxy is not a UserManager")
}
return um.AddUser(ctx, op.User)
}
@@ -50,7 +50,7 @@ func (op *RemoveUserOperation) ApplyInbound(ctx context.Context, handler core.In
}
um, ok := p.(proxy.UserManager)
if !ok {
return newError("proxy is not an UserManager")
return newError("proxy is not a UserManager")
}
return um.RemoveUser(ctx, op.Email)
}
@@ -139,10 +139,7 @@ func (s *service) Register(server *grpc.Server) {
func init() {
common.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, cfg interface{}) (interface{}, error) {
s := core.FromContext(ctx)
if s == nil {
return nil, newError("V is not in context.")
}
s := core.MustFromContext(ctx)
return &service{v: s}, nil
}))
}
+2 -1
View File
@@ -8,7 +8,8 @@ import v2ray_core_common_serial "v2ray.com/core/common/serial"
import v2ray_core "v2ray.com/core"
import (
context "golang.org/x/net/context"
"context"
grpc "google.golang.org/grpc"
)