sparklemotion / mechanize

Mechanize is a ruby library that makes automated web interaction easy.

Home Page:https://www.rubydoc.info/gems/mechanize/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

socks proxy support?

MatzFan opened this issue · comments

I see that Mechanize doesn't currently support this from #422. Does this mean you would not consider adding this feature - even via a PR? For example, I have successfully used the simple monkey-patch in this Gist. It does add a dependency on the socksify gem, which you may not want of course.

I don't think we want a hard dependency on the socksify gem. We could incorporate this as require 'mechanize/socks_proxy' that would raise an exception saying "install socksify" if it wasn't installed.

Eminently sensible solution - would you like a PR to implement this?

I'm open to merging this functionality treating socksify as an optional dependency. However the patch at #507 does not work with recent net-http-persistent versions (see #535). If someone wants to provide an updated patch I'll take a look.

Closing this issue, but I would accept a PR for this functionality if it can be made to work with recent versions of net-http-persistent.