@sn0w@cofe.rocks :neofox_reject: checking if it uses IPv6 by doing some shenanigans :neofox_approve: checking if it uses IPv6 by seeing if cofe.rocks emoji work again
i'm happy to report that cofe.rocks emojis are in fact working again :neofox_owo:
@sn0w@cofe.rocks so after looking at different docs for a bit i think i can still force it to prefer v6 addresses by settting some options. If hints.ai_flags specifies the AI_V4MAPPED flag, and hints.ai_family was specified as AF_INET6, and no matching IPv6 addresses could be found, then return IPv4-mapped IPv6 addresses in the list pointed to by res.If you are wondering about the strange wording, thats because this is from man 3 getaddrinfo :neofox_blep:
So the plan is: Tell it that I only want v6 addresses, but if it really has to its okay if it gives me IPv4 addresses mapped to IPv6 address space (like ::ffff:127.0.0.1). Trying it out gives the expected result: cache.lookup("cache.cofe.rocks", { family: 6, hints: dns.V4MAPPED }, console.log)givesnull 2605:6400:30:f2ff:c0fe::41 6 1706033308991 63 and this also still workscache.lookup("github.com", { family: 6, hints: dns.V4MAPPED }, console.log)givingnull ::ffff:140.82.121.4 6 1706033385512 60
@sn0w@cofe.rocks okay the plot thickens. i'm not done refactoring yet but i noticed that the package cacheable-lookup is used for DNS queries. and now look at this: // thats how you import an EcmaScript module on the node command line 🥴
let CacheableLookup = await import('cacheable-lookup').then(x => x.default);
// this uses the same options as Foundkey uses
cache = new CacheableLookup({
maxTtl: 3600, // 1h
errorTtl: 30, // 30sec
lookup: false, // no fallback if the server returns ENOTFOUND
});
// using console.log as a callback so i can see the result
cache.lookup("cache.cofe.rocks", console.log) and the output I get is:null 107.189.12.41 4 1706030521656 7281st argument is an error if any, so no error 2nd is the resulting address, which is IPv4 in this case. 3rd is the result address family, again v4 and then probably some TTLs or something
If using nodejs's builtin DNS resolver (which doesnt do caching):dns.lookup('cache.cofe.rocks', console.log);which givesnull 2605:6400:30:f2ff:c0fe::41 6i.e. it gives a v6 address. huh?
@Johann150 maybe because it's a redirect? it will hit ::119 first and then get a 302 towards the cache at ::41 should work ig though, at least seems to for others
@Johann150 it could be that routing to path.net broke for some reason my v4 space is from there while v6 goes directly to the frantech AS unfortunately buyvm don't offer additional v4 IPs without "DDoS protection" so reachability disagreements like this can sometimes happen
@Johann150 could be a hetzner outage i just tried doing a globalping (https://www.jsdelivr.com/globalping) and their hetzner node has the same 100.64.10.22 problem as you while the others work
@sn0w@cofe.rocks emoji from your instance are broken on my side. emoji itself works fine when i go to the URL manually. but misskey/foundkey normally proxies the emoji request. and for some reason my server can't reach yours (i.e. cache.cofe.rocks)
(even worse it only tries using IPv4, not sure why) $ ping -4 cache.cofe.rocks
PING (107.189.12.41) 56(84) bytes of data.
From 100.64.10.22 (100.64.10.22) icmp_seq=1 Destination Host Unreachable