Torsocks issueshttps://gitlab.torproject.org/tpo/core/torsocks/-/issues2020-06-27T14:12:16Zhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8066usewithtor + irssi + ssl = "Socks version 22 not recognized"2020-06-27T14:12:16ZRoger Dingledineusewithtor + irssi + ssl = "Socks version 22 not recognized"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";
...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
```https://gitlab.torproject.org/tpo/core/torsocks/-/issues/8067Three harmless compiler warnings in 1.2 and 1.32020-06-27T14:12:16ZRoger DingledineThree harmless compiler warnings in 1.2 and 1.3```
torsocks.c: In function ‘torsocks_select_guts’:
torsocks.c:428:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
torsocks.c: In function ‘torsocks_poll_guts’:
torsocks.c:613:9: warning: variable ‘rc’ set but not ...```
torsocks.c: In function ‘torsocks_select_guts’:
torsocks.c:428:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
torsocks.c: In function ‘torsocks_poll_guts’:
torsocks.c:613:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
...
test_torsocks.c:144:14: warning: ‘txtquery’ defined but not used [-Wunused-function]
```
(on debian wheezy)Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8068Missing symbol namespacing2020-06-27T14:12:16ZDavid Gouletdgoulet@torproject.orgMissing symbol namespacingBy doing this command we can see a bunch of symbols that torsocks should *not* try to overload:
```
$ nm .libs/libtorsocks.so | grep " T "
```
Here is the list that I think should be hidden:
```
0000000000007190 T count_netmask_bits
0...By doing this command we can see a bunch of symbols that torsocks should *not* try to overload:
```
$ nm .libs/libtorsocks.so | grep " T "
```
Here is the list that I think should be hidden:
```
0000000000007190 T count_netmask_bits
0000000000009fa0 T find_socks_request
0000000000009320 T get_next_dead_address
00000000000095d0 T get_pool_entry
0000000000007050 T get_uint16
0000000000007060 T get_uint32
0000000000006a70 T getipnodebyname
0000000000009ff0 T handle_request
00000000000090e0 T init_pool
0000000000009300 T is_dead_address
0000000000007470 T is_local
0000000000009f30 T kill_socks_request
0000000000009e70 T new_socks_request
0000000000009950 T our_getaddrinfo
00000000000096a0 T our_gethostbyaddr
0000000000009860 T our_gethostbyname
0000000000009a40 T our_getipnodebyname
00000000000075d0 T pick_server
0000000000007d90 T read_config
0000000000007090 T resolve_ip
0000000000009350 T search_pool_for_name
0000000000007130 T set_log_options
0000000000007070 T set_uint16
0000000000007080 T set_uint32
00000000000071c0 T show_msg
00000000000093c0 T store_pool_entry
0000000000007700 T strsplit
```
These symbols should at least have a torsocks_* prefix or else they might clash with existing symbols linked to the binary called with torsocks altering its behavior which is real *BAD*.
The quickest way of fixing that would be to add the GCC hidden attribute to each function call or else try to make them static in the code base.
I've notice that with the "read_config" symbol that was overloaded in my software with the current git head (519d3be56348c3d965c286a7c04adce3dd556411).
Thanks!
DavidJacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8070Memory leaks on error in dead_pool.c2020-06-27T14:12:16ZDavid Gouletdgoulet@torproject.orgMemory leaks on error in dead_pool.cIn parse_socks5_resolve_ptr_response() (dead_pool.c +325), the **result_hostname is allocated then passed to recv(). On error (r < 0) or with an orderly shutdown (r = 0) the memory is not freed causing the memory leak.
Here is a small p...In parse_socks5_resolve_ptr_response() (dead_pool.c +325), the **result_hostname is allocated then passed to recv(). On error (r < 0) or with an orderly shutdown (r = 0) the memory is not freed causing the memory leak.
Here is a small patch fixing the leak.Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8137add option to allow connections to local addresses2020-06-27T14:12:16Zproperadd option to allow connections to local addresses> libtorsocks(11014): connect: Connection is to a local address (192.168.0.10), may be a TCP DNS request to a local DNS server so have to reject to be safe. Please report a bug to http://code.google.com/p/torsocks/issues/entry if this is...> libtorsocks(11014): connect: Connection is to a local address (192.168.0.10), may be a TCP DNS request to a local DNS server so have to reject to be safe. Please report a bug to http://code.google.com/p/torsocks/issues/entry if this is preventing a program from working properly with torsocks.
Please add an option to allow connections to local addresses. Tor doesn't always run on 127.0.0.1, sometimes it's run on a machine on local LAN. This is also the case for Whonix, which is a two machine approach, where Tor runs by design on another machine on local LAN.David Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.orghttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8272torsocks.c warning says to file bugs at code.google.com2020-06-27T14:12:15ZRoger Dingledinetorsocks.c warning says to file bugs at code.google.comhttps://gitweb.torproject.org/torsocks.git/blob/HEAD:/src/torsocks.c#l280 says
```
show_msg(MSGERR, "connect: Connection is to a local address (%s), may be a "
"TCP DNS request to a local DNS server so have...https://gitweb.torproject.org/torsocks.git/blob/HEAD:/src/torsocks.c#l280 says
```
show_msg(MSGERR, "connect: Connection is to a local address (%s), may be a "
"TCP DNS request to a local DNS server so have to reject to be safe. "
"Please report a bug to http://code.google.com/p/torsocks/issues/entry if "
"this is preventing a program from working properly with torsocks.\n", buf);
```
This is the wrong place to file torsocks bugs now, right?Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8316cvs via torsocks causes a segfault in libtorsocks.so2020-06-27T14:12:15Zintrigericvs via torsocks causes a segfault in libtorsocks.soTrying to run cvs via torsocks causes a segfault in libtorsocks.so.
Reproduced with Debian's torsocks 1.2-3 and 1.3-1 this way:
`torsocks cvs -d :pserver:anonymous@anonscm.debian.org:/cvs/webwml checkout webwml/english/doc`.
More infor...Trying to run cvs via torsocks causes a segfault in libtorsocks.so.
Reproduced with Debian's torsocks 1.2-3 and 1.3-1 this way:
`torsocks cvs -d :pserver:anonymous@anonscm.debian.org:/cvs/webwml checkout webwml/english/doc`.
More information, including a backtrace, can be found on the original bug report: http://bugs.debian.org/684580Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8495Please remove "Call to connect received on completed request 3"2020-06-27T14:12:14ZproperPlease remove "Call to connect received on completed request 3"Please get ride of "Call to connect received on completed request 3", perhaps only show it when TORSOCKS_DEBUG=1. (non-fatal error)
Debian Wheezy 32 bit.
(sudo apt-get install mixmaster)
```
root@host:~# export TORSOCKS_DEBUG=1
root@ho...Please get ride of "Call to connect received on completed request 3", perhaps only show it when TORSOCKS_DEBUG=1. (non-fatal error)
Debian Wheezy 32 bit.
(sudo apt-get install mixmaster)
```
root@host:~# export TORSOCKS_DEBUG=1
root@host:~# export TORSOCKS_CONF_FILE=/etc/torsocks.conf
root@host:~# torsocks /usr/bin/mixmaster-update
11:49:04 libtorsocks(21188): WARNING: The symbol getipnodebyname() was not found in any shared library with the reported error: Not Found!
Also, we failed to find the symbol __getipnodebyname() with the reported error: Not Found
11:49:04 libtorsocks(21189): WARNING: The symbol getipnodebyname() was not found in any shared library with the reported error: Not Found!
Also, we failed to find the symbol __getipnodebyname() with the reported error: Not Found
11:49:04 libtorsocks(21186): WARNING: The symbol getipnodebyname() was not found in any shared library with the reported error: Not Found!
Also, we failed to find the symbol __getipnodebyname() with the reported error: Not Found
11:49:04 libtorsocks(21186): Call to connect received on completed request 3
```
```
root@host:~# export TORSOCKS_DEBUG=0
root@host:~# torsocks /usr/bin/mixmaster-update
11:49:15 libtorsocks(21190): Call to connect received on completed request 3
```
```
# This is the configuration for libtorsocks (transparent socks) for use
# with tor, which is providing a socks server on port 9050 by default.
#
# Lines beginning with # and blank lines are ignored
#
# The basic idea is to specify:
# - Local subnets - Networks that can be accessed directly without
# assistance from a socks server
# - Paths - Paths are basically lists of networks and a socks server
# which can be used to reach these networks
# - Default server - A socks server which should be used to access
# networks for which no path is available
# Much more documentation than provided in these comments can be found in
# torsocks.conf(5) and usewithtor(1) manpages.
# We specify local as 127.0.0.0 - 127.191.255.255 because the
# Tor MAPADDRESS virtual IP range is the rest of net 127.
# Torsocks also treats as local all the subnets that Tor does.
#local = 127.0.0.0/255.128.0.0
#local = 127.128.0.0/255.192.0.0
#local = 169.254.0.0/255.255.0.0
#local = 172.16.0.0/255.240.0.0
#local = 192.168.0.0/255.255.0.0
# Default server
# For connections that aren't to the local subnets
# the server at 127.0.0.1 should be used (again, hostnames could be used
# too, see note above)
server = 192.168.0.10
# SOCKS server type defaults to 4
server_type = 5
# The port defaults to 1080 but I've stated it here for clarity
server_port = 9155
# Username and password (if required on a SOCKSv5 server)
#default_user =
#default_pass =
# Paths
# For this example this machine needs to access 150.0.0.0/255.255.0.0 as
# well as port 80 on the network 150.1.0.0/255.255.0.0 through
# the socks 5 server at 10.1.7.25 (if this machines hostname was
# "socks.hello.com" we could also specify that, unless --disable-hostnames
# was specified to ./configure).
#path {
# reaches = 150.0.0.0/255.255.0.0
# reaches = 150.1.0.0:80/255.255.0.0
# server = 10.1.7.25
# server_type = 5
# default_user = delius
# default_pass = hello
#}
#
```Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8585Figure out why weechat+ssl don't play nice with torsocks2020-06-27T14:12:14ZMatthew FinkelFigure out why weechat+ssl don't play nice with torsocksweechat is socks aware, but it should also be usable with torsocks. On initial testing, weechat's irc plugin closes its connections and attempts to continue the ssl handshake on newly established conns. This could be a misinterpretation,...weechat is socks aware, but it should also be usable with torsocks. On initial testing, weechat's irc plugin closes its connections and attempts to continue the ssl handshake on newly established conns. This could be a misinterpretation, though.
```
00:00:47 irc.oftc.net -- | irc: connecting to server irc.oftc.net/6697 (SSL)...
00:01:20 irc.oftc.net =!= | irc: TLS handshake failed
00:01:20 irc.oftc.net =!= | irc: error: The TLS connection was non-properly terminated.
00:01:20 irc.oftc.net -- | irc: reconnecting to server in 10 second
```
```
Mar 25 00:00:48.000 [debug] connection_ap_handshake_process_socks(): entered.
Mar 25 00:00:48.000 [debug] parse_socks(): socks5: checking request
Mar 25 00:00:48.000 [debug] parse_socks(): socks5: fqdn address type
Mar 25 00:00:48.000 [debug] connection_ap_handshake_rewrite_and_attach(): Client asked for irc.oftc.net:6697
...
Mar 25 00:00:49.600 [info] connection_ap_handshake_send_begin(): Sending relay cell 0 to begin stream 24137.
...
Mar 25 00:00:50.160 [debug] relay_lookup_conn(): found conn for stream 24137.
Mar 25 00:00:50.160 [debug] circuit_receive_relay_cell(): Sending to origin.
Mar 25 00:00:50.160 [debug] connection_edge_process_relay_cell(): Now seen 926 relay cells here (command 4, stream 24137).
Mar 25 00:00:50.160 [info] connection_edge_process_relay_cell_not_open(): 'connected' received after 1 seconds.
Mar 25 00:00:50.160 [info] addressmap_register(): Temporary addressmap ('irc.oftc.net' to '140.211.166.64') not performed, since it's already mapped to '50.197.126.29'
...
Mar 25 00:01:20.280 [debug] connection_or_process_cells_from_inbuf(): 12: starting, inbuf_datalen 512 (0 pending in tls object).
Mar 25 00:01:20.280 [debug] channel_queue_cell(): Directly handling incoming cell_t 0x38e973ff140 for channel 0x1e0c141140 (global ID 2)
Mar 25 00:01:20.280 [debug] circuit_get_by_circid_channel_impl(): circuit_get_by_circid_channel_impl() returning circuit 0x1e0c22fcd0 for circ_id 3495, channel ID 2 (0x1e0c141140)
Mar 25 00:01:20.280 [debug] relay_lookup_conn(): found conn for stream 24137.
Mar 25 00:01:20.280 [debug] circuit_receive_relay_cell(): Sending to origin.
Mar 25 00:01:20.280 [debug] connection_edge_process_relay_cell(): Now seen 929 relay cells here (command 3, stream 24137).
Mar 25 00:01:20.280 [info] connection_edge_process_relay_cell(): 13: end cell (closed normally) for stream 24137. Removing stream.
Mar 25 00:01:20.280 [debug] connection_or_process_cells_from_inbuf(): 12: starting, inbuf_datalen 0 (0 pending in tls object).
Mar 25 00:01:20.280 [debug] conn_close_if_marked(): Cleaning up connection (fd 13).
Mar 25 00:01:20.280 [debug] connection_remove(): removing socket 13 (type Socks), n_conns now 5
Mar 25 00:01:20.280 [debug] connection_free_(): closing fd 13.
...
Mar 25 00:01:30.560 [debug] connection_handle_listener_read(): Connection accepted on socket 13 (child of fd 6).
Mar 25 00:01:30.560 [debug] connection_add_impl(): new conn type Socks, socket 13, address 127.0.0.1, n_conns 5.
Mar 25 00:01:30.560 [debug] connection_ap_handshake_process_socks(): entered.
Mar 25 00:01:30.560 [debug] parse_socks(): socks5: accepted method 0 (no authentication)
Mar 25 00:01:30.560 [debug] connection_ap_handshake_process_socks(): socks handshake not all here yet.
Mar 25 00:01:30.560 [debug] connection_ap_handshake_process_socks(): entered.
Mar 25 00:01:30.560 [debug] connection_ap_handshake_process_socks(): socks handshake not all here yet.
Mar 25 00:01:30.560 [debug] connection_ap_handshake_process_socks(): entered.
Mar 25 00:01:30.560 [debug] parse_socks(): socks5: checking request
Mar 25 00:01:30.560 [debug] parse_socks(): socks5: fqdn address type
Mar 25 00:01:30.560 [debug] conn_write_callback(): socket 13 wants to write.
Mar 25 00:01:30.560 [debug] conn_read_callback(): socket 13 wants to read.
Mar 25 00:01:30.560 [debug] connection_ap_handshake_rewrite_and_attach(): Client asked for irc.oftc.net:6697
Mar 25 00:01:31.000 [debug] conn_write_callback(): socket 13 wants to write.
...
Mar 25 00:01:31.000 [info] connection_edge_process_relay_cell_not_open(): 'connected' received after 1 seconds.
Mar 25 00:01:31.000 [info] addressmap_register(): Temporary addressmap ('irc.oftc.net' to '140.211.166.64') not performed, since it's already mapped to '50.197.126.29'
...
Mar 25 00:01:31.000 [debug] conn_write_callback(): socket 13 wants to write.
Mar 25 00:01:33.440 [debug] conn_read_callback(): socket 13 wants to read.
Mar 25 00:01:33.440 [debug] read_to_chunk(): Encountered eof on fd 13
Mar 25 00:01:33.440 [info] connection_edge_reached_eof(): conn (fd 13) reached eof. Closing.
Mar 25 00:01:33.440 [debug] connection_edge_end(): Sending end on conn (fd 13).
Mar 25 00:01:33.440 [debug] append_cell_to_circuit_queue(): Made a circuit active.
Mar 25 00:01:33.440 [debug] channel_flush_from_first_active_circuit(): Made a circuit inactive.
Mar 25 00:01:33.440 [debug] conn_close_if_marked(): Cleaning up connection (fd 13).
Mar 25 00:01:33.440 [debug] connection_remove(): removing socket 13 (type Socks), n_conns now 5
Mar 25 00:01:33.440 [debug] connection_free_(): closing fd 13.
```
The tcpdump output is interesting too. Six of these sent less than a second apart without response from Tor before failing
```
0x0020: 8018 0156 fef2 0000 0101 080a 01ea d3d5 ...V............
0x0030: 01ea d3d4 1603 0000 c501 0000 c103 0351 ...............Q
0x0040: 4e50 49b3 f165 b434 0a72 0e07 dafe da5f NPI..e.4.r....._
0x0050: e0ab 06fb 1d07 c153 1cf4 7445 6c03 0700 .......S..tEl...
0x0060: 0050 c02b c009 c023 c02c c00a c024 c008 .P.+...#.,...$..
0x0070: c02f c013 c027 c030 c014 c012 009c 002f ./...'.0......./
0x0080: 003c 0035 003d 0041 0084 000a 0005 0004 .<.5.=.A........
0x0090: 009e 0033 0067 0039 006b 0045 0088 0016 ...3.g.9.k.E....
0x00a0: 00a2 0032 0040 0038 006a 0044 0087 0013 ...2.@.8.j.D....
0x00b0: 0066 0100 0048 0005 0005 0100 0000 00ff .f...H..........
0x00c0: 0100 0100 0023 0000 000a 000c 000a 0013 .....#..........
0x00d0: 0015 0017 0018 0019 000b 0002 0100 000d ................
0x00e0: 001c 001a 0401 0402 0403 0501 0503 0601 ................
0x00f0: 0603 0301 0302 0303 0201 0202 0203 ..............
```Matthew FinkelMatthew Finkelhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8597Catch res_n* functions on systems that support them2020-06-27T14:12:14ZMatthew FinkelCatch res_n* functions on systems that support themWe should overload the res_n* functions on systems that support them. Currently we catch res_query and it's family, but not the newer res_n* set. They've been around for a while now, there are likely programs that could be trying to perf...We should overload the res_n* functions on systems that support them. Currently we catch res_query and it's family, but not the newer res_n* set. They've been around for a while now, there are likely programs that could be trying to perform dns resolution using udp and failing.Matthew FinkelMatthew Finkelhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8659INSTALL references obsolete Makefile.cvs2020-06-27T14:12:14ZintrigeriINSTALL references obsolete Makefile.cvsIt was reported to Debian (http://bugs.debian.org/704861) that torsocks' INSTALL file refers to the non-existent Makefile.cvs file.It was reported to Debian (http://bugs.debian.org/704861) that torsocks' INSTALL file refers to the non-existent Makefile.cvs file.Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8744The show_msg() does not save correctly the errno value2020-06-27T14:12:13ZDavid Gouletdgoulet@torproject.orgThe show_msg() does not save correctly the errno valueThe "show_msg" function tries to save the errno of the caller but there
are multiple call sites ***before*** that can override the errno value.
This was actually the cause of some other bugs in the past, one being
https://trac.torprojec...The "show_msg" function tries to save the errno of the caller but there
are multiple call sites ***before*** that can override the errno value.
This was actually the cause of some other bugs in the past, one being
https://trac.torproject.org/projects/tor/ticket/8043.
I think the best way to deal with this issue is for the caller to make sure errno is saved. In some situations, we might NOT want this function to restore a previous errno so it should not set it.Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8745Add thread safe support with documentation2020-06-27T14:12:13ZDavid Gouletdgoulet@torproject.orgAdd thread safe support with documentationAt the moment, torsocks does not seems to be thread safe so this would be a nice feature to have but in the meantime, it should be documented for the user to understand the limitations.At the moment, torsocks does not seems to be thread safe so this would be a nice feature to have but in the meantime, it should be documented for the user to understand the limitations.Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/8754Remove mentions of code.google.com2020-06-27T14:12:13ZDavid Gouletdgoulet@torproject.orgRemove mentions of code.google.com./README
./src/torsocks.c
./test/expectedresults.txt./README
./src/torsocks.c
./test/expectedresults.txtJacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/9745libtorsocks symbol was not found2020-06-27T14:12:13ZTraclibtorsocks symbol was not foundWhile I am able to establish a connection, I and get the following message when using !`torify` or when I run !`torsocks wget google.com`.
```
$ torify ssh user@domain.com
16:01:03 libtorsocks(5407): The symbol res_query() was not found...While I am able to establish a connection, I and get the following message when using !`torify` or when I run !`torsocks wget google.com`.
```
$ torify ssh user@domain.com
16:01:03 libtorsocks(5407): The symbol res_query() was not found in any shared library. The error reported was: not found!
16:01:03 libtorsocks(5407): The symbol res_search() was not found in any shared library. The error reported was: not found!
16:01:03 libtorsocks(5407): The symbol res_send() was not found in any shared library. The error reported was: not found!
16:01:03 libtorsocks(5407): The symbol res_querydomain() was not found in any shared library. The error reported was: not found!
16:01:03 libtorsocks(5408): The symbol res_query() was not found in any shared library. The error reported was: not found!
16:01:03 libtorsocks(5408): The symbol res_search() was not found in any shared library. The error reported was: not found!
16:01:03 libtorsocks(5408): The symbol res_send() was not found in any shared library. The error reported was: not found!
16:01:03 libtorsocks(5408): The symbol res_querydomain() was not found in any shared library. The error reported was: not found!
user@domain.com's password:
```
```
$ torsocks wget google.com
15:59:02 libtorsocks(5392): The symbol res_query() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5392): The symbol res_search() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5392): The symbol res_send() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5392): The symbol res_querydomain() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5393): The symbol res_query() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5393): The symbol res_search() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5393): The symbol res_send() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5393): The symbol res_querydomain() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5390): The symbol res_query() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5390): The symbol res_search() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5390): The symbol res_send() was not found in any shared library. The error reported was: not found!
15:59:02 libtorsocks(5390): The symbol res_querydomain() was not found in any shared library. The error reported was: not found!
--2013-09-14 15:59:02-- http://google.com/
Resolving google.com (google.com)... 74.125.226.132
Connecting to google.com (google.com)|74.125.226.132|:80... connected.
HTTP request sent, awaiting response...
```
```
$ uname -a
Linux linuxServer 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 23:12:18 UTC 2013 i686 athlon i686 GNU/Linux
```
**Trac**:
**Username**: x000111Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/10119libtorsocks, torify, __res__query() (and a few others) symbol not found ERROR2020-06-27T14:12:13ZTraclibtorsocks, torify, __res__query() (and a few others) symbol not found ERRORRunning torify on anything I try results in a successful connection, but lots of warnings.
Input:
`torify curl icanhazip.com`
Results:
`17:29:06 libtorsocks(21277): WARNING: The symbol res_query() was not found in any shared library wi...Running torify on anything I try results in a successful connection, but lots of warnings.
Input:
`torify curl icanhazip.com`
Results:
`17:29:06 libtorsocks(21277): WARNING: The symbol res_query() was not found in any shared library with the reported error: Not Found!`
` Also, we failed to find the symbol __res_query() with the reported error: Not Found`
`17:29:06 libtorsocks(21277): WARNING: The symbol res_search() was not found in any shared library with the reported error: Not Found!`
` Also, we failed to find the symbol __res_search() with the reported error: Not Found`
`17:29:06 libtorsocks(21277): WARNING: The symbol res_send() was not found in any shared library with the reported error: Not Found!`
` Also, we failed to find the symbol __res_send() with the reported error: Not Found`
`17:29:06 libtorsocks(21277): WARNING: The symbol res_querydomain() was not found in any shared library with the reported error: Not Found!`
` Also, we failed to find the symbol __res_querydomain() with the reported error: Not Found`
`17:29:06 libtorsocks(21278): WARNING: The symbol res_query() was not found in any shared library with the reported error: Not Found!`
` Also, we failed to find the symbol __res_query() with the reported error: Not Found`
`17:29:06 libtorsocks(21278): WARNING: The symbol res_search() was not found in any shared library with the reported error: Not Found!`
` Also, we failed to find the symbol __res_search() with the reported error: Not Found`
`17:29:06 libtorsocks(21278): WARNING: The symbol res_send() was not found in any shared library with the reported error: Not Found!`
` Also, we failed to find the symbol __res_send() with the reported error: Not Found`
`17:29:06 libtorsocks(21278): WARNING: The symbol res_querydomain() was not found in any shared library with the reported error: Not Found!`
` Also, we failed to find the symbol __res_querydomain() with the reported error: Not Found`
`<expected output from curl here>`
It does this with `torify ssh` also, except the errors are spewed out twice.
I've tried to updating to the dev-release, hoping it would fix this but it didn't help. It has the same output.
**Trac**:
**Username**: cjwelbornDavid Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.orghttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/11090torsocks should log errors to stderr and not stdout2020-06-27T14:12:13ZXimin Luotorsocks should log errors to stderr and not stdouttorsocks 2.0.0-rc3
I get stuff like this on stdout:
```
[Feb 28 14:05:16] WARNING torsocks[22952]: Non TCP inet socket denied. Tor network can't handle it. (in tsocks_socket() at socket.c:40)
```
Logging to stdout interferes with the ...torsocks 2.0.0-rc3
I get stuff like this on stdout:
```
[Feb 28 14:05:16] WARNING torsocks[22952]: Non TCP inet socket denied. Tor network can't handle it. (in tsocks_socket() at socket.c:40)
```
Logging to stdout interferes with the output of the underlying program, and is generally a bad idea.David Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.orghttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/11205[PATCH] gethostbyname2 needs to be supported in addition to gethostbyname2020-06-27T14:12:13Zyurivict271[PATCH] gethostbyname2 needs to be supported in addition to gethostbynameRepost of the bug from the old bug repotring system: https://code.google.com/p/torsocks/issues/detail?id=60
On some systems, like FreeBSD, function gethostbyname2(3) is defined in addition to gethostbyname(3). Here is its signature:
...Repost of the bug from the old bug repotring system: https://code.google.com/p/torsocks/issues/detail?id=60
On some systems, like FreeBSD, function gethostbyname2(3) is defined in addition to gethostbyname(3). Here is its signature:
struct hostent *
gethostbyname2(const char *name, int af);
If the process uses gethostbyname2 instead of gethostbyname for the name resolution, it doesn't go through SOCKS5 and connection fails.
Need to support it.
Particularly, mplayer configures itself to use gethostbyname2 on FreeBSD, and therefore by default doesn't work with libtorsocks.
Implemented gethost by name in case of tcp v4, v6 is not yet implemented.
Tested with the streams played by mplayer. DNS resolution works fine.
torsocks-1.2_1Jacob AppelbaumJacob Appelbaumhttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/11456'make test' should run the tests2020-06-27T14:12:12ZRoger Dingledine'make test' should run the teststorsocks appears to have tests in its tests/ directory. There's even a tests/run.sh that, when I run it, gives me a cryptic statement about testlists, but no hint about where I can find a testlist. How do I run them?
And can we hook tha...torsocks appears to have tests in its tests/ directory. There's even a tests/run.sh that, when I run it, gives me a cryptic statement about testlists, but no hint about where I can find a testlist. How do I run them?
And can we hook that up to a 'make test' in the main directory?
Thanks!David Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.orghttps://gitlab.torproject.org/tpo/core/torsocks/-/issues/11541torsocks Does Not Work with dig on Fedora 202020-06-27T14:12:12ZTractorsocks Does Not Work with dig on Fedora 20I am trying to follow the nmap-ncat instructions here https://trac.torproject.org/projects/tor/wiki/doc/TorifyHOWTO/ssh for connecting to a tor hidden service over SSH. I can't seem to get it working. This is what I execute "torsocks d...I am trying to follow the nmap-ncat instructions here https://trac.torproject.org/projects/tor/wiki/doc/TorifyHOWTO/ssh for connecting to a tor hidden service over SSH. I can't seem to get it working. This is what I execute "torsocks dig @213.73.91.35 +tcp +short www.google.com" which returns ";; communications error to 213.73.91.35#53: end of file". When I execute "dig @213.73.91.35 +tcp +short www.google.com" without torsocks, IP addresses are returned. I have verified I am connected to tor via setting up my Firefox (not tor browser bundle) proxy settings and going to check.torproject.org.
I am on Fedora 20. I am using tor version tor.x86_64-0.2.4.21-tor.1.rh20 and torsocks version torsocks.x86_64-1.3-2.fc20. You can contact me at eviljoel@linux.com if you have any questions.
**Trac**:
**Username**: eviljoelDavid Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.org