Skip to content

Commit

Permalink
Show ADB tunnel use in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Apr 17, 2021
1 parent 0b2a4e0 commit 58b7a03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ class ConnectionStatusView(
}

val connectedToText = findViewById<TextView>(R.id.connectedTo)
connectedToText.text = context.getString(
R.string.connected_details,
proxyConfig.ip,
proxyConfig.port
)
connectedToText.text = if (proxyConfig.ip == "127.0.0.1") {
context.getString(R.string.connected_tunnel_details)
} else {
context.getString(
R.string.connected_details,
proxyConfig.ip,
proxyConfig.port
)
}

val appInterceptionStatus = findViewById<MaterialCardView>(R.id.appInterceptionStatus)
appInterceptionStatus.setOnClickListener { _ ->
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<string name="disconnected_details">To intercept this device, start HTTP Toolkit on your computer, and activate Android interception there via QR code or using ADB.</string>

<string name="connected_details">to %s on port %d</string>
<string name="connected_tunnel_details">via ADB tunnel</string>
<string name="failed_details">We couldn\'t connect to HTTP Toolkit.\n\nIs it running, and connected to the same network as this device?</string>

<string name="disabled_connection_status_heading">HTTPS interception disabled</string>
Expand Down

0 comments on commit 58b7a03

Please sign in to comment.