mirror of
https://github.com/Elegycloud/clash-backup.git
synced 2024-12-23 02:07:24 +08:00
24 lines
295 B
Go
24 lines
295 B
Go
|
package constant
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
"net"
|
||
|
)
|
||
|
|
||
|
type ProxyAdapter interface {
|
||
|
ReadWriter() io.ReadWriter
|
||
|
Conn() net.Conn
|
||
|
Close()
|
||
|
}
|
||
|
|
||
|
type ServerAdapter interface {
|
||
|
Addr() *Addr
|
||
|
Connect(ProxyAdapter)
|
||
|
Close()
|
||
|
}
|
||
|
|
||
|
type Proxy interface {
|
||
|
Name() string
|
||
|
Generator(addr *Addr) (ProxyAdapter, error)
|
||
|
}
|