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

Direct TLS #642

Merged
merged 23 commits into from
Jul 30, 2024
Merged

Direct TLS #642

merged 23 commits into from
Jul 30, 2024

Conversation

lnjX
Copy link
Member

@lnjX lnjX commented Jul 24, 2024

Implements direct TLS connections and XEP-0368: SRV records for XMPP over TLS.

PR check list:

  • Document your code
  • Add \since QXmpp 1.X, QXMPP_EXPORT
  • Update doc/doap.xml

Funded by NLnet via NGI Assure.

@lnjX lnjX marked this pull request as draft July 24, 2024 22:02
@lnjX lnjX marked this pull request as ready for review July 29, 2024 13:56
lnjX added 23 commits July 30, 2024 17:39
QXmppStream is going to be dropped in favour of using small components
like XmppSocket directly and avoiding complicated inheritance relations.
This will be useful for managing addresses of different connection
types.
Do not use normal xmpp-client SRV records for connecting with direct
TLS.
The issue was that with direct TLS started() would be emitted twice
(on connect and on encryption). The solution is to make XmppSocket aware
of the connection type (TLS or TCP) and only emit started() in on
connect if the connection type is TCP.
Both record types are looked up now and direct TLS is preferred as it
saves one round trip and works better with firewalls.
This is needed so that TLS protocol multiplexers work correctly and a
single port can be used for XMPP, HTTPS and possibly other protocols.
@lnjX lnjX merged commit 88e50a0 into qxmpp-project:master Jul 30, 2024
10 of 15 checks passed
@lnjX lnjX deleted the feature/direct-tls branch July 30, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant