Skip to content

Conversation

@iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Nov 20, 2025

Note that if the server doesn't support IMAP METADATA, the fallback TURN server isn't used. I didn't get why the code is written this way, i.e. create_fallback_ice_servers() is only called if the server supports METADATA, do we want to change this?

Looks working, tested with a nine profile and non-chatmail too.
For testing with the release DC Desktop apply 8f6ce74 also, otherwise the "Call" button isn't even shown.

Close #7382

@iequidoo iequidoo requested a review from r10s November 20, 2025 23:35
@r10s
Copy link
Contributor

r10s commented Nov 21, 2025

Note that if the server doesn't support IMAP METADATA, the fallback TURN server isn't used. I didn't get why the code is written this way, i.e. create_fallback_ice_servers() is only called if the server supports METADATA, do we want to change this?

i agree, this looks wrong.

IMAP METADATA is not supported by all server (iirc, e.g. it is not enabled by default dovecot installs) - and i do not see a good reason why core should not pass default TURN server to UI in that case. esp. as this will result in bad UX and bad debuggability, as we still cannot know a TURN server is returned in all cases.

the only reason that come to mind is that the code gets too complexity, and if IMAP METADATA is supported by >99% of servers - but i doubt both, cc @link2xt will have more insights

@link2xt
Copy link
Collaborator

link2xt commented Nov 21, 2025

do we want to change this?

It's a bug, if IMAP METADATA is not supported we should use the fallback server as well.

@iequidoo iequidoo force-pushed the iequidoo/fallback-turn-server branch from 142b866 to 4ebd5cc Compare November 22, 2025 09:38
@iequidoo
Copy link
Collaborator Author

It's a bug, if IMAP METADATA is not supported we should use the fallback server as well.

Pushed a fix for this as well.

Copy link
Contributor

@Simon-Laux Simon-Laux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this pr includes unrelated changes, namely it seems to revert #7285

maybe a mistake that happened during rebase? or sth. left over from development?

@iequidoo iequidoo force-pushed the iequidoo/fallback-turn-server branch from 4ebd5cc to 43609bb Compare November 22, 2025 19:31
@iequidoo
Copy link
Collaborator Author

iequidoo commented Nov 22, 2025

this pr includes unrelated changes, namely it seems to revert #7285

maybe a mistake that happened during rebase? or sth. left over from development?

Removed the reverting commit. I added it initially because w/o it one can't test this PR in the release version of DC Desktop, the "Call" button isn't even shown.

@iequidoo iequidoo requested a review from Simon-Laux November 22, 2025 19:35
@iequidoo iequidoo force-pushed the iequidoo/fallback-turn-server branch from 43609bb to 64b1044 Compare November 22, 2025 23:05
"mail.systemli.org",
vec![IpAddr::V4(Ipv4Addr::new(93, 190, 126, 36))],
),
(
Copy link
Collaborator Author

@iequidoo iequidoo Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, how was this code generated?
Also probably need to add more resolutions here, i just added what nslookup tells for me.
cc @link2xt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Íf it is generated then we should state where the generator for it is in a comment on top of the variable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At one point it was partially generated and manually checked, but generally it cannot be regenerated because some resolvers return different IPs, some servers respond to IPs that are no longer in DNS, IPv6 was added manually, chatmail relays not in the provider DB were added manually etc. It is not a big deal if it is outdated and some IPs don't work, it is used as a fallback and only with TLS. It's fine to update manually the entries that you want, maybe add some chatmail relays and so on, but generally it does not need maintenance.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not make sense to add TURN server here, it is resolved with let load_cache = false; because there is no TLS. This fallback cache is not trusted, only DNS should be used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Indeed, any cache shouldn't be trusted without TLS, at least because it may become outdated

@iequidoo iequidoo force-pushed the iequidoo/fallback-turn-server branch from 64b1044 to 8e6602c Compare November 24, 2025 07:07
Copy link
Contributor

@Simon-Laux Simon-Laux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but better wait for another review because I didn't took the time to fully understand it.

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

Successfully merging this pull request may close these issues.

use fallback TURN server

5 participants