Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can't connect the proxy server with auth. #11

Open
FisherMS opened this issue May 22, 2019 · 17 comments
Open

Can't connect the proxy server with auth. #11

FisherMS opened this issue May 22, 2019 · 17 comments
Labels
no-stale Skip for stales workflow

Comments

@FisherMS
Copy link

image

2019/05/22 08:30:37 [ERR] socks: Unsupported SOCKS version: [4],
2019/05/22 08:30:37 [ERR] socks: Failed to authenticate: No supported authentication mechanism,

@FisherMS FisherMS changed the title Can't connect the proxy server. Can't connect the proxy server with auth. May 22, 2019
@FisherMS
Copy link
Author

FisherMS commented May 22, 2019

When I don't use Auth and visits Youtube.com .

2019/05/22 08:49:09 Start listening proxy service on port 1080,
2019/05/22 08:49:33 [ERR] socks: Failed to get version byte: EOF,
2019/05/22 08:52:55 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:52136->172.217.0.14:443: read tcp 172.17.0.4:1080->101.231.126.26:50881: read: connection reset by peer,
2019/05/22 08:52:55 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:35718->172.217.4.46:443: read tcp 172.17.0.4:1080->101.231.126.26:50945: read: connection reset by peer,
2019/05/22 08:52:56 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:42962->172.217.4.238:443: read tcp 172.17.0.4:1080->101.231.126.26:51041: read: connection reset by peer,
2019/05/22 08:52:57 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:46006->172.217.8.174:443: read tcp 172.17.0.4:1080->101.231.126.26:51105: read: connection reset by peer,
2019/05/22 08:52:58 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:35732->172.217.4.46:443: read tcp 172.17.0.4:1080->101.231.126.26:51329: read: connection reset by peer,
2019/05/22 08:52:59 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:46010->172.217.8.174:443: read tcp 172.17.0.4:1080->101.231.126.26:51489: read: connection reset by peer,
2019/05/22 08:53:00 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:46012->172.217.8.174:443: read tcp 172.17.0.4:1080->101.231.126.26:51649: read: connection reset by peer,
2019/05/22 08:53:01 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:34160->172.217.9.46:443: read tcp 172.17.0.4:1080->101.231.126.26:51777: read: connection reset by peer,
2019/05/22 08:53:02 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:34162->172.217.9.46:443: read tcp 172.17.0.4:1080->101.231.126.26:51809: read: connection reset by peer,
2019/05/22 08:53:04 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:46018->172.217.8.174:443: read tcp 172.17.0.4:1080->101.231.126.26:51937: read: connection reset by peer,
2019/05/22 08:53:11 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:34168->172.217.9.46:443: read tcp 172.17.0.4:1080->101.231.126.26:52481: read: connection reset by peer,
2019/05/22 08:53:13 [ERR] socks: Failed to handle request: readfrom tcp 172.17.0.4:35748->172.217.4.46:443: read tcp 172.17.0.4:1080->101.231.126.26:53025: read: connection reset by peer,

@alarmic
Copy link

alarmic commented May 22, 2019

same question

@serjs serjs added the no-stale Skip for stales workflow label Feb 13, 2022
@keunes
Copy link

keunes commented Nov 9, 2022

Think I'm having the same issue: With auth, AntennaPod gives "authentication failed". (Without auth, it works fine.) Curl also gives an error:

$ curl --socks5 xxx.x.xx.xx:8888 -U keunes:password http://ifcfg.co
curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (4)

Now considering whether it's safe enough to run without auth on a non-default port. And if there's any way we can (help) debug this?

@serjs
Copy link
Owner

serjs commented Nov 10, 2022

@keunes Please provide server logs when you receive curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (4) error on client side. In addition, run curl with verbose logging.
Can't complete SOCKS5 connection to 0.0.0.0:0. (4) - mostly on server side, but what exactly is going on - I haven't details.

Also, try to run http://ifcfg.co from host, maybe there are some DNS or Time Sync issues where server can't handle you request

@keunes
Copy link

keunes commented Nov 10, 2022

Hi @serjs,

Many thanks. From my laptop:

keunes@keunes:~$ curl -v --socks5 xxx.x.xx.xx:8888 -U keunes:password http://ifcfg.co
* Rebuilt URL to: http://ifcfg.co/
*   Trying xxx.x.xx.xx...
* TCP_NODELAY set
* SOCKS5 communication to ifcfg.co:80
* SOCKS5 connect to IPv6 xxxx:xxxx:xxxx::xxxx:xxx (locally resolved)
* Can't complete SOCKS5 connection to 0.0.0.0:0. (4)
* Closing connection 0
curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (4)

On host:

