-
-
Notifications
You must be signed in to change notification settings - Fork 113
feat: Use turn.delta.chat as fallback TURN server (#7382) #7482
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
base: main
Are you sure you want to change the base?
Conversation
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 |
It's a bug, if IMAP METADATA is not supported we should use the fallback server as well. |
142b866 to
4ebd5cc
Compare
Pushed a fix for this as well. |
There was a problem hiding this 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?
4ebd5cc to
43609bb
Compare
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. |
43609bb to
64b1044
Compare
| "mail.systemli.org", | ||
| vec![IpAddr::V4(Ipv4Addr::new(93, 190, 126, 36))], | ||
| ), | ||
| ( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
64b1044 to
8e6602c
Compare
Simon-Laux
left a comment
There was a problem hiding this 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.
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