matrix-org / matrix-rust-sdk

Matrix Client-Server SDK for Rust
Apache License 2.0
1.22k stars 244 forks source link

Support home server resolution via DNS #2828

Closed gaykitty closed 1 month ago

gaykitty commented 11 months ago

As per the matrix spec, if resolving a user's home server via well-known fails, then the client should query for an SRV record associated with that hostname. The sdk does not appear to do this at present.

https://spec.matrix.org/latest/server-server-api/#resolving-server-names

darnuria commented 11 months ago

There is the Domain library from NLnet labs folks, can be used either with the built-in stub resolver or in a Sans-Io fashion. https://github.com/NLnetLabs/domain

There is also https://github.com/hickory-dns/hickory-dns (ex Trustdns) it's more feature-full and big.

Would recommend PoC-ing something with Domain. :)

richvdh commented 1 month ago

I think this is a misunderstanding. Matrix clients do not need to query for SRV records. The doc you have linked to is for the server-server API.