Skip to content

Commit

Permalink
do not check for transportType on transaction update
Browse files Browse the repository at this point in the history
  • Loading branch information
hussainmohd-a committed Sep 20, 2023
1 parent e705e01 commit ed99a59
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions app/src/main/java/com/celzero/bravedns/net/doh/Transaction.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ class Transaction {
DNS_CRYPT(Dnsx.DNSCrypt),
DNS_PROXY(Dnsx.DNS53);

fun isDnsCrypt(): Boolean {
return this == DNS_CRYPT
}

companion object {
fun getType(type: String): TransportType {
return when (type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,7 @@ internal constructor(

dnsLog.blockLists = transaction.blocklist
dnsLog.resolverId = transaction.id
if (transaction.transportType.isDnsCrypt()) {
dnsLog.relayIP = transaction.relayName
} else {
// fixme: handle for DoH and Dns proxy
dnsLog.relayIP = ""
}
dnsLog.relayIP = transaction.relayName
dnsLog.dnsType = transaction.transportType.ordinal
dnsLog.latency = transaction.responseTime
dnsLog.queryStr = transaction.name
Expand Down

0 comments on commit ed99a59

Please sign in to comment.