Socks support in ws2_32

Damjan Jovanovic damjan.jov at gmail.com
Sat Jun 6 05:45:58 CDT 2009


On Fri, Jun 5, 2009 at 9:29 PM, Steven Edwards<winehacker at gmail.com> wrote:
> On Fri, Jun 5, 2009 at 9:40 AM, Gabriele Greco<gabrielegreco at gmail.com> wrote:
>> Hello guys, I'm lurking this list since a pair of weeks but I've not yet
>> posted here.
>> I've added socks 4/5 support right inside of ws2_32 library, I've tested it
>> with various applications and it works correctly both with sync and async
>> sockets (only TCP). The code works very well also with fairly intensive
>> network apps like "world of warcraft" :)
>> At the moment the support is activated by enviroment variables
>> (SOCKS_SERVER/SOCKS_PROTOCOL/SOCKS_USER/...) and the code is not very clean.
>> I've seen that wine patches are not accepted if not cleaned up, so I wanted
>> to ask if my effort can be of any interest for the official GIT or if I'll
>> have to mantain it for myself on my local GIT (I've written this patch
>> mostly for personal use since I need socks support to use certain services
>> cut down by the company firewall).
>> Obviously if there is any interest to see socks support inside wine I'll try
>> to clean up the patch and make it follow the specs that the
>> wine socks support is supposed to have (for instance configurability through winecfg for example).
>
> It sounds very useful. If there is not already a bug regarding socks,
> then I suggest filing one and posting the patch there as interested
> parties can comment and help point out bugs, design changes needed,
> etc. You can also send your patch here for review.

We have bugs 8686 and 18293 about SOCKS not working. The problem
AFAICT is the native LD_PRELOAD based socksification libraries (that
override socket functions like connect and accept to use SOCKS
transparently) will break on Wine, since they are based on the concept
of an immutable file descriptor. Wine continually dup()s sockets as
they are shuttled between the app and wineserver, so socket identities
change.



More information about the wine-devel mailing list