pi@raspi:~ $ curl --socks5 xxx.x.xx.xx:8888 -U koenAP:1234 -v http://ifcfg.co
*   Trying xxx.x.xx.xx:8888...
* SOCKS5 connect to IPv6 xxxx:xxxx:xxxx::xxxx:xxx:xx (locally resolved)
* Can't complete SOCKS5 connection to ifcfg.co. (4)
* Closing connection 0
curl: (97) Can't complete SOCKS5 connection to ifcfg.co. (4)

pi@raspi:~ $ docker logs socks5
2022/11/10 17:35:01 Start listening proxy service on port 1080
2022/11/10 17:35:23 [ERR] socks: Failed to handle request: Connect to xxxx:xxxx:xxxx::xxxx:xxx:xx failed: dial tcp [xxxx:xxxx:xxxx::xxxx:xxx]:80: connect: cannot assign requested address
2022/11/10 17:43:33 [ERR] socks: Failed to handle request: Connect to xxxx:xxxx:xxxx::xxxx:xxx:xx failed: dial tcp [xxxx:xxxx:xxxx::xxxx:xxx]:80: connect: cannot assign requested address
2022/11/10 17:44:10 [ERR] socks: Failed to handle request: Connect to xxxx:xxxx:xxxx::xxxx:xxx:xx failed: dial tcp [xxxx:xxxx:xxxx::xxxx:xxx]:80: connect: cannot assign requested address

@DFlexy
Copy link

DFlexy commented Apr 20, 2023

Same problem here

image

@Drugoy
Copy link

Drugoy commented Apr 26, 2023

If you are using auth - then it's an issue with Chrome, that doesn't support auth with SOCKS5 proxies:
https://bugs.chromium.org/p/chromium/issues/detail?id=256785
(info found here)

@InstaZDLL
Copy link

InstaZDLL commented Jan 4, 2024

I have the same problem with the FoxyProxy extension when authentication is enabled, The only place this has worked is TorBrowser.
( No supported authentication mechanism )

Screenshot 2024-01-04 021740

@keunes
Copy link

keunes commented Jan 13, 2024

Hi @alexng353
Sorry to tag you here. I saw you replied on the other issue related to authentication and even prepared a PR. So I was wondering - does 'regular' authentication work for you? Any idea about the issue we're experiencing here?

@alexng353
Copy link

alexng353 commented Jan 13, 2024

does 'regular' authentication work for you?

Yeah, it works just fine for me. I've deployed the docker image with the following options:

docker run -d --name socks5 -p 1080:1080 -e PROXY_USER=MY_USERNAME -e PROXY_PASSWORD=MY_PASSWORD serjs/go-socks5-proxy

Running this test command yields a good download speed of roughly 300mbps on my shitty vps

curl --socks5-hostname MY_SERVER_CONNECT_URL -k -L https://bit.ly/1GB-testfile -o /dev/null

image

Two things are interesting and come to mind about this project.

  1. This repository is mostly dead
  2. The core dependency of this project https://github.com/armon/go-socks5, is also dead

It might be time to move on and create a new one-click deployable socks5 proxy written in golang, especially if this project is completely dead.

@alexng353
Copy link

On a somewhat related but also not related, do you guys just not care about leaking your/your server's IP addresses? I mean I know that you can't do that much with an IP address but generally, its bad practice to leak it.

@Drugoy
Copy link

Drugoy commented Jan 13, 2024

@alexng353 Do you know of an alternative project that provides a similar functionality (and preferably compiles into a single binary as well) that doesn't leak your IP? Please, let me know if you do.
We all have noticed that unfortunately this project was abandoned. :(

@alexng353
Copy link

that doesn't leak your IP?

Potentially you misunderstood my comment? What I meant was that some people were posting screenshots of their configuration/console with intact IP addresses unblurred. I do not currently have an alternative project that provides similar functionality but I am working on one and should be done in a few days

https://github.com/alexng353/ihostproxy

Self-hosted proxy written in golang, heavily inspired by this project. I don't know if it's going to be 10 million download material, but it will surely work.

@keunes
Copy link

keunes commented Jan 13, 2024

I also misunderstood the comment about leaking IP addresses @alexng353. Thanks for raising this issue.

I am working on one and should be done in a few days

Awesome that you're creating and sharing this. Will keep a look out on your progress.

@Drugoy
Copy link

Drugoy commented Jan 13, 2024

I thought you've found IP proxy client's IP leakage with this project, because some sites that I visited via this proxy detected me using a proxy (and I thought they could also had detected my client's IP) and refused services.

@alexng353
Copy link

and I thought they could also had detected my client's IP

To be honest I am not familiar enough with SOCKS5 or proxies in general to tell you whether or not they will be able to detect your client IP through this proxy.

@alexng353
Copy link

Will keep a look out on your progress.

The proxy part already works. I'm working on IP whitelisting for connections and FQDN support after I read about what fqdn is and how it gets used in this serjs's project

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
no-stale Skip for stales workflow
Projects
None yet
Development

No branches or pull requests

8 participants