i2pd icon indicating copy to clipboard operation
i2pd copied to clipboard

SOCKS proxy didn't fetch response from upstream SOCKS proxy

Open r4sas opened this issue 4 years ago • 5 comments

07:16:20@683/debug - I2PService: SOCKS accepted
07:16:20@683/debug - SOCKS: async sock read
07:16:20@683/debug - SOCKS: received 3 bytes
07:16:20@683/debug - SOCKS: v5 choosing authentication method: 0
07:16:20@683/debug - SOCKS: async sock read
07:16:20@683/debug - SOCKS: received 17 bytes
07:16:20@683/info - SOCKS: requested github.com:443
07:16:20@683/info - SOCKS: forwarding to upstream
07:16:20@683/info - SOCKS: upstream proxy resolved
07:16:20@683/info - SOCKS: connected to upstream proxy
07:16:20@683/info - SOCKS: negotiating with upstream proxy
07:16:20@683/debug - SOCKS: async upstream sock read
07:16:29@683/error - SOCKS: upstream proxy failure: 84
07:16:29@683/warn - SOCKS: v5 request failed: 1
07:16:29@683/debug - SOCKS: closing socket
07:16:29@683/debug - SOCKS: closing upstream socket

r4sas avatar Aug 07 '21 07:08 r4sas

Problem in current upstream request code, which is negotiate only with SOCKS4 proxy: https://github.com/PurpleI2P/i2pd/blob/ba369d9b3064eaf01a4b9bf523fa680928e7cafa/libi2pd_client/SOCKS.cpp#L277-L283

Need to rewrite that part.

r4sas avatar Aug 07 '21 15:08 r4sas

Hi. I can not use outproxy inspite the fact that I enabled it since long time & it was working okay. Is this related to this issue or not? Do I have need to open an independent issue about "Failure of outproxy setting" or not?

Nokia808 avatar Nov 10 '22 07:11 Nokia808

Hi. I can not use outproxy inspite the fact that I enabled it since long time & it was working okay. Is this related to this issue or not? Do I have need to open an independent issue about "Failure of outproxy setting" or not?

Provide logs.

r4sas avatar Nov 10 '22 14:11 r4sas

similar problem: when try connect with quassel core:

[04/Jan/2023:23:06:00 +0300]@654/info - SOCKS: Requested <domain>
[04/Jan/2023:23:06:00 +0300]@654/info - SOCKS: Forwarding to upstream
[04/Jan/2023:23:06:00 +0300]@654/info - SOCKS: Upstream proxy resolved
[04/Jan/2023:23:06:00 +0300]@654/warn - SOCKS: Could not connect to upstream proxy: Connection refused

as R4SAS say, problem here (usage of incorrect port): 645 line in ClientContext.cpp auto tun = std::make_shared<i2p::proxy::SOCKSProxy>(name, address, port, !outproxy.empty(), outproxy, destinationPort, localDestination);

and another problem, with curl: curl -x socks4://127.0.0.1:4449 http://...

[04/Jan/2023:23:14:51 +0300]@654/error - SOCKS: Request with v4a rejected because it's actually SOCKS4
[04/Jan/2023:23:14:51 +0300]@654/warn - SOCKS: v4 request failed: 8

curl -x socks5://127.0.0.1:4449 http://...

[05/Jan/2023:00:31:30 +0300]@654/error - SOCKS: v5 unsupported address type: 1
[05/Jan/2023:00:31:30 +0300]@654/warn - SOCKS: v5 request failed: 8

wekoq avatar Jan 04 '23 21:01 wekoq

@majestrate @r4sas any plans to fix? Has been a couple years.

thanks

nahuhh avatar Apr 15 '23 19:04 nahuhh