2021-07-31 16:35:37 +00:00
|
|
|
package constant
|
|
|
|
|
2022-11-11 14:44:44 +00:00
|
|
|
import "net"
|
|
|
|
|
2021-07-31 16:35:37 +00:00
|
|
|
type Listener interface {
|
|
|
|
RawAddress() string
|
|
|
|
Address() string
|
|
|
|
Close() error
|
|
|
|
}
|
2022-11-11 14:44:44 +00:00
|
|
|
|
2022-12-05 02:12:53 +00:00
|
|
|
type MultiAddrListener interface {
|
2022-12-04 16:20:50 +00:00
|
|
|
Close() error
|
2022-11-11 14:44:44 +00:00
|
|
|
Config() string
|
2022-12-04 16:20:50 +00:00
|
|
|
AddrList() (addrList []net.Addr)
|
2022-11-11 14:44:44 +00:00
|
|
|
}
|
2022-12-04 05:37:14 +00:00
|
|
|
|
2022-12-04 13:53:13 +00:00
|
|
|
type InboundListener interface {
|
2022-12-04 05:37:14 +00:00
|
|
|
Name() string
|
2023-09-28 10:59:31 +00:00
|
|
|
Listen(tunnel Tunnel) error
|
2022-12-04 05:37:14 +00:00
|
|
|
Close() error
|
|
|
|
Address() string
|
|
|
|
RawAddress() string
|
2022-12-04 13:53:13 +00:00
|
|
|
Config() InboundConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type InboundConfig interface {
|
|
|
|
Name() string
|
|
|
|
Equal(config InboundConfig) bool
|
2022-12-04 05:37:14 +00:00
|
|
|
}
|