Commit graph

148 commits

Author SHA1 Message Date
xmppftw
311e7406f0 Make Client and Component more unified, and connectors too 2024-08-10 16:57:49 +02:00
xmppftw
fde4c2b640 Move XmppCodec and XmppStream to proto module 2024-08-10 16:49:26 +02:00
xmppftw
ec3c7694a7 Moved starttls connector to tokio_xmpp::connect::starttls module 2024-08-10 16:49:26 +02:00
xmppftw
9151461b10 TCP connector is now in connect module 2024-08-10 16:49:26 +02:00
xmppftw
a3fbd77050 Remove tokio_xmpp::SimpleClient 2024-08-10 16:49:24 +02:00
xmppftw
97698b4d1e Add dns feature for DNS stuff (not just in starttls) 2024-08-10 16:48:47 +02:00
Emmanuel Gil Peyrot
27e4499153 xmpp-parsers: Simplify SASL mechanisms type
These can be a simple String for now.
2024-08-08 13:52:01 +00:00
xmppftw
2fc8e1c1dd AsyncClient::new reconnects by default, fixes disconnect logic 2024-08-08 15:33:17 +02:00
Emmanuel Gil Peyrot
35932268af tokio-xmpp: Error out when the stream:features couldn’t be parsed
This is nicer than sleeping forever with no debug info whatsoever.
2024-08-06 16:14:42 +02:00
xmppftw
fa99c09585 Indicate which feature flag for each module/type 2024-08-05 11:14:41 +02:00
xmppftw
b3fd0b5372 Move SimpleClient constructors to client::simple_client module 2024-08-04 21:32:38 +02:00
xmppftw
fc0071a0c5 Move AsyncClient::new to client::async_client module 2024-08-04 21:32:36 +02:00
xmppftw
84511b54a0 Only expose one error type in crate root 2024-08-04 18:17:17 +02:00
xmppftw
34796c90d4 Only expose one error type in crate root 2024-08-04 16:04:09 +00:00
xmppftw
5de1891f06 Merged starttls::ConnectorError into starttls::Error 2024-08-04 12:39:56 +00:00
xmppftw
b9fc15977b Replace tokio_xmpp::stream_features with parsers 2024-08-02 18:25:32 +00:00
xmppftw
ee3d86ec42 Remove tokio_xmpp::ParseError and tokio_xmpp::starttls::ParseError 2024-08-01 12:55:17 +00:00
1a452523bd
tokio-xmpp: Bump version to 4.0
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-28 01:00:01 +02:00
6995961d38 tokio-xmpp: Update ChangeLog
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-27 19:04:03 +02:00
5b1706a311
tokio-xmpp: Update dependencies
Update tokio_rustls, idna, webpki_roots.

https://github.com/rustls/rustls/releases/tag/v%2F0.22.0
> ConfigBuilder::with_safe_defaults - calls to this can simply be deleted since safe defaults are now implicit.
> OwnedTrustAnchor - use rustls_pki_types::TrustAnchor instead, and replace from_subject_spki_name_constraints with direct assignment to the struct fields.

`RootCertStore::add_trust_anchors` seems to be removed too.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-25 20:51:20 +02:00
Emmanuel Gil Peyrot
c0f1aa620e xmpp-parsers: Bump version to 0.21.0 2024-07-25 18:42:18 +02:00
11d40bac94 Unify version string formats
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements

"^1.2.3" is strictly equivalent to "1.2.3"

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-25 14:41:04 +00:00
Emmanuel Gil Peyrot
e9b226e1ae tokio-xmpp: Import Jid, BareJid and Element properly
xmpp-parsers has stopped reexporting them, instead it reexports only the
crates themselves.
2024-07-25 14:36:09 +00:00
Jonas Schäfer
25adde99da Bump rxml to 0.11.1 2024-07-24 16:05:05 +02:00
f35bbcb36d minidom: Bump version to 0.16
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 19:02:46 +02:00
86c13611ba Remove unused paths in multiple Cargo.toml
Paths are already patched in the workspace's [patch.crates-io] block.
Not sure why this was added in the first place.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 16:28:38 +00:00
a39a2330aa Revert "tokio-xmpp: rustfmt pass in examples"
Some checks are pending
Build / lint (push) Waiting to run
Build / test-stable (push) Blocked by required conditions
Build / test-nightly (push) Blocked by required conditions
This reverts commit 46fdd9cdfa.
2024-06-18 20:32:46 +02:00
46fdd9cdfa
tokio-xmpp: rustfmt pass in examples
Some checks are pending
Build / lint (push) Waiting to run
Build / test-stable (push) Blocked by required conditions
Build / test-nightly (push) Blocked by required conditions
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-06-18 20:21:23 +02:00
Jonas Schäfer
079379a178 Fix build with nightly rust
Nightly rust complains about `cfg(..)` tests against undeclared
features and other unknown cfgs. They need to be explicitly declared
now.

