mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-05-23 04:39:08 -04:00
rename interfaces
This commit is contained in:
@@ -39,7 +39,7 @@ func New(ctx context.Context, config *Config) (*DokodemoDoor, error) {
|
||||
port: net.Port(config.Port),
|
||||
}
|
||||
space.OnInitialize(func() error {
|
||||
pm := policy.PolicyFromSpace(space)
|
||||
pm := policy.FromSpace(space)
|
||||
if pm == nil {
|
||||
return newError("Policy not found in space.")
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ func New(ctx context.Context, config *Config) (*Handler, error) {
|
||||
return newError("DNS server is not found in the space")
|
||||
}
|
||||
}
|
||||
pm := policy.PolicyFromSpace(space)
|
||||
pm := policy.FromSpace(space)
|
||||
if pm == nil {
|
||||
return newError("Policy not found in space.")
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) {
|
||||
config: config,
|
||||
}
|
||||
space.OnInitialize(func() error {
|
||||
pm := policy.PolicyFromSpace(space)
|
||||
pm := policy.FromSpace(space)
|
||||
if pm == nil {
|
||||
return newError("Policy not found in space.")
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
// Client is a inbound handler for Shadowsocks protocol
|
||||
type Client struct {
|
||||
serverPicker protocol.ServerPicker
|
||||
policyManager policy.Interface
|
||||
policyManager policy.Manager
|
||||
}
|
||||
|
||||
// NewClient create a new Shadowsocks client.
|
||||
@@ -40,7 +40,7 @@ func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) {
|
||||
return nil, newError("Space not found.")
|
||||
}
|
||||
space.OnInitialize(func() error {
|
||||
pm := policy.PolicyFromSpace(space)
|
||||
pm := policy.FromSpace(space)
|
||||
if pm == nil {
|
||||
return newError("Policy not found in space.")
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ type Server struct {
|
||||
config *ServerConfig
|
||||
user *protocol.User
|
||||
account *ShadowsocksAccount
|
||||
policyManager policy.Interface
|
||||
policyManager policy.Manager
|
||||
}
|
||||
|
||||
// NewServer create a new Shadowsocks server.
|
||||
@@ -48,7 +48,7 @@ func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) {
|
||||
}
|
||||
|
||||
space.OnInitialize(func() error {
|
||||
pm := policy.PolicyFromSpace(space)
|
||||
pm := policy.FromSpace(space)
|
||||
if pm == nil {
|
||||
return newError("Policy not found in space.")
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) {
|
||||
config: config,
|
||||
}
|
||||
space.OnInitialize(func() error {
|
||||
pm := policy.PolicyFromSpace(space)
|
||||
pm := policy.FromSpace(space)
|
||||
if pm == nil {
|
||||
return newError("Policy not found in space.")
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ type Handler struct {
|
||||
usersByEmail *userByEmail
|
||||
detours *DetourConfig
|
||||
sessionHistory *encoding.SessionHistory
|
||||
policyManager policy.Interface
|
||||
policyManager policy.Manager
|
||||
}
|
||||
|
||||
// New creates a new VMess inbound handler.
|
||||
@@ -108,7 +108,7 @@ func New(ctx context.Context, config *Config) (*Handler, error) {
|
||||
if handler.inboundHandlerManager == nil {
|
||||
return newError("InboundHandlerManager is not found is space.")
|
||||
}
|
||||
handler.policyManager = policy.PolicyFromSpace(space)
|
||||
handler.policyManager = policy.FromSpace(space)
|
||||
if handler.policyManager == nil {
|
||||
return newError("Policy is not found in space.")
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
type Handler struct {
|
||||
serverList *protocol.ServerList
|
||||
serverPicker protocol.ServerPicker
|
||||
policyManager policy.Interface
|
||||
policyManager policy.Manager
|
||||
}
|
||||
|
||||
func New(ctx context.Context, config *Config) (*Handler, error) {
|
||||
@@ -45,7 +45,7 @@ func New(ctx context.Context, config *Config) (*Handler, error) {
|
||||
}
|
||||
|
||||
space.OnInitialize(func() error {
|
||||
pm := policy.PolicyFromSpace(space)
|
||||
pm := policy.FromSpace(space)
|
||||
if pm == nil {
|
||||
return newError("Policy is not found in space.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user