Paul Hoffman on Nostr: $diety help me for asking what should be a simple a technical how-to on Mastodon but: ...
$diety help me for asking what should be a simple a technical how-to on Mastodon but: is there a good way for a Python script to check if it is running on a system with IPv6 connectivity to "the Internet". All the search results I got (on Kagi, FWIW) had answers that were the moral equivalent of "Look up the IPv6 address of www.google.com and { send an HTTP request | open a TCP socket }".
I dearly hope that there is some better way that doesn't involve this level of hack, but I suspect that this really might be close to the best that one can do. (I'll swap in "example.com" but, still, ugh.)
Published at
2026-01-22 01:58:57 UTCEvent JSON
{
"id": "5ed025811d9536880b013f6a7240a0c6a4defddd9e410aa55218252196d9dcaa",
"pubkey": "c1fc3d819699d21c77bb73a283ce53f296a8d2147f740685a35a9d4396acc1fa",
"created_at": 1769047137,
"kind": 1,
"tags": [
[
"proxy",
"https://infosec.exchange/users/paulehoffman/statuses/115936273231246058",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.ditto.pub"
]
],
"content": "$diety help me for asking what should be a simple a technical how-to on Mastodon but: is there a good way for a Python script to check if it is running on a system with IPv6 connectivity to \"the Internet\". All the search results I got (on Kagi, FWIW) had answers that were the moral equivalent of \"Look up the IPv6 address of www.google.com and { send an HTTP request | open a TCP socket }\".\n\nI dearly hope that there is some better way that doesn't involve this level of hack, but I suspect that this really might be close to the best that one can do. (I'll swap in \"example.com\" but, still, ugh.)",
"sig": "4b7bea2f1f74854aca4c66cd43282e7fe920cf9889d475e8cef6be2a52ed050d0b69deb1948f38a1f0074c8a2e4200412f5084979f8e2ac5db487bf1ca6777c2"
}