• 2021/09/03 12:55:14 socat[1088517] E parseopts(): option "proxyauth" no

    From hongyi.zhao@gmail.com@21:1/5 to All on Thu Sep 2 22:41:29 2021
    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:123@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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hongyi.zhao@gmail.com@21:1/5 to hongy...@gmail.com on Thu Sep 2 22:45:28 2021
    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.


    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hongyi.zhao@gmail.com@21:1/5 to hongy...@gmail.com on Fri Sep 3 22:35:33 2021
    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

    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?

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to hongy...@gmail.com on Sat Sep 4 08:58:51 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hongyi.zhao@gmail.com@21:1/5 to Grant Taylor on Sat Sep 4 17:41:37 2021
    On Saturday, September 4, 2021 at 10:58:54 PM UTC+8, Grant Taylor wrote:
    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.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hongyi.zhao@gmail.com@21:1/5 to hongy...@gmail.com on Sat Sep 4 18:56:50 2021
    On Sunday, September 5, 2021 at 8:41:40 AM UTC+8, hongy...@gmail.com wrote:
    On Saturday, September 4, 2021 at 10:58:54 PM UTC+8, Grant Taylor wrote:
    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.
    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


    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)