1
0
mirror of https://github.com/Elegycloud/clash-backup.git synced 2025-09-19 11:46:01 +08:00
Files
clash/constant/adapters.go

24 lines
295 B
Go
Raw Normal View History

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