outline-apps icon indicating copy to clipboard operation
outline-apps copied to clipboard

Properly prioritize between multiple network adapters on Windows

Open xPROMSx opened this issue 3 years ago • 33 comments

Describe the bug Hello. I ran into a problem on windows 11. I use an outline client with one server and network on linux, iphone, ipad and have no problems. But if I connect to the server through windows 11 I get a long loading of sites. looks like a long dns server response. sometimes you have to wait more than 30 seconds before the site starts loading. however, if you use a different shadowsocks client, the problem disappears. I tried to reinstall all drivers and other manipulations to clean up the system. but nothing gives any result. page loading speed is slow only with the outline client. while speedtest shows normal speed.

To Reproduce Used window 11 with latest update

Expected behavior Fast loading sites like on Linux, iPhone or when using another shadowsocks client

Client System (please complete the following information):

  • Outline Client Version [1.7.0]
  • Outline Server Version [1.6.1]
  • Your Operating System: [Windows 11 Latest updates]

Submit Feedback 00049408

xPROMSx avatar Mar 30 '22 18:03 xPROMSx

Hi @xPROMSx , thanks for reporting the issue. Could you please double confirm the DNS server on your device using https://whatsmydnsserver.com/ ? Just wanna make sure that was the bottleneck of the performance issue here. Thanks.

jyyi1 avatar Apr 01 '22 18:04 jyyi1

@jyyi1 Hello. After many attempts, the results were: 1)172.70.241.31 2)172.70.241.31 3)2620:171:f8:f0::240 Country US

and dns

xPROMSx avatar Apr 02 '22 08:04 xPROMSx

Hello. I have same problem on Windows 10 too. Using the same outline server i have no issues on android and macOS. But on my windows 10 machines i have 5-10 seconds delay when loading any site for the first time. After that, if i open same site again, it opens without delay. But if i do "ipconfig /flushdns" and restart browser i have the delay again. So i presume there are some problem with dns using outline client.

dem000n avatar Apr 05 '22 10:04 dem000n

Thanks @xPROMSx and @dem000n for the information. While we are still investigating the root cause of this issue, would you please try to restart the machine to see whether the problem still exists? we are sorry for any inconvenience this may have caused you.

jyyi1 avatar Apr 08 '22 18:04 jyyi1

Thanks @jyyi1 for your work. Unfortunately, restarting the computer, reinstalling the application, reinstalling TAP driver and many other actions that I tried to do do not bring the expected result.

xPROMSx avatar Apr 09 '22 06:04 xPROMSx

Hello, @jyyi1 ! I run into the same problem as others described. It's been going for several months, but I don't remember, when it started - probably there were no delay earlier.

  • Outline version 1.6.0

  • Server OS: Ubuntu 20.04.4 LTS

  • Client OS: Windows 11 22000.739

  • DNS (from whatsmydnsserver dot com)

    US CLOUDFLARENET - Cloudflare, Inc. 141.101.66.130
    US CLOUDFLARENET - Cloudflare, Inc. 141.101.66.138
    US WOODYNET-1 - WoodyNet 66.185.123.251
    US WOODYNET-1 - WoodyNet 66.185.123.249
    US CLOUDFLARENET - Cloudflare, Inc. 108.162.228.206
    US WOODYNET-1 - WoodyNet 66.185.123.250
    US CLOUDFLARENET - Cloudflare, Inc. 2400:cb00:19:1024::6ca2:e4e8
  • Settings (shadowbox_config.json) PC connection port :30867, Android phone connection port:14053 Both uses encryptionMethod chacha20-ietf-poly1305 (A bit strange that the key for PC has empty name in configuration file but not in the windows manager app)

hekarroko avatar Jun 29 '22 10:06 hekarroko

I can provide more specific information (ex. iperf logs) also, by your request, if you need

hekarroko avatar Jun 29 '22 10:06 hekarroko

