#1530 mod_onions doesn't resolve proxy's hostname

Reporter Carlos Mogas da Silva
Owner Nobody
Created
Updated
Stars ★★ (3)
Tags
  • Status-New
  • Component-Community
  • Priority-Medium
  • Type-Defect
  1. Carlos Mogas da Silva on

    What steps will reproduce the problem? 1. Load mod_onions 2. specify onions_socks5_host as a "domain", p.e. "tor_host" 3. Try to connect to some onion server What is the expected output? Connection should work without a problem What do you see instead? error Traceback[c2s]: .../lib/prosody/modules-community/mod_onions/mod_onions.lua:161: table index is nil stack traceback:, .../lib/prosody/modules-community/mod_onions/mod_onions.lua:161: in function 'register_outgoing', .../lib/prosody/modules-community/mod_onions/mod_onions.lua:190: in function 'connect_socks5', .../lib/prosody/modules-community/mod_onions/mod_onions.lua:259: in function '?', /usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>, (...tail calls...), /usr/lib/prosody/core/stanza_router.lua:206: in function 'core_route_stanza', /usr/lib/prosody/core/stanza_router.lua:184: in function 'core_post_stanza', /usr/lib/prosody/core/stanza_router.lua:127: in function 'core_process_stanza', /usr/lib/prosody/modules/mod_c2s.lua:275: in function 'func', /usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125> What version of the product are you using? On what operating system? 0.11.5 docker version Please provide any additional information below. I'm using docker swarm and the tor client itself is on another container where the IP address is always different, so the only way for this setup to work is for the host in onions_socks5_host to be "resolvable" and not expect an IP address there.

  2. Zash on

    Changes
    • tags Component-Community
  3. Casper on

    Same issue without proxy hostname. onions_socks5_host is the default value and I get the same traceback. Jan 07 19:32:02 c2s5577f0a00250 error Traceback[c2s]: /var/lib/prosody/custom_plugins/share/lua/5.4/mod_onions.lua:158: table index is nil stack traceback: /var/lib/prosody/custom_plugins/share/lua/5.4/mod_onions.lua:158: in field 'register_outgoing' /var/lib/prosody/custom_plugins/share/lua/5.4/mod_onions.lua:187: in upvalue 'connect_socks5' /var/lib/prosody/custom_plugins/share/lua/5.4/mod_onions.lua:256: in field '?' /usr/lib64/prosody/util/events.lua:81: in function </usr/lib64/prosody/util/events.lua:77> (...tail calls...) /usr/lib64/prosody/core/stanza_router.lua:214: in upvalue 'core_route_stanza' /usr/lib64/prosody/core/stanza_router.lua:192: in upvalue 'core_post_stanza' /usr/lib64/prosody/core/stanza_router.lua:128: in upvalue 'core_process_stanza' /usr/lib64/prosody/modules/mod_c2s.lua:326: in upvalue 'func' /usr/lib64/prosody/util/async.lua:144: in function </usr/lib64/prosody/util/async.lua:142>

  4. Martin on

    I don't get a traceback but I also can't s2s to onion servers: Jan 17 19:33:50 c2s55b2c2087e50 debug RECV: <iq id='UHf8LBZnjc8Qa0Uc243d673767b1fd71a2eca1940beb71b4c607208' to='4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion' xml:lang='en' type='get'><query xmlns='http://jabber.org/protocol/disco#info'/></iq> Jan 17 19:33:50 c2s55b2c2087e50 debug Received[c2s]: <iq id='UHf8LBZnjc8Qa0Uc243d673767b1fd71a2eca1940beb71b4c607208' to='4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion' type='get' xml:lang='en'> Jan 17 19:33:50 unbound.queryM_NFLt76Uh1K debug Resolve _xmpps-server._tcp.4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion IN SRV Jan 17 19:33:50 unbound.queryM_NFLt76Uh1K debug Results for _xmpps-server._tcp.4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion IN SRV: NXDomain (Insecure, 0.000543 sec) Jan 17 19:33:50 unbound.queryWveicKhzUoMR debug Resolve _xmpp-server._tcp.4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion IN SRV Jan 17 19:33:50 unbound.queryWveicKhzUoMR debug Results for _xmpp-server._tcp.4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion IN SRV: NXDomain (Insecure, 0.006975 sec) Jan 17 19:33:50 unbound.queryKJ0p4KJAgshV debug Resolve 4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion IN A Jan 17 19:33:50 unbound.queryH72RjuPwHrmC debug Resolve 4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion IN AAAA Jan 17 19:33:50 unbound.queryKJ0p4KJAgshV debug Results for 4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion IN A: NXDomain (Insecure, 0.000502 sec) Jan 17 19:33:50 unbound.queryH72RjuPwHrmC debug Results for 4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion IN AAAA: NXDomain (Insecure, 0.000386 sec) Jan 17 19:33:50 s2sout55b2c32ff1f0 debug s2s disconnected: mdosch.de->4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion (unable to resolve service) Jan 17 19:33:50 s2sout55b2c32ff1f0 debug Destroying outgoing session mdosch.de->4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion: unable to resolve service Jan 17 19:33:50 s2sout55b2c32ff1f0 info Sending error replies for 1 queued stanzas because of failed outgoing connection to 4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion Prosody trunk nightly build 1729 (2023-01-13, 8b06d7c73090) # Prosody directories Data directory: /var/lib/prosody Config directory: /etc/prosody Source directory: /usr/lib/prosody Plugin directories: /var/lib/prosody/custom_plugins /usr/lib/prosody/modules /var/lib/prosody/prosody-modules /usr/lib/prosody/modules/ # Operating system Linux 5.10.0-20-amd64 # Lua environment Lua version: Lua 5.4 Lua module search paths: /usr/local/share/lua/5.4/prosody/?.lua /usr/local/share/lua/5.4/?.lua /usr/local/share/lua/5.4/prosody/?/init.lua /usr/local/share/lua/5.4/?/init.lua /usr/local/lib/lua/5.4/prosody/?.lua /usr/local/lib/lua/5.4/?.lua /usr/local/lib/lua/5.4/prosody/?/init.lua /usr/local/lib/lua/5.4/?/init.lua /usr/share/lua/5.4/prosody/?.lua /usr/share/lua/5.4/?.lua /usr/share/lua/5.4/prosody/?/init.lua /usr/share/lua/5.4/?/init.lua ./prosody/?.lua ./?.lua ./prosody/?/init.lua ./?/init.lua /var/lib/prosody/custom_plugins/share/lua/5.4/?.lua /var/lib/prosody/custom_plugins/share/lua/5.4/?/init.lua Lua C module search paths: /usr/local/lib/lua/5.4/prosody/?.so /usr/local/lib/lua/5.4/?.so /usr/lib/x86_64-linux-gnu/lua/5.4/prosody/?.so /usr/lib/x86_64-linux-gnu/lua/5.4/?.so /usr/lib/lua/5.4/prosody/?.so /usr/lib/lua/5.4/?.so /usr/local/lib/lua/5.4/loadall.so ./prosody/?.so ./?.so LuaRocks: Not installed # Network Backend: epoll # Lua module versions LuaExpat: 1.3.0 LuaFileSystem: 1.8.0 LuaSec: 1.0.2 LuaSocket: 3.0-rc1 luaunbound: 0.5 (?) readline: 2.7 # library versions libcrypto: OpenSSL 1.1.1n 15 Mar 2022 libexpat: expat_2.2.10 libunbound: 1.13.1

New comment

Not published. Used for spam prevention and optional update notifications.