[Feature Request] Enable SOCKS support by default
MatzFan opened this issue · 3 comments
I'm the current maintainer of the socksify
Ruby gem. This gem was originally created to permit users of rubies to make SOCKS connections via net/http
and other libraries. The gem patches the private method Net::HTTP#connect
which of course is highly undesirable, as it is subject to change with each new Ruby release. This is all necessary because pre-built rubies do not have socks support enabled by default.
Is there any reason why pre-built rubies cannot have this support enabled by default? I understand that one needs to pass the --enable-socks=true
configuration option when compiling in order for the SOCKSSocket
class to be enabled.
Why the need? Well many Rubyists use SOCKS for various reasons (e.g to interact through SOCKS proxies like dante
or tor
). The socksify
gem has 57M downloads for the current version. Many other languages offer native support for the SOCKS protocol and if there is no downside I'd love to see the pre-built rubies used by the Ruby community do the same - say from version 3.4 onwards - so socksify
can be gracefully retired. \end pitch
Hi, the aim of this project is to be a lightweight wrapper around downloading a Ruby source code tarball, running ./configure
, running make
, and finally make install
. We try to not deviate from defaults in this process, including setting configuration flags, unless there is a strong reason to do so.
(Note that we do not provide "pre-built" rubies, but compile a Ruby version every time ruby-build
gets invoked.)
The only non-default configure flag we currently set is --enable-shared
#35. This is to help install some gems that need ruby to have a shared library. This was requested by multiple people after some frustration.
However, I haven't heard of --enable-socks
being a highly used or even requested feature. I'm not sure why this Ruby core feature is off by default, but I do not find sufficient evidence that this is a flag that we should turn on by default in ruby-build. That is why I'm deciding that this is a #wontfix. Thank you for explaining your perspective, though. We can refer to this thread if the issue of SOCKS comes up again.
Note that ruby-build users can opt into having SOCKS enabled in their ruby by doing ruby-build <version> /path/to/ruby -- --enable-socks=true
explicitly.