Skip to content

how to properly set proxy in WSL2 #5489

Closed

Description

@ahcheqiu

I have a proxy client running on windows which provides a socks5 proxy. This client has been set to listening 0.0.0.0:1080.
I want to use this proxy in WSL2 so I install proxychains4 and set the conf file as same as WSL1.
And I found it's not working but I found this article https://docs.microsoft.com/en-us/windows/wsl/compare-versions#accessing-windows-networking-apps-from-linux-host-ip
So I modify the conf file of proxychain to set host ip to nameserver value.
But still not working, output as below:
[proxychains] config file found: /etc/proxychains4.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.14
--2020-06-25 17:19:19-- https://www.google.com/
Resolving www.google.com (www.google.com)... 31.13.74.17, 216.239.32.10, 216.239.34.10, ...
Connecting to www.google.com (www.google.com)|31.13.74.17|:443... [proxychains] Strict chain ... 172.23.0.1:1080 ... timeout
failed: Connection refused.
Connecting to www.google.com (www.google.com)|216.239.32.10|:443... [proxychains] Strict chain ... 172.23.0.1:1080 ... timeout
failed: Connection refused.
Connecting to www.google.com (www.google.com)|216.239.34.10|:443... [proxychains] Strict chain ... 172.23.0.1:1080 ... timeout
failed: Connection refused.
Connecting to www.google.com (www.google.com)|216.239.36.10|:443... [proxychains] Strict chain ... 172.23.0.1:1080 ... timeout
failed: Connection refused.
Connecting to www.google.com (www.google.com)|216.239.38.10|:443... [proxychains] Strict chain ... 172.23.0.1:1080 ... timeout
failed: Connection refused.
Connecting to www.google.com (www.google.com)|216.239.32.10|:443... [proxychains] Strict chain ... 172.23.0.1:1080 ... timeout
failed: Connection refused.

I am pretty sure the proxy client is working as I can access the web by using 127.0.0.1:1080 in windows.

Activity

  1. therealkenc commented on Jun 25, 2020

    @therealkenc

    There is some discussion over in /dupe #4402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions