Skip to main content

I wrote that before Go was cool…

https://github.com/Katello/katello-client-bootstrap/blob/312a438267dfedd44d3ff05407fda0a447e493a7/bootstrap.py#L1323-L1333

(but at least I am not using 8.8.8.8?)
@zhenech at least that's in the direction of a server that you care about!
"care" might be a bit far-fetched, but yes, the one I want to talk to in general XD

but also, wasn't that code of yours trying to get the "default", so shouldn't it be using 0.0.0.0 as target?
@zhenech it wasn't my code, that's gitea's code :)
heh. it gives me 127.0.0.1 as the IP for 0.0.0.0 target tho, so maybe there is some "truth" in using a "real" target.
@zhenech `hostname --ip-address` is sitting right there (or the underlying tactic of gethostbyname'ing the local name
% hostname --ip-address
fe80::c1a1:1e02:a06:e2ec%enp34s0u2u1u2 fe80::1009:5d1c:f076:27ed%wlp0s20f3 fe80::c600:86a0:db8b:c8c6%tailscale0 fe80::fc22:28ff:feeb:3f17%tap0 fe80::fcbc:58ff:fece:ff53%tap1 fe80::d78d:6d3c:6570:e013%tun0 2a02:abc:abcd:dddd:32dd:24c9:41e6:f5a9 2a02:abc:abcd:dddd:4d48:4f49:bbd5:43f9 fd7a:115c:a1e0:ab12:4843:cd96:624d:a073 fd10:39:192:1::135f 192.168.43.142 192.168.42.206 100.77.160.115 192.168.122.1 10.39.195.96
(phew, it did fit into a toot!)
on the other hand (well, phone, really), hostname gives me 127.0.0.1, exclusively, while the socket trick works "just fine".
And then there is:
% hostname --ip-address
hostname: illegal option -- -
usage: hostname [-f] [-s | -d] [name-of-host]
(I should be happy it did not set the hostname to `--ip-address` I guess?)
@Paul Tagliamonte The fact that it phones google every single time makes me sad
*udp* port *80* (not a thing on 8.8.8.8) to get what I assume they intend to be the IP for the interface with the default route on it - this code doesnt even need a return packet, just the local addr
This entry was edited (1 year ago)
@silverwizard not even to mention ipv6 only networks, or boxes dual homed where the route to the gitea instance is on an interface that's not the default route
then I wouldn't be using two different VPNs and different routings for WiFi and wired networks? :)
@zhenech i deleted my snarky toot which I assume this is in reply to - but yeah, shit's hard and turns out assumptions can cause crashes! 😢
yes, it's the reply to the snarky hard truth.