mirror of https://github.com/M66B/NetGuard.git
Blocked traffic layout improvements
This commit is contained in:
parent
5e061668c8
commit
e8063ddbdb
11
FAQ.md
11
FAQ.md
|
@ -233,6 +233,17 @@ The columns have the following meaning:
|
|||
1. Application uid
|
||||
1. IPv4 or IPv6 address (tap on a log entry to lookup an IP address)
|
||||
|
||||
From version 0.77:
|
||||
|
||||
1. Time (tap on a log entry to see the date)
|
||||
1. Application icon (tap on a log entry to see the application name)
|
||||
1. Application uid
|
||||
1. Wi-Fi / mobile connection, green=allowed, red=blocked
|
||||
1. Interactive state (screen on)
|
||||
1. Protocol (see below) and packet flags (see below)
|
||||
1. Source and destination port (tap on a log entry to lookup a destination port)
|
||||
1. Source and destination IPv4 or IPv6 address (tap on a log entry to lookup a destination IP address)
|
||||
|
||||
Protocols:
|
||||
|
||||
* I = ICMP
|
||||
|
|
|
@ -105,12 +105,15 @@ public class LogAdapter extends CursorAdapter {
|
|||
else
|
||||
ivInteractive.setImageResource(R.drawable.screen_on);
|
||||
|
||||
if (protocol == 1) // ICMP
|
||||
tvProtocol.setText("I");
|
||||
// https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
|
||||
if (protocol == 0) // HOPOPT
|
||||
tvProtocol.setText("HOPO");
|
||||
else if (protocol == 1) // ICMP
|
||||
tvProtocol.setText("ICMP");
|
||||
else if (protocol == 6) // TCP
|
||||
tvProtocol.setText("T");
|
||||
tvProtocol.setText("TCP");
|
||||
else if (protocol == 17) // UDP
|
||||
tvProtocol.setText("U");
|
||||
tvProtocol.setText("UDP");
|
||||
else
|
||||
tvProtocol.setText(protocol < 0 ? "" : Integer.toString(protocol));
|
||||
|
||||
|
@ -148,11 +151,6 @@ public class LogAdapter extends CursorAdapter {
|
|||
else
|
||||
tvUid.setText(Integer.toString(uid));
|
||||
|
||||
// tvProtocol.setText("99");
|
||||
// tvPort.setText("88888");
|
||||
// tvFlags.setText("+APFR");
|
||||
// tvUid.setText("18888");
|
||||
|
||||
// TODO resolve source when inbound
|
||||
|
||||
tvSource.setText(source);
|
||||
|
|
|
@ -14,11 +14,27 @@
|
|||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="24dip"
|
||||
android:layout_height="24dip"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUid"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivConnection"
|
||||
android:layout_width="16dip"
|
||||
android:layout_height="16dip"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="4dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivInteractive"
|
||||
|
@ -35,7 +51,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvProtocol"
|
||||
android:layout_width="16dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
|
@ -43,52 +59,13 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvFlags"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSPort"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDPort"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="16dip"
|
||||
android:layout_height="16dip"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUid"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -97,18 +74,48 @@
|
|||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSource"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDest"
|
||||
<TextView
|
||||
android:id="@+id/tvSPort"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSource"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDPort"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Reference in New Issue