add mtls dialer

This commit is contained in:
ginuerzh
2021-12-17 11:02:39 +08:00
parent 965c6846dd
commit bfe5eae172
21 changed files with 457 additions and 57 deletions

View File

@ -31,7 +31,7 @@ func (c *Chain) GetRouteFor(network, address string) (r *Route) {
break
}
if node.transport.IsMultiplex() {
if node.transport.Multiplex() {
tr := node.transport.Copy().
WithRoute(r)
node = node.Copy().

View File

@ -75,9 +75,9 @@ func (tr *Transport) Bind(ctx context.Context, conn net.Conn, network, address s
return nil, connector.ErrBindUnsupported
}
func (tr *Transport) IsMultiplex() bool {
func (tr *Transport) Multiplex() bool {
if mux, ok := tr.dialer.(dialer.Multiplexer); ok {
return mux.IsMultiplex()
return mux.Multiplex()
}
return false
}