ruby-changes:58540
From: Justin <ko1@a...>
Date: Fri, 1 Nov 2019 18:47:05 +0900 (JST)
Subject: [ruby-changes:58540] 10c2a08548 (master): Clean up implementation of SOCKSSocket, its confusing and undocumented
https://git.ruby-lang.org/ruby.git/commit/?id=10c2a08548 From 10c2a085480eb8694750e55a613dbbe3eb22a999 Mon Sep 17 00:00:00 2001 From: Justin McNally <justin@c...> Date: Mon, 7 Oct 2019 22:12:17 -0500 Subject: Clean up implementation of SOCKSSocket, its confusing and undocumented diff --git a/ext/socket/sockssocket.c b/ext/socket/sockssocket.c index 81f77a6..82789ee 100644 --- a/ext/socket/sockssocket.c +++ b/ext/socket/sockssocket.c @@ -13,13 +13,19 @@ https://github.com/ruby/ruby/blob/trunk/ext/socket/sockssocket.c#L13 #ifdef SOCKS /* * call-seq: - * SOCKSSocket.new(host, serv) => socket + * SOCKSSocket.new(host, port) => socket * - * Opens a SOCKS connection to +host+ via the SOCKS server +serv+. + * Opens a SOCKS connection to +host+ via the SOCKS server. + * + * The SOCKS server configuration varies by implementation + * + * When using the Dante libsocks/libsocksd implementation it is configured as SOCKS_SERVER env var. + * + * See: https://manpages.debian.org/testing/dante-client/socksify.1.en.html for full env variable support. * */ static VALUE -socks_init(VALUE sock, VALUE host, VALUE serv) +socks_init(VALUE sock, VALUE host, VALUE port) { static int init = 0; @@ -28,7 +34,7 @@ socks_init(VALUE sock, VALUE host, VALUE serv) https://github.com/ruby/ruby/blob/trunk/ext/socket/sockssocket.c#L34 init = 1; } - return rsock_init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS); + return rsock_init_inetsock(sock, host, port, Qnil, Qnil, INET_SOCKS); } #ifdef SOCKS5 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/