I got this issue on 2 pc's. The first one had this problem because of tunnel bear software network adapter. The second one had two adapters bridged in control panel (not outline-tap0). If I disable this bridge, outline starts resolving DNS just fine. Bug behaved exactly the same on both windows machines - outline works, ping and bandwidth are ideal, but "Resolve-DnsName -name google.com" in Powershell takes a lot of time.

Suckaballs avatar Jul 27 '22 15:07 Suckaballs

Any updates? How can we help to resolve this issue?

hekarroko avatar Aug 17 '22 22:08 hekarroko

Any updates? How can we help to resolve this issue?

Still waiting for the solutions. Connections on Windows 11 are still much slower than android until now.

chuchenting avatar Sep 25 '22 16:09 chuchenting

Hi @hekarroko @chuchenting , sorry about the late response but we are still not able to reproduce this problem. But I can provide more information, our tap device will hard code 1.1.1.1 as the DNS server, I am not sure whether changing that could help this issue (please notice that this DNS address might be reset to 1.1.1.1 during update):

image

jyyi1 avatar Sep 26 '22 21:09 jyyi1

As a workaround one may enable DoH for browser (Chrome, Firefox supported) or in Windows 11 Settings for only outline-tap0 interface. IMO when enabled in browser it's less laggy.

upanasiuk avatar Apr 18 '23 08:04 upanasiuk

I believe the Windows client does DNS over TCP, which may affect the performance. It would be great if you could run Wireshark to confirm that. The fix may be enabling DNS over UDP for Windows.

fortuna avatar May 01 '23 19:05 fortuna

I have the same issue - loading a website takes a long time, but reloading or loading it a bit later is fast. So it looks like as long as the DNS cache is used everything works fast.

Also, I found that the ping utility behaves the same:

  • The first run using a domain name hangs for several seconds before it starts printing replies
  • Subsequent runs start replying immediately
  • The first run after waiting for record's TTL is slow again

Pinging an IP address is always fast.

A capture of packets of the outline-tap0 interface using Wireshark shows the following:

  • A DNS request is sent to 1.1.1.1 immediately
  • After ~30ms a DNS request is sent to 9.9.9.9
  • After ~10ms a response for the first request is received
  • After ~50ms a response for the second request is received
  • Nothing happens for ~10s
  • ICMP requests and responses start appearing

When the VPN is diconnected the ping works fast.

@jyyi1 hope this'll help!


  • Windows 11 Pro 22H2
  • Outline 1.11.0 (468189)

regzon avatar Jul 20 '23 09:07 regzon

By the way, nslookup works fine.

regzon avatar Jul 20 '23 09:07 regzon

Update: I've tested Outline on two different PCs both with WIndows 11 installed - when Internet is connected via Ethernet the issue exists, when WiFi is used the VPN works fine.

PCs have different Ethernet adapters but they were connected to the same router. I'll test it with a different router later.

regzon avatar Jul 20 '23 10:07 regzon

I was able to fix this issue by setting the InterfaceMetric value for the Ethernet interface greater than it is for the outline-tap0 interface. I don't really know if it'll break something in the future. I hope Outline Client will do something like that automatically.


I've used the following command to list all interfaces along with their InterfaceMetric:

Get-NetIPInterface

And this command for setting a metric value:

Set-NetIPInterface -InterfaceIndex 20 -InterfaceMetric 45

20 is an index for my Ethernet interface, and 45 is a new value for the metric.

regzon avatar Jul 21 '23 22:07 regzon

Thanks @regzon for providing the detailed information. We will take a look at this configuration in the future.

jyyi1 avatar Jul 21 '23 22:07 jyyi1

Won’t this favor Ethernet over tun and leak traffic? If traffic is leaking, it will be faster.

On Fri, Jul 21, 2023 at 6:32 PM Andrey Volkov @.***> wrote:

I was able to fix this issue by setting the InterfaceMetric value for the Ethernet interface greater than it is for the outline-tap0 interface. I don't really know if it'll break something in the future. I hope Outline Client will do something like that automatically.

I've used the following command to list all interfaces along with their InterfaceMetric:

