mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-01 12:54:07 +00:00
Some more port names
This commit is contained in:
parent
df32990789
commit
d6e5acd091
1 changed files with 25 additions and 9 deletions
|
@ -275,14 +275,30 @@ public class LogAdapter extends CursorAdapter {
|
|||
}
|
||||
|
||||
private String getKnownPort(int port) {
|
||||
if (port == 53)
|
||||
return "dns";
|
||||
else if (port == 80)
|
||||
return "http";
|
||||
else if (port == 443)
|
||||
return "https";
|
||||
else if (port == 993)
|
||||
return "imaps";
|
||||
return Integer.toString(port);
|
||||
// https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports
|
||||
switch (port) {
|
||||
case 7:
|
||||
return "echo";
|
||||
case 25:
|
||||
return "smtp";
|
||||
case 53:
|
||||
return "dns";
|
||||
case 80:
|
||||
return "http";
|
||||
case 110:
|
||||
return "pop3";
|
||||
case 143:
|
||||
return "imap";
|
||||
case 443:
|
||||
return "https";
|
||||
case 465:
|
||||
return "smtps";
|
||||
case 993:
|
||||
return "imaps";
|
||||
case 995:
|
||||
return "pop3s";
|
||||
default:
|
||||
return Integer.toString(port);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue