SOCKS Proxy: Is it working properly??

Technical discussion about the NMDC and <a href="http://dcpp.net/ADC.html">ADC</A> protocol. The NMDC protocol is documented in the <a href="http://dcpp.net/wiki/">Wiki</a>, so feel free to refer to it.

Moderator: Moderators

Locked
CarXor
Posts: 11
Joined: 2003-04-07 18:09

SOCKS Proxy: Is it working properly??

Post by CarXor » 2003-04-07 18:28

I, like many of dcpp users are behind a firewall or nat router and we do appreciate the development of socks proxy support. But is it working properly?? I believe not. I did not had the change to look at the code yet, although it has changed a lot since i last seen it, I suspect that it has at least a bug when dealing with that option.

The problem is that, when you are using a proxy, the dc client should act like it is in active mode, and that's not what is happening.

What I would like to know is if anybody is looking into this?

I'm really not willing to dig into the code right now, but if some of you are having the same problem, i'll give it a try :wink:

Cheers

CarXor
Posts: 11
Joined: 2003-04-07 18:09

Post by CarXor » 2003-04-07 20:02

ok, after a quick look at the code i've found the incorrect code: It is under client.cpp.

There are some lines like this:

Code: Select all

if(SETTING(CONNECTION_TYPE) == SettingsManager::CONNECTION_ACTIVE) {
   ...
} else {
   ...
}
that must be changed in order for the socks to work as it should, because socks are also like active...

Tomorrow I will try changing them and I'll post it here for comments..

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-04-07 21:59

Well, actually I think the SOCK5 support works the way it was designed to. If you only want it to proxy hub connections and not client to client connections, then there's been a suggestion for a quasi-active mode.

The changelog says:

Code: Select all

 -- 0.20 --
* Added socks5 support (more or less...no gssapi support), works like passive mode. M:5 means socks5 in the <++ tag.
  (No, I won't be adding socks4 as it doesn't support UDP forwarding)
If you want a quasi-active mode, check out the changes in BCDC++, I believe SOCKS5 proxying is treated the way you desire in it.

CarXor
Posts: 11
Joined: 2003-04-07 18:09

Post by CarXor » 2003-04-08 06:56

Well, I now see that the effort was to make the client-to-hub connection more easy for those behind firewalls, but the greatest improvement in using socks is, for me, to mimic an active connection in all aspects, removing that limitation of being unable to transfer files passive to passive.

To the client point of view, it is far more beneficial to work that way than to remove hub bandwidth.

Like I said, I will try to change that code (when I have some spare time) in order to make it work. I think it is of interest of the main release to allow every users behind firewalls to be able to download files from other users behind firewalls.

If you don't agree with me, or you thing that that is already being done, please tell me so that I won't work in vain 8)

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-04-08 07:06

Well, actually I think it's technically impossible, to accept incoming connections on the SOCKS5 server I think you need to know the incoming IP beforehand. I haven't read the SOCKS5 spec (RFC/ISO/whatever) yet, so that may not be true. It's worth looking into before you do any changes to the code.

CarXor
Posts: 11
Joined: 2003-04-07 18:09

Post by CarXor » 2003-04-08 14:30

oohh, but I have read the specs.. and I know it is possible because I already did it once with version 0.161. Yes, I implemented SOCKS4 and 5 in DC++ before (sorry for not posting, but back then dc++ had other problems that arne, I and some others were dealing with as you can see in the dc++ changelog:
-- 0.16 2002-03-15 --
* Fixed a resource leak that might have caused the sudden deaths (thanks carxor)
From then I just used my private build for my use until I stopped using it because of time.

DC++ evolved and I'm glad that socks is implemented. Now that I have some time, I can continue to contribute to the great comunity of dc++. For now, I just need socks to be fully working :)

Locked