[tor-bugs] #8066 [Torsocks]: usewithtor + irssi + ssl = "Socks version 22 not recognized"
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Jan 27 23:11:10 UTC 2013
#8066: usewithtor + irssi + ssl = "Socks version 22 not recognized"
----------------------+-----------------------------------------------------
Reporter: arma | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Torsocks | Version:
Keywords: | Parent:
Points: | Actualpoints:
----------------------+-----------------------------------------------------
Set up your ~/.irssi/config with
{{{
servers = (
{
address = "irc.oftc.net";
chatnet = "oftc";
#port = "6667";
port = "6697";
use_ssl = "yes";
# ssl_cert = "~/.irssi/certs/[NICK].pem";
# ssl_verify = "yes";
# ssl_cafile = "~/.irssi/certs/CAs.pem";
autoconnect = "yes";
}
);
}}}
and then run
{{{
usewithtor irssi
}}}
Your Tor client will log something like
{{{
Jan 27 17:43:52.000 [warn] Socks version 22 not recognized. (Tor is not an
http proxy.)
Jan 27 17:43:52.000 [warn] Fetching socks handshake failed. Closing.
}}}
and your irssi will complain with something like
{{{
18:06 -!- Irssi: Looking up irc.oftc.net
18:06 -!- Irssi: Connecting to irc.oftc.net [140.211.166.64] port 6697
18:06 -!- Irssi: warning SSL handshake failed: Connection reset by peer
18:06 -!- Irssi: Connection lost to irc.oftc.net
}}}
What's happening behind the scenes is that your irssi is attempting a
connect, getting an einprogress (presumably since it's non-blocking),
sending the ssl handshake right then, and then later torsocks tries to
inject the socks handshake. Oops.
{{{
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
fcntl(4, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
getsockopt(4, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
getpeername(4, 0x7fff04186010, [16]) = -1 ENOTCONN (Transport endpoint
is not connected)
connect(4, {sa_family=AF_INET, sin_port=htons(9050),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in
progress)
fstat(4, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
fcntl(4, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
...
write(4,
"\26\3\1\1;\1\0\0017\3\3Q\5\253\315\302\4\246F_\255\232\205\206h\24\345\351\310e'\r"...,
320) = 320
read(4, 0x19a9770, 7) = -1 EAGAIN (Resource temporarily
unavailable)
...
sendto(4, "\4\1\32)\0\0\0\1arma\0irc.oftc.net\0", 26, 0, NULL, 0) = 26
recvfrom(4, "", 8, 0, NULL, NULL) = 0
...
close(4) = 0
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8066>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list