pub fn is_localhost(host: &str) -> bool
checks if a host string refers to the local machine. returns true for localhost, 127.0.0.1, ::1, [::1], or the actual hostname
localhost
127.0.0.1
::1
[::1]