ilteoood / docker-surfshark

Docker container with OpenVPN client preconfigured for SurfShark
MIT License
137 stars 34 forks source link

Unable to use socks5 port in my system #85

Closed bsudhir6 closed 9 months ago

bsudhir6 commented 9 months ago

Hello I have started docker containers using same content as the yaml file provided. updated with Surfshark credentials and the test container working fine as well. but when I used this in my RSS Program to download specific feeds it is failing.

I did not make any changes to the default yaml file except my credentials and other values and the test container succeeds with new VPN location as expected but within my windows system it is not working as expected.

see attached

https://github.com/ilteoood/docker-surfshark/assets/2923168/2a105048-4625-4f80-a9eb-b2df6caff0ba

the network proxy I am using was localhost 1080 - socks5 protocol. but its not able to use it and download the feeds I am trying...

ilteoood commented 9 months ago

Try to follow what discussed in issue #82

bsudhir6 commented 9 months ago

Did the same

C:\Users\SUDHIR>curl -s -v --socks5 127.0.0.1:1080 https://torrentgalaxy.to/rss
*   Trying 127.0.0.1:1080...
* Connected to 127.0.0.1 (127.0.0.1) port 1080
* SOCKS5 connect to 13.127.247.216:443 (locally resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 1080
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* schannel: failed to receive handshake, SSL/TLS connection failed
* Closing connection
* schannel: shutting down SSL/TLS connection with torrentgalaxy.to port 443
C:\Users\SUDHIR>curl -s -v --socks5 127.0.0.1:1080 https://yts.mx/rss-guide
*   Trying 127.0.0.1:1080...
* Connected to 127.0.0.1 (127.0.0.1) port 1080
* SOCKS5 connect to 13.127.247.216:443 (locally resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 1080
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* schannel: failed to receive handshake, SSL/TLS connection failed
* Closing connection
* schannel: shutting down SSL/TLS connection with yts.mx port 443
ilteoood commented 9 months ago

Using that IP depends on your local network, are can you paste the output of ifconfig?

bsudhir6 commented 9 months ago

Using that IP depends on your local network, are can you paste the output of ifconfig?

C:\Users\SUDHIR>ipconfig

Windows IP Configuration

Ethernet adapter Ethernet:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . :

Ethernet adapter vEthernet (WSL):

Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::3b2c:797f:f3e5:2b6%47 IPv4 Address. . . . . . . . . . . : 172.27.112.1 Subnet Mask . . . . . . . . . . . : 255.255.240.0 Default Gateway . . . . . . . . . :

Wireless LAN adapter Local Area Connection* 1:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 2:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . :

Ethernet adapter Ethernet 2:

Connection-specific DNS Suffix . : IPv6 Address. . . . . . . . . . . : 2401:4900:1cb0:5c9b:fb28:4e78:cc34:9649 Temporary IPv6 Address. . . . . . : 2401:4900:1cb0:5c9b:4199:bc21:fad5:67ad Link-local IPv6 Address . . . . . : fe80::4233:6f12:36b4:96e3%10 IPv4 Address. . . . . . . . . . . : 192.168.1.12 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : fe80::1%10 192.168.1.1

Wireless LAN adapter Wi-Fi:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . :

Ethernet adapter Bluetooth Network Connection:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . :

ilteoood commented 9 months ago

You said that, from the yaml file, you changed just the credentials. But that should give you an error. Windows doesn't have the tun device, so you should not be able to create the container without doing other changes. Are you running it through wsl?

bsudhir6 commented 9 months ago

You said that, from the yaml file, you changed just the credentials. But that should give you an error. Windows doesn't have the tun device, so you should not be able to create the container without doing other changes. Are you running it through wsl?

Yes correct. normal Docker Desktop

ilteoood commented 9 months ago

The IP address of wls seems to be 172.27.112.1, so I guess it'll never work.

It would be better to use it without wsl. Just remove the share of the tun device and use the dedicate end variable to create it inside the container.

bsudhir6 commented 9 months ago

The IP address of wls seems to be 172.27.112.1, so I guess it'll never work.

It would be better to use it without wsl. Just remove the share of the tun device and use the dedicate end variable to create it inside the container.

Still no luck:

C:\Users\SUDHIR>curl -s -v --socks5 172.27.112.1:1080 https://torrentgalaxy.to/rss

C:\Users\SUDHIR>curl -s -v --socks5 172.24.0.2:1080 https://torrentgalaxy.to/rss

could you tell me how to use without wsl? for docker wsl is must right? and also how to remove the share of tun device any specific lines to delete?

ilteoood commented 9 months ago

I'm sorry but I provide support just for this image. What you are asking for goes beyond this and is related to missing knowledge about Docker.

Closing.

bsudhir6 commented 9 months ago

Okay thank you for checking

bsudhir6 commented 9 months ago

Great work by the way... I was trying to get this worked for a long time finally found your solution.