initial commit
This commit is contained in:
18
connector/connector.go
Normal file
18
connector/connector.go
Normal file
@ -0,0 +1,18 @@
|
||||
package connector
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
|
||||
"github.com/go-gost/core/metadata"
|
||||
)
|
||||
|
||||
// Connector is responsible for connecting to the destination address.
|
||||
type Connector interface {
|
||||
Init(metadata.Metadata) error
|
||||
Connect(ctx context.Context, conn net.Conn, network, address string, opts ...ConnectOption) (net.Conn, error)
|
||||
}
|
||||
|
||||
type Handshaker interface {
|
||||
Handshake(ctx context.Context, conn net.Conn) (net.Conn, error)
|
||||
}
|
Reference in New Issue
Block a user