From ae1d6a2d1cdeca7f2d378d63eb1a033fc8fcefa7 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 12 Dec 2020 17:33:33 +0100 Subject: [PATCH] DebugInfoDialog: improve Tor status on Tails --- src/dialog/debuginfodialog.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/dialog/debuginfodialog.cpp b/src/dialog/debuginfodialog.cpp index d3b00a7..c784024 100644 --- a/src/dialog/debuginfodialog.cpp +++ b/src/dialog/debuginfodialog.cpp @@ -27,7 +27,15 @@ DebugInfoDialog::DebugInfoDialog(AppContext *ctx, QWidget *parent) void DebugInfoDialog::updateInfo() { QString torStatus; - if(m_ctx->isTorSocks) + + // Special case for Tails because we know the status of the daemon by polling tails-tor-has-bootstrapped.target + if(m_ctx->isTails) { + if(m_ctx->tor->torConnected) + torStatus = "Connected"; + else + torStatus = "Disconnected"; + } + else if(m_ctx->isTorSocks) torStatus = "Torsocks"; else if(m_ctx->tor->localTor) torStatus = "Local (assumed to be running)";