mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-14 17:49:15 -04:00
prototype of commander
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
"v2ray.com/core"
|
||||
"v2ray.com/core/common/net"
|
||||
"v2ray.com/core/common/protocol"
|
||||
"v2ray.com/core/transport/internet"
|
||||
"v2ray.com/core/transport/ray"
|
||||
)
|
||||
@@ -36,3 +37,20 @@ type Dialer interface {
|
||||
// Dial dials a system connection to the given destination.
|
||||
Dial(ctx context.Context, destination net.Destination) (internet.Connection, error)
|
||||
}
|
||||
|
||||
// UserManager is the interface for Inbounds and Outbounds that can manage their users.
|
||||
type UserManager interface {
|
||||
// AddUser adds a new user.
|
||||
AddUser(context.Context, *protocol.User) error
|
||||
|
||||
// RemoveUser removes an user by email.
|
||||
RemoveUser(context.Context, string) error
|
||||
}
|
||||
|
||||
type GetInbound interface {
|
||||
GetInbound() Inbound
|
||||
}
|
||||
|
||||
type GetOutbound interface {
|
||||
GetOutbound() Outbound
|
||||
}
|
||||
Reference in New Issue
Block a user