The nightly/stable features don't exist, so I removed them and
substitutes the currently correct number for the single test where they
were used.

The `xmpprs_doc_build` cfg flag is now declared as expectable.
2024-06-17 19:49:26 +00:00
Parker
eb0bc1b82f Changed name to XmppCodec 2024-06-15 13:02:15 -04:00
Parker
56dc1c6e60 Added XmppCodec usage example 2024-06-15 13:02:10 -04:00
Parker
6d449e9aaa Make XmppCodec public 2024-06-15 13:02:02 -04:00
Jonas Schäfer
84de007640 Update rxml to 0.11.0 2024-06-15 12:58:39 +02:00
Jonas Schäfer
2097b9685f Update rxml to 0.10.1
rxml 0.10.0 (and earlier) had a bug which caused it to reject valid XML
documents if an UTF-8 sequence straddled the token size boundary (8192
bytes by default) of a text event.
2024-06-08 07:29:57 +02:00
xmppftw
aabd19f78c State is disconnected, not invalid 2024-06-06 19:44:53 +00:00
xmppftw
034976748a Add serde feature for xmpp crate 2024-06-05 11:20:33 +02:00
Emmanuel Gil Peyrot
002c2803d4 Fix typos across the codebase (thanks codespell!) 2024-05-14 05:46:02 +00:00
Emmanuel Gil Peyrot
f725994fe0 Bump all dependencies but rustls and webpki-roots
The latter have changed their API a bit, while everything else is still
compatible.
2024-05-04 12:42:53 +02:00
Astro
6c3081d656 tokio-xmpp: let happy_eyeballs connect to records in parallel 2024-05-02 22:24:54 +02:00
Astro
598ffdbecf tokio-xmpp: set resolve ip_strategy to Ipv4AndIpv6
The happy_eyeballs implementation should try to connect on both address
families. The default of Ipv4thenIpv6 wouldn't query for AAAA if it got
A.
2024-05-02 22:24:54 +02:00
Jonas Schäfer
0298caf97a tokio-xmpp: allow docs build with --all-features
This affects only the docs and is quite an ugly hack, but seems to be
the only way for now.
2024-04-23 19:22:04 +02:00
Jonas Schäfer
b648b4668b Fix broken build with tls-native feature 2024-04-23 19:22:04 +02:00
Jonas Schäfer
fb63ac8e50 Update rxml to 0.10.0
See release notes [1] for details.

   [1]: https://codeberg.org/jssfr/rxml/releases/tag/v0.10.0
2024-03-16 17:39:55 +01:00
Jonas Schäfer
7fce1146e0 Offer {Resource,Node,Domain}Ref on Jid API
This provides a non-copying API, which is generally favourable. The
other accessors were removed, because the intent was to provide this
"most sensible" API via the "default" (i.e. shortest, most concisely
named) functions.
2024-03-10 10:51:01 +01:00
Emmanuel Gil Peyrot
1bab5c3cd9 Remove redundant imports
These became warnings in a recent nightly.

The TryFrom/TryInto imports were missed in
4089891f6c, but the rest are truly
redundant.
2024-02-27 22:57:18 +01:00
famfo
28ab91f46a Add Sync to ServerConnectError 2024-01-27 17:26:07 +00:00
famfo
060088be29 Implement function to get stream features 2024-01-23 16:09:07 +01:00
moparisthebest
019450ff4b
Add disabled-by-default insecure-tcp feature to tokio-xmpp for use by component connections 2024-01-03 19:34:03 -05:00
moparisthebest
733d005f51
DNS/TLS deps are now optional, component now also uses ServerConnector 2024-01-01 02:09:41 -05:00
moparisthebest
e784b15402
ServerConnector and AsyncClient support channel binding, SimpleClient uses ServerConnector 2024-01-01 02:08:40 -05:00