This commit is contained in:
vadym 2022-12-02 10:23:24 +02:00
parent a7afacb0df
commit 173e417c68

View file

@ -6,11 +6,11 @@ package core
import (
"context"
"fmt"
"net"
"net/url"
"net/netip"
"strings"
"github.com/getlantern/multipath"
"net"
"net/netip"
"net/url"
"strings"
"github.com/Arceliar/phony"
)
@ -46,7 +46,7 @@ func (l *linkMPATH) dial(url *url.URL, options linkOptions, sintf string) error
dial := &linkDial{
url: url,
sintf: sintf,
}
return l.handler(dial, url.String(), info, conn, options, false, false)
}
@ -121,7 +121,6 @@ func (l *linkMPATH) getAddr() *net.TCPAddr {
return addr
}
func (l *linkMPATH) connFor(url *url.URL, sinterfaces string) (net.Conn, error) {
//Peer url has following format: mpath://host-1:port-1/host-2:port-2.../host-n:port-n
hosts := strings.Split(url.String(), "/")[2:]