Skip to content

Commit

Permalink
dialers/rdial: m tls dialer api refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Nov 1, 2023
1 parent 47d79d4 commit e6bdb06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions intra/dialers/rdial.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func Dial(d *protect.RDial, network, addr string) (net.Conn, error) {
return commondial(d, network, addr, ipConnect)
}

func SplitDialWithTls(d *protect.RDial, cfg *tls.Config, network, addr string) (net.Conn, error) {
c, err := commondial(d, network, addr, splitIpConnect)
func SplitDialWithTls(d *protect.RDial, cfg *tls.Config, addr string) (net.Conn, error) {
c, err := commondial(d, "tcp", addr, splitIpConnect)
if err != nil {
return c, err
}
Expand Down
2 changes: 1 addition & 1 deletion intra/dns53/dot.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (t *dot) doQuery(pid string, q []byte) (response []byte, elapsed time.Durat
}

func (t *dot) tlsdial() (*dns.Conn, error) {
c, err := dialers.SplitDialWithTls(t.rd, t.c.TLSConfig, "tcp", t.addr)
c, err := dialers.SplitDialWithTls(t.rd, t.c.TLSConfig, t.addr)
// or: c, err := dialers.TlsDial(tlsDialer, "tcp", t.addr)
if c != nil {
c.SetDeadline(time.Now().Add(dottimeout))
Expand Down

0 comments on commit e6bdb06

Please sign in to comment.