WofWca
November 6, 2025, 7:18am
2
See also Help testing upcoming Delta Chat release with calls 📞! - #47 by WofWca . Delta Chat is gonna include a default TURN server for non-Chatmail accounts, so most people don’t need to worry about this.
Delta Chat gets the TURN server string from the mail server’s IMAP metadata:
"/shared/vendor/deltachat/turn" => {
if let Some(value) = m.value {
match create_ice_servers_from_metadata(context, &value).await {
Ok((parsed_timestamp, parsed_ice_servers)) => {
ice_servers_expiration_timestamp = parsed_timestamp;
ice_servers = Some(parsed_ice_servers);
}
Err(err) => {
warn!(context, "Failed to parse TURN server metadata: {err:#}.");
}
}
}
}
If you’re running a custom non-Chatmail server, I think you can add this field manually, I think it can still be a static string. Just make the username a timestamp that is super far in the future.
Here is how it’s obtained in Chatmail:
async fn socket_loop(path: &Path, shared_secret: &str) -> Result<()> {
let listener = UnixListener::bind(path).context("Failed to bind Unix socket")?;
loop {
match listener.accept().await {
Ok((mut stream, _addr)) => {
let duration = Duration::from_secs(5 * 24 * 3600);
let (username, password) = generate_long_term_credentials(shared_secret, duration)?;
// Write credentials to stdout.
// Newline indicates the end of the answer
// and allows the client to tell if the answer
// was truncated if the server is restarted
// or crashed while writing the answer.
let res = format!("{username}:{password}\n");
stream.write_all(res.as_bytes()).await?;
}
Err(err) => {
eprintln!("Unix connection failed: {err}.");
}
}
This file has been truncated. show original