add direct dialer and connector

This commit is contained in:
ginuerzh
2022-09-08 22:41:04 +08:00
parent efd8838c18
commit 999707db19
5 changed files with 100 additions and 4 deletions

View File

@ -1,6 +1,8 @@
package parsing
import (
"time"
"github.com/go-gost/core/bypass"
"github.com/go-gost/core/chain"
"github.com/go-gost/core/connector"
@ -135,7 +137,8 @@ func ParseChain(cfg *config.ChainConfig) (chain.Chainer, error) {
WithDialer(d).
WithAddr(v.Addr).
WithInterface(v.Interface).
WithSockOpts(sockOpts)
WithSockOpts(sockOpts).
WithTimeout(10 * time.Second)
node := chain.NewNode(v.Name, v.Addr).
WithTransport(tr).