Post AXDlcEA851IBhAGiFk by simon@fedi.simonwillison.net
(DIR) More posts by simon@fedi.simonwillison.net
(DIR) Post #AXDdukoGdZDiWpMkka by simon@fedi.simonwillison.net
2023-06-30T13:58:27Z
0 likes, 0 repeats
Figured out how to get anything.lan (including foo.bar.lan etc) to resolve to 127.0.0.1 on my Mac laptop, using dnsmasq installed from Homebrew https://til.simonwillison.net/macos/wildcard-dns-dnsmasq
(DIR) Post #AXDeLdtuQtEev3pITw by markwalker@fosstodon.org
2023-06-30T14:03:34Z
0 likes, 0 repeats
@simon I'm not considering what would make a niche quiche...
(DIR) Post #AXDepdhpimkt0ETutM by simon@fedi.simonwillison.net
2023-06-30T14:09:09Z
0 likes, 0 repeats
@markwalker it's the opposite of a mainstream quiche!
(DIR) Post #AXDf1qEwwgRnLrn2TA by flovilmart@hachyderm.io
2023-06-30T14:10:41Z
0 likes, 0 repeats
@markwalker @simon if you need it to work from docker containers, create a network alias on 10.254.254.254 to lo0 and use that IP instead in dnsmasq
(DIR) Post #AXDfC3T0cioLGmEhlY by markwalker@fosstodon.org
2023-06-30T14:11:38Z
0 likes, 0 repeats
@simon of course, sorry, I mean I'm considering what unusual flavours could be made
(DIR) Post #AXDfNlmcCHs1tozc7U by simon@fedi.simonwillison.net
2023-06-30T14:13:29Z
0 likes, 0 repeats
@daniel wait what!? Yeah that seems to work on my Mac too. I had no idea!
(DIR) Post #AXDfXR8HpW7YkUjsYq by simon@fedi.simonwillison.net
2023-06-30T14:16:39Z
0 likes, 0 repeats
... and it turns out that's not necessary at all, because `foo.bar.localhost` resolves to `127.0.0.1` on macOS out of the box!
(DIR) Post #AXDfu25Z6nOTjlEzKK by sil@mastodon.social
2023-06-30T14:21:12Z
0 likes, 0 repeats
@simon well crikey, it does on Ubuntu too. TIL, indeed
(DIR) Post #AXDgj1THAFZSafe3do by masukomi@connectified.com
2023-06-30T14:30:16Z
0 likes, 0 repeats
@simon .... 😲... well... that... might save a lot of tweaks to my /etc/hosts thanks!
(DIR) Post #AXDjxA0cW8rMzEftHE by harris@social.coop
2023-06-30T15:06:08Z
0 likes, 0 repeats
@simon WHAT
(DIR) Post #AXDlDUKMqE0QahGEEq by pdcawley@mendeddrum.org
2023-06-30T15:20:29Z
0 likes, 0 repeats
@simon can't you just add 127.0.0.1 foo.bar.lanto /etc/hosts? Usually works for me.
(DIR) Post #AXDlcEA851IBhAGiFk by simon@fedi.simonwillison.net
2023-06-30T15:25:09Z
0 likes, 0 repeats
@pdcawley yeah but I'm building stuff that uses wildcard DNS in production and I want to test it locally
(DIR) Post #AXDtzEpAaHj22ewqeG by glyph@mastodon.social
2023-06-30T16:58:57Z
0 likes, 0 repeats
@simon pro tip: don't use `.lan`, use `.lan.<your-domain>` so you can provision HTTPS certificates for it.
(DIR) Post #AXDu9fbjrKPy0Mdl2W by glyph@mastodon.social
2023-06-30T17:00:52Z
0 likes, 0 repeats
@simon Uhhhh… $ python3 -c 'import socket; print(socket.getaddrinfo("foo.bar.localhost", 0))'Traceback (most recent call last): File "<string>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 962, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags):socket.gaierror: [Errno 8] nodename nor servname provided, or not known
(DIR) Post #AXE8ooW12n7orYTbJw by Jmelloy@vis.social
2023-06-30T19:44:58Z
0 likes, 0 repeats
@simon local.computer should work, too. So does foo.bad.local.computer.
(DIR) Post #AXET3niQIYnPoDhgky by simon@fedi.simonwillison.net
2023-06-30T23:31:54Z
0 likes, 0 repeats
@glyph whoa... so I could buy myself a wildcard certificate for a domain, and then use subdomains of that on my own local machine!?
(DIR) Post #AXETgI6hkdwF4TPlrc by ethantyping@hachyderm.io
2023-06-30T23:38:28Z
0 likes, 0 repeats
@simon @glyph you can get a free wildcard cert from let's encrypt! Where you point your domain is up to you.
(DIR) Post #AXEZ7nTZjKV9ww3088 by glyph@mastodon.social
2023-07-01T00:39:47Z
0 likes, 0 repeats
@simon I used to maintain a tool for this, but I archived it because with the DNS challenge you can just do it with certbot out of the box