1
0
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:
Darien Raymond
2018-02-05 23:38:24 +01:00
parent 384844f898
commit 1e6d5561cc
20 changed files with 1097 additions and 33 deletions

View File

@@ -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
}