Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

2021/09/03 12:55:14 socat[1088517] E parseopts(): option "proxyauth" not supported with this address type

90 views
Skip to first unread message

hongy...@gmail.com

unread,
Sep 3, 2021, 1:41:32 AM9/3/21
to
I've a socks5 proxy running on 127.0.0.1:1080 with username and passwd set to 123 and 123. Now I want to make another socks5 proxy on 127.0.0.1:1090 which uses the 127.0.0.1:1080 as its upstream. The test is as follows:

Running socat with the following command line options:

$ socat TCP4-LISTEN:1090,reuseaddr,fork \
TCP4:127.0.0.1:1080,proxyauth=123:123

Then check the above setting with curl:
$ curl -x socks5://123:1...@127.0.0.1:1090 www.baidu.com

But I meet the following error:

$ socat TCP4-LISTEN:1090,reuseaddr,fork TCP4:127.0.0.1:1080,proxyauth=123:123
2021/09/03 12:55:14 socat[1088517] E parseopts(): option "proxyauth" not supported with this address type

Any hints/suggestions for adapting the socat command line arguments to this specific scenario?

Regards,
HY

hongy...@gmail.com

unread,
Sep 3, 2021, 1:45:30 AM9/3/21
to
On Friday, September 3, 2021 at 1:41:32 PM UTC+8, hongy...@gmail.com wrote:
> I've a socks5 proxy running on 127.0.0.1:1080 with username and passwd set to 123 and 123. Now I want to make another socks5 proxy on 127.0.0.1:1090 which uses the 127.0.0.1:1080 as its upstream. The test is as follows:
>
> Running socat with the following command line options:
>
> $ socat TCP4-LISTEN:1090,reuseaddr,fork \
> TCP4:127.0.0.1:1080,proxyauth=123:123
>
> Then check the above setting with curl:
> $ curl -x socks5://123:1...@127.0.0.1:1090 www.baidu.com

Sorry, I was going to say the following:

$ curl -x socks5://127.0.0.1:1090 www.baidu.com
curl: (7) Unable to receive initial SOCKS5 response.

hongy...@gmail.com

unread,
Sep 4, 2021, 1:35:36 AM9/4/21
to
On Friday, September 3, 2021 at 1:41:32 PM UTC+8, hongy...@gmail.com wrote:
I finally get it to work by python-proxy [1] as follows:

$ microsocks -u 123 -P 123
$ pproxy -l socks5://:1090 -r socks5://127.0.0.1:1080#123:123

Test with the following commands:

$ curl -x socks5://127.0.0.1:1090 -L https://mirrors.tuna.tsinghua.edu.cn/debian-cd/11.0.0/amd64/iso-dvd/debian-11.0.0-amd64-DVD-1.iso -o /dev/null
$ curl -x socks5h://127.0.0.1:1090 -L https://mirrors.tuna.tsinghua.edu.cn/debian-cd/11.0.0/amd64/iso-dvd/debian-11.0.0-amd64-DVD-1.iso -o /dev/null

[1] https://github.com/qwj/python-proxy

Regards,
HY

Grant Taylor

unread,
Sep 4, 2021, 10:58:54 AM9/4/21
to
On 9/2/21 11:41 PM, hongy...@gmail.com wrote:
> I've a socks5 proxy running on 127.0.0.1:1080 with username and
> passwd set to 123 and 123. Now I want to make another socks5 proxy
> on 127.0.0.1:1090 which uses the 127.0.0.1:1080 as its upstream. The
> test is as follows:

I have done something like this in the past using Dante SOCKS proxy
server as a SOCKS application layer router. It had the ability to chain
proxies including adding authentication to different upstream proxies.

I remember looking at socat at the time and was not able to make it work.

I'm guessing that your problem with socat is realted tot he protocol
that it uses on the northbound / upstream connection.

The only references that I see to proxyauth in the socat man page are in
relation to the PROXY: address type. It also seems as if the PROXY:
address type is for talking to an HTTP proxy using the CONNECT verb,
which is incompatible with the upstream SOCKS proxy.



--
Grant. . . .
unix || die

hongy...@gmail.com

unread,
Sep 4, 2021, 8:41:40 PM9/4/21
to
Thank you for sharing your experience. Another similar tool for this purpose is proxychains-ng [1].
All these two tools need the conf file to work instead of the arguments supplied on the command line, which makes it inconvenient for some simple commang line testing scenarios, say, the question discussed here.

[1] https://github.com/rofl0r/proxychains-ng

Best, HY

hongy...@gmail.com

unread,
Sep 4, 2021, 9:56:53 PM9/4/21
to
Another tool that can do the job is 3proxy [1]:

/***
2. Proxy chaining and network connections
+ Username/password authentication for parent proxy(s).
+ HTTPS/SOCKS4/SOCKS5 and ip/port redirection parent support

4. Access control
+ User authentication by username / password
***/

[1] https://github.com/3proxy/3proxy

Best, HY
0 new messages