Closed chris-martin closed 1 year ago
Thank you @chris-martin.
I'm not sure what's going on with the socks
-related byte swapping. I'm swapping things inside getServicePortNumber'
sometimes, and then in connectSockSOCKS5
again every time. It seems wrong. I'll review and change that.
Regarding the dependency on network-bsd
: I suppose we could ditch the dependency if we call the getservbyname
C function directly. It would be relatively straightforward. But, seeing as network-bsd
is a library depended upon by many popular Haskell packages (https://packdeps.haskellers.com/reverse/network-bsd), maybe it's best to just fix things there.
This is probably related to the byte swapping issue: https://github.com/haskell/network-bsd/blob/2167eca412fa488f7b2622fcd61af1238153dae7/Network/BSD.hsc#L183
I don't think this issue is relevant anymore. Closing.
I've been trying to update things to use the latest version of the
network
library, and unfortunatelynetwork-bsd
still does not support it. (https://github.com/haskell/network-bsd/issues/10) I'm not sure whether network-bsd is still being maintained?I would be able to sidestep this problem if
network-simple
could drop itsnetwork-bsd
dependency. I'm looking at the extent to which this package relies on that one, and it seems that it's a fairly small bit:https://github.com/k0001/network-simple/blob/678483e7c451b545dabe1a0354c476bdd8ba8de6/src/Network/Simple/Internal.hs#L82-L89
Since a few years have now elapsed since this workaround was added, is it possible that the socks5 library has resolved its issue? I don't quite understand what the issue is or how I'd find out.