Commit 25f42d8d authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Show when a query was resolved with cache/dns rules

parent c093b2ba
Pipeline #5105 passed with stages
in 1 minute and 9 seconds
......@@ -136,14 +136,16 @@ class QueryLogDetailFragment : Fragment() {
longName.text = query.name
type.text = query.type.name
protocol.text = when {
query.askedServer == null -> ""
query.responseSource == QueryListener.Source.CACHE -> getString(R.string.windows_querylogging_usedserver_cache)
query.responseSource == QueryListener.Source.LOCALRESOLVER -> getString(R.string.windows_querylogging_usedserver_dnsrules)
query.askedServer == null -> "-"
query.askedServer!!.startsWith("https") -> getString(R.string.fragment_querydetail_mode_doh)
else -> getString(R.string.fragment_querydetail_mode_dot)
}
if(query.responseSource == QueryListener.Source.CACHE) {
resolvedBy.text = "Cache"
} else {
resolvedBy.text = query.askedServer?.replace("tls::", "")?.replace("https::", "") ?: "-"
resolvedBy.text = when {
query.responseSource == QueryListener.Source.CACHE -> getString(R.string.windows_querylogging_usedserver_cache)
query.responseSource == QueryListener.Source.LOCALRESOLVER -> getString(R.string.windows_querylogging_usedserver_dnsrules)
else -> query.askedServer?.replace("tls::", "")?.replace("https::", "") ?: "-"
}
responses.text = query.getParsedResponses().filter {
it.type == query.type
......
......@@ -86,4 +86,6 @@
<string name="windows_querylogging_responses">Responses</string>
<string name="windows_querylogging_create_dnsrule">Create dns rule for this host</string>
<string name="windows_querylogging_dnsrule_created">Dns rule has been created.</string>
<string name="windows_querylogging_usedserver_dnsrules">Resolved with Dns Rules</string>
<string name="windows_querylogging_usedserver_cache">Resolved with cache</string>
</resources>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment