mirror of
https://github.com/alexta69/metube.git
synced 2026-09-21 21:45:04 +00:00
fix: accept HOST=* so IPv6 users get a dual-stack bind (closes #795)
aiohttp hands HOST straight to getaddrinfo, which has no notion of a '*' wildcard: the lookup fails and MeTube dies at startup on an opaque DNS error. '*' is nevertheless what people reach for when they want to serve both IP stacks -- it is the answer given on #795 -- while the value that actually does it, an empty string, is undiscoverable. asyncio expands an empty host to one listening socket per address family, so map '*' onto it. Verified against the real stack: '' -> [('0.0.0.0', p), ('::', p, 0, 0)] '0.0.0.0' -> [('0.0.0.0', p)] '::' -> [('::', p, 0, 0)] '*' -> gaierror (before this change) The README claimed the 0.0.0.0 default was "all interfaces", which is only true of IPv4; document the three modes instead. Note that '::' is IPv6-only whatever the host's bindv6only says, because asyncio always sets IPV6_V6ONLY on the sockets it binds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -90,7 +90,7 @@ Enabling `writeinfojson` or `writethumbnail` in `YTDL_OPTIONS` also writes a fee
|
||||
|
||||
### 🌐 Web Server & URLs
|
||||
|
||||
* __HOST__: The host address the web server will bind to. Defaults to `0.0.0.0` (all interfaces).
|
||||
* __HOST__: The host address the web server will bind to. Defaults to `0.0.0.0`, which is every IPv4 interface but no IPv6 one. Set it to `*` (or leave it empty) to listen on both stacks, or to `::` for IPv6 only — `::` does not also accept IPv4, whatever the host's `bindv6only` setting says.
|
||||
* __PORT__: The port number the web server will listen on. Defaults to `8081`.
|
||||
* __URL_PREFIX__: Base path for the web server (for use when hosting behind a reverse proxy). Defaults to `/`.
|
||||
* __PUBLIC_HOST_URL__: Base URL for the download links shown in the UI for completed files. By default, MeTube serves them under its own URL. If your download directory is accessible on another URL and you want the download links to be based there, use this variable to set it.
|
||||
|
||||
Reference in New Issue
Block a user