Get-NetIPInterface

And this command for setting a metric value:

Set-NetIPInterface -InterfaceIndex 20 -InterfaceMetric 45

20 is an index for my Ethernet interface, and 45 is a new value for the metric.

— Reply to this email directly, view it on GitHub https://github.com/Jigsaw-Code/outline-client/issues/1235#issuecomment-1646301296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA3XHOG3ESKNTEBCEJQN3TXRL7QZANCNFSM5SC2U7XQ . You are receiving this because you commented.Message ID: @.***>

fortuna avatar Jul 27 '23 18:07 fortuna

Hi, @fortuna. Greater metric means less priority. So in my case I'm explicitly telling Windows that the Ethernet interface is less prioritized than the VPN's one. Also, Wireshark shows that data flows through the VPN connection.

Probably, there's a conflict between two interfaces when the metric is not set explicitly (the metric is the same for both interfaces by default). And in this case there could be a data leak indeed. I'll check with Wireshark next week.

regzon avatar Jul 28 '23 20:07 regzon

I was able to fix this issue by setting the InterfaceMetric value for the Ethernet interface greater than it is for the outline-tap0 interface. I don't really know if it'll break something in the future. I hope Outline Client will do something like that automatically.

I've used the following command to list all interfaces along with their InterfaceMetric:

Get-NetIPInterface

And this command for setting a metric value:

Set-NetIPInterface -InterfaceIndex 20 -InterfaceMetric 45

20 is an index for my Ethernet interface, and 45 is a new value for the metric.

@regzon tyvm.

The same workaround without the console: qqq

comingAlive avatar Aug 07 '23 10:08 comingAlive

Thanks @regzon, @comingAlive, you helped me! Same problem on Windows 11.

specoff avatar Aug 11 '23 15:08 specoff

I confirm the problem on Windows 11. Method @regzon, @comingAlive works! Thanks.

garnatka avatar Sep 04 '23 07:09 garnatka

Thanks @regzon, @comingAlive, Fixed the same problem on Windows 10 too. This problem bothered me for a long time and now all the delays are gone. Very smooth now.

ShizumaruRiya avatar Sep 07 '23 16:09 ShizumaruRiya

@jyyi1 Is this a safe solution?

garnatka avatar Sep 09 '23 08:09 garnatka

I was able to fix this issue by setting the InterfaceMetric value for the Ethernet interface greater than it is for the outline-tap0 interface. I don't really know if it'll break something in the future. I hope Outline Client will do something like that automatically.

I've used the following command to list all interfaces along with their InterfaceMetric:

Get-NetIPInterface

And this command for setting a metric value:

Set-NetIPInterface -InterfaceIndex 20 -InterfaceMetric 45

20 is an index for my Ethernet interface, and 45 is a new value for the metric.

Ты гений, спасибо за решение.

dksr avatar Sep 11 '23 17:09 dksr

@jyyi1 Is this a safe solution?

Yes, the method provided by @regzon and @comingAlive is safe, please use it. Thanks.

jyyi1 avatar Sep 12 '23 19:09 jyyi1

Can confirm it works with Windows 10. But for me Interface Metric must be <25 to this method work. Proton VPN used value 5. I set 5 too and it works.

garanovich avatar Nov 01 '23 10:11 garanovich

I was able to fix this issue by setting the InterfaceMetric value for the Ethernet interface greater than it is for the outline-tap0 interface. I don't really know if it'll break something in the future. I hope Outline Client will do something like that automatically.

I've used the following command to list all interfaces along with their InterfaceMetric:

Get-NetIPInterface

And this command for setting a metric value:

Set-NetIPInterface -InterfaceIndex 20 -InterfaceMetric 45

20 is an index for my Ethernet interface, and 45 is a new value for the metric.

thanks

soshin1337 avatar Feb 14 '24 10:02 soshin1337

@jyyi1 it would be nice if it outline client fix it automatically

soshin1337 avatar Feb 14 '24 11:02 soshin1337