(ip: IpAddr)
| 2896 | } |
| 2897 | |
| 2898 | fn is_tailscale_ip(ip: IpAddr) -> bool { |
| 2899 | match ip { |
| 2900 | IpAddr::V4(ip) => { |
| 2901 | let octets = ip.octets(); |
| 2902 | octets[0] == 100 && (octets[1] & 0b1100_0000) == 0b0100_0000 |
| 2903 | } |
| 2904 | IpAddr::V6(_) => false, |
| 2905 | } |
| 2906 | } |
| 2907 | |
| 2908 | fn is_tailscale_host(host: &str) -> bool { |
| 2909 | host.parse::<IpAddr>().is_ok_and(is_tailscale_ip) |
no outgoing calls
no test coverage detected