Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profanity DNS threatment #822

Closed
mrkiko opened this issue Jul 7, 2016 · 7 comments
Closed

Profanity DNS threatment #822

mrkiko opened this issue Jul 7, 2016 · 7 comments

Comments

@mrkiko
Copy link

mrkiko commented Jul 7, 2016

When connecting to jabber.calyxinstitute.org over telnet for example, it
seems I can establish a session.
Profanity instead, will try to connect to the hidden .onion service
address of the server even if I am not connected over tor.
Probably an entry in /etc/hosts may solve the problem, still I think it
may be useful to report this problem.

From profanity logs:
07/07/2016 16:50:44: prof: INF: Starting Profanity (0.5.0dev.makepkg.3a3933e)...
07/07/2016 16:50:44: prof: INF: Initialising chat logs
07/07/2016 16:50:44: prof: INF: Initialising groupchat logs
07/07/2016 16:50:44: prof: INF: Loading accounts
07/07/2016 16:50:44: prof: INF: Initialising UI
07/07/2016 16:50:44: prof: INF: Initialising XMPP
07/07/2016 16:50:44: prof: INF: Loading capabilities cache
07/07/2016 16:50:44: prof: INF: Initialising commands
07/07/2016 16:50:44: prof: INF: Initialising contact list
07/07/2016 16:50:44: prof: INF: Loading TLS certificates
07/07/2016 16:50:44: prof: INF: Initialising OTR
07/07/2016 16:50:44: prof: DBG: GPG: Found gpgme version: 1.6.0
07/07/2016 16:50:44: prof: DBG: Env is GTK-ready: false
07/07/2016 16:50:44: prof: INF: Starting main event loop
07/07/2016 16:50:47: prof: DBG: Input received: /connect
07/07/2016 16:50:47: prof: INF: Connecting using account: ***
07/07/2016 16:50:47: prof: INF: Connecting as _/_
07/07/2016 16:50:47: xmpp: DBG: sock_connect() to .onion:5222 returned -1
07/07/2016 16:50:47: prof: INF: Connection attempt for ***
/
* failed
07/07/2016 16:50:53: prof: DBG: Input received: /quit
07/07/2016 16:50:53: prof: INF: Profanity is shutting down...

@mrkiko
Copy link
Author

mrkiko commented Jul 7, 2016

Turns out an entry in /etc/hosts isn't effective.
A smarter way probably, that worked for me was:
/account set my_account server

Now /connect succeeds.

@pasis
Copy link
Member

pasis commented Jul 7, 2016

Hi,
resolving process is performed in libstrophe by simply calling res_query(3). And as you see the function returns a record with an onion address. This is not a profanity or libstrophe issue. Please, check your name server configuration when you experience the problem.

@mrkiko
Copy link
Author

mrkiko commented Jul 8, 2016 via email

@pasis
Copy link
Member

pasis commented Jul 8, 2016

I tried to resolve your domain and got:

$ nslookup -type=SRV _xmpp-client._tcp.jabber.calyxinstitute.org
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
_xmpp-client._tcp.jabber.calyxinstitute.org     service = 4 0 5222 ijeeynrc6x2uy5ob.onion.
_xmpp-client._tcp.jabber.calyxinstitute.org     service = 5 1 5222 jabber.calyxinstitute.org.

I think a number after service = means priority. And according to RFC a client must connect to the address with the lowest priority first. The thing is that libstrophe doesn't try to connect to other addresses. I'll add the feature to the todo list for the next release.

P.S. You can ping and telnet to jabber.calyxinstitute.org because those programs query for type A record. XMPP clients need to query type SRV record and only then resolve the result into IP address.

@mrkiko
Copy link
Author

mrkiko commented Jul 9, 2016 via email

@pasis
Copy link
Member

pasis commented Aug 30, 2016

Fixed in libstrophe's master, thanks to @changeway for the patch.

@mrkiko
Copy link
Author

mrkiko commented Aug 31, 2016 via email

@mrkiko mrkiko closed this as completed Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants