MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / is_tailscale_ip

Function is_tailscale_ip

packages/server/src/main.rs:2898–2906  ·  view source on GitHub ↗
(ip: IpAddr)

Source from the content-addressed store, hash-verified

2896}
2897
2898fn 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
2908fn is_tailscale_host(host: &str) -> bool {
2909 host.parse::<IpAddr>().is_ok_and(is_tailscale_ip)

Callers 3

pairing_addressesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected