Skip to content

Commit 67d94d7

Browse files
committed
Fixed Edge issue
1 parent edca8e6 commit 67d94d7

File tree

1 file changed

+5
-2
lines changed
  • src/github.com/getlantern/flashlight/client

1 file changed

+5
-2
lines changed

src/github.com/getlantern/flashlight/client/client.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func (client *Client) proxiedDialer(orig func(network, addr string) (net.Conn, e
217217

218218
func (client *Client) dialCONNECT(addr string, port int) (net.Conn, error) {
219219
// Establish outbound connection
220-
if client.shouldSendToProxy(port) {
220+
if client.shouldSendToProxy(addr, port) {
221221
log.Tracef("Proxying CONNECT request for %v", addr)
222222
d := client.proxiedDialer(func(network, addr string) (net.Conn, error) {
223223
// UGLY HACK ALERT! In this case, we know we need to send a CONNECT request
@@ -235,7 +235,10 @@ func (client *Client) dialCONNECT(addr string, port int) (net.Conn, error) {
235235
return dialDirect("tcp", addr, 1*time.Minute)
236236
}
237237

238-
func (client *Client) shouldSendToProxy(port int) bool {
238+
func (client *Client) shouldSendToProxy(addr string, port int) bool {
239+
if isLanternSpecialDomain(addr) {
240+
return true
241+
}
239242
for _, proxiedPort := range client.cfg().ProxiedCONNECTPorts {
240243
if port == proxiedPort {
241244
return true

0 commit comments

Comments
 (0)