2018-06-10 22:50:03 +08:00
|
|
|
package constant
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
2018-06-14 01:00:58 +08:00
|
|
|
"net"
|
2018-06-10 22:50:03 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type ProxyAdapter interface {
|
2018-06-14 01:00:58 +08:00
|
|
|
ReadWriter() io.ReadWriter
|
|
|
|
Conn() net.Conn
|
2018-06-10 22:50:03 +08:00
|
|
|
Close()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ServerAdapter interface {
|
|
|
|
Addr() *Addr
|
2018-06-14 01:00:58 +08:00
|
|
|
Connect(ProxyAdapter)
|
|
|
|
Close()
|
2018-06-10 22:50:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type Proxy interface {
|
|
|
|
Generator(addr *Addr) (ProxyAdapter, error)
|
|
|
|
}
|