mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
23 lines
280 B
Go
23 lines
280 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 {
|
|
Generator(addr *Addr) (ProxyAdapter, error)
|
|
}
|