Chore: improve outbound architecture

This commit is contained in:
Dreamacro
2018-12-22 23:56:42 +08:00
parent a7cfc81885
commit cb118d4371
13 changed files with 105 additions and 239 deletions

View File

@ -17,11 +17,6 @@ const (
Vmess
)
type ProxyAdapter interface {
Conn() net.Conn
Close()
}
type ServerAdapter interface {
Metadata() *Metadata
Close()
@ -30,7 +25,7 @@ type ServerAdapter interface {
type Proxy interface {
Name() string
Type() AdapterType
Generator(metadata *Metadata) (ProxyAdapter, error)
Generator(metadata *Metadata) (net.Conn, error)
MarshalJSON() ([]byte, error)
}