aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorJustin McNally <justin@chowlyinc.com>2019-10-07 22:12:17 -0500
committerKazuhiro NISHIYAMA <znz@users.noreply.github.com>2019-11-01 18:40:24 +0900
commit10c2a085480eb8694750e55a613dbbe3eb22a999 (patch)
tree1950baf98d491914101c3cfdb734f6723ea7eeda /ext
parent68e0bfcd4a7add4140832f156a11f5aa3fbca41d (diff)
downloadruby-10c2a085480eb8694750e55a613dbbe3eb22a999.tar.gz
Clean up implementation of SOCKSSocket, its confusing and undocumented
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/sockssocket.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/socket/sockssocket.c b/ext/socket/sockssocket.c
index 81f77a67c5..82789eeaab 100644
--- a/ext/socket/sockssocket.c
+++ b/ext/socket/sockssocket.c
@@ -13,13 +13,19 @@
#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)
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