Commit f01e92dd authored by Yawning Angel's avatar Yawning Angel
Browse files

fixup! transports/meeklite: uTLS for ClientHello camouflage

Fix `getDialTLSAddr` to always return a integer port.  Thanks to dcf for
reporting the issue.
parent 5d41c674
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import (
	"net"
	"net/http"
	"net/url"
	"strconv"
	"strings"
	"sync"

@@ -164,8 +165,9 @@ func getDialTLSAddr(u *url.URL) string {
	if err == nil {
		return net.JoinHostPort(host, port)
	}
	pInt, _ := net.LookupPort("tcp", u.Scheme)

	return net.JoinHostPort(u.Host, u.Scheme)
	return net.JoinHostPort(u.Host, strconv.Itoa(pInt))
}

func newRoundTripper(dialFn base.DialFunc, clientHelloID *utls.ClientHelloID) http.RoundTripper {