add tls and ws listener

This commit is contained in:
ginuerzh
2021-03-31 23:24:51 +08:00
parent b74e4cc8a4
commit 4e04e7ed86
18 changed files with 518 additions and 42 deletions

20
client/dialer/dialer.go Normal file
View File

@ -0,0 +1,20 @@
package dialer
import (
"context"
"net"
)
// Dialer dials to target server.
type Dialer interface {
Init(md Metadata) error
Dial(ctx context.Context, addr string) (net.Conn, error)
}
type Handshaker interface {
Handshake(ctx context.Context, conn net.Conn) (net.Conn, error)
}
type Multiplexer interface {
Multiplexed() bool
}