fix(frontend): add --disable-ipv6=true to generated aria2 command #3

Merged
starkSV merged 1 commit from fix-aria2-disable-ipv6 into main 2026-05-12 19:46:28 +05:30
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ export default function Aria2Tip({ downloadUrl }: Aria2TipProps) {
const [copied, setCopied] = useState(false)
const urlPlaceholder = downloadUrl || 'PASTE_YOUR_LINK_HERE'
const command = `aria2c -x 16 -s 16 "${urlPlaceholder}"`
const command = `aria2c -x 16 -s 16 --disable-ipv6=true "${urlPlaceholder}"`
coderabbitai[bot] commented 2026-05-12 19:40:57 +05:30 (Migrated from github.com)
Review

⚠️ Potential issue | 🟠 Major | Quick win

🧩 Analysis chain

🌐 Web query:

In aria2c, what is the exact behavior of --disable-ipv6=true, and does it prevent downloads on IPv6-only networks (including DNS64/NAT64 environments)?

💡 Result:

Behavior of --disable-ipv6=true: --disable-ipv6 disables IPv6 transport connections in aria2c (it “Disable[s] IPv6”; default is false). It is mainly intended to avoid slow/broken AAAA DNS handling. [1][2] Does it prevent downloads on IPv6-only networks (incl. DNS64/NAT64)? Yes, in the common sense: if aria2c is forced to not use IPv6 at all, then on an IPv6-only network where the destination is reachable only via IPv6, downloads cannot work because aria2c will not attempt IPv6 sockets. The aria2 manual/option text describes the option as disabling IPv6 connectivity. [1][2] For DNS64/NAT64 specifically: - In a DNS64/NAT64 environment, “IPv4-only” destinations are typically synthesized into IPv6 (AAAA) addresses that route via NAT64. If aria2c has --disable-ipv6=true, those synthesized IPv6 routes won’t be usable because IPv6 is disabled. Therefore, it will not successfully reach the synthesized NAT64 addresses. - aria2 may still download if and only if it can obtain and use an IPv4 address/route (for example, the network also provides real IPv4 connectivity and the target hostname resolves to usable A records, or the URI is already an explicit IPv4 address). In that case, the option doesn’t block IPv4; it only disables IPv6. (The option is described as disabling IPv6, not disabling IPv4.) [1][2] Caveat on fallback: aria2c sometimes fails to fall back between IPv4 and IPv6 on certain networks; an issue requests better “fallback and try again” behavior when one address family fails. That means on dual-stack or transition networks you may see outright failure patterns rather than clean automatic fallback to IPv4 when IPv6 is disabled/unreachable. [3] So the practical answer: on an IPv6-only network (and on DNS64/NAT64 where reaching the host requires using the synthesized IPv6 addresses), --disable-ipv6=true should prevent downloads. On networks that also provide working IPv4 (and where name resolution/URI selection yields usable IPv4 addresses), downloads may still work because only IPv6 is disabled. [1][2][3]

Citations:


Remove --disable-ipv6=true from the default command.

Line 15 unconditionally disables IPv6, which breaks downloads on IPv6-only networks and DNS64/NAT64 environments. The aria2c tool explicitly disables IPv6 transport with this flag, making synthesized IPv6 addresses (used in NAT64 scenarios) unreachable. Instead, use the default command without this flag and present --disable-ipv6=true as a troubleshooting option for users encountering IPv4 DNS issues.

Suggested direction
- const command = `aria2c -x 16 -s 16 --disable-ipv6=true "${urlPlaceholder}"`
+ const command = `aria2c -x 16 -s 16 "${urlPlaceholder}"`
+ const troubleshootingCommand = `aria2c -x 16 -s 16 --disable-ipv6=true "${urlPlaceholder}"`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  const command = `aria2c -x 16 -s 16 "${urlPlaceholder}"`
  const troubleshootingCommand = `aria2c -x 16 -s 16 --disable-ipv6=true "${urlPlaceholder}"`
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/Aria2Tip.tsx` at line 15, The default aria2c command
in the Aria2Tip component unconditionally includes --disable-ipv6=true which
breaks IPv6-only and DNS64/NAT64 environments; remove this flag from the command
constant (the const command in Aria2Tip.tsx) so the default becomes aria2c -x 16
-s 16 "${urlPlaceholder}", and instead add UI text or an optional,
clearly-labeled troubleshooting snippet that shows --disable-ipv6=true as an
optional flag users can try if they have IPv4/DNS issues.
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ <details> <summary>🧩 Analysis chain</summary> 🌐 Web query: `In aria2c, what is the exact behavior of --disable-ipv6=true, and does it prevent downloads on IPv6-only networks (including DNS64/NAT64 environments)?` 💡 Result: Behavior of --disable-ipv6=true: --disable-ipv6 disables IPv6 transport connections in aria2c (it “Disable[s] IPv6”; default is false). It is mainly intended to avoid slow/broken AAAA DNS handling. [1][2] Does it prevent downloads on IPv6-only networks (incl. DNS64/NAT64)? Yes, in the common sense: if aria2c is forced to not use IPv6 at all, then on an IPv6-only network where the destination is reachable only via IPv6, downloads cannot work because aria2c will not attempt IPv6 sockets. The aria2 manual/option text describes the option as disabling IPv6 connectivity. [1][2] For DNS64/NAT64 specifically: - In a DNS64/NAT64 environment, “IPv4-only” destinations are typically synthesized into IPv6 (AAAA) addresses that route via NAT64. If aria2c has --disable-ipv6=true, those synthesized IPv6 routes won’t be usable because IPv6 is disabled. Therefore, it will not successfully reach the synthesized NAT64 addresses. - aria2 may still download if and only if it can obtain and use an IPv4 address/route (for example, the network also provides real IPv4 connectivity and the target hostname resolves to usable A records, or the URI is already an explicit IPv4 address). In that case, the option doesn’t block IPv4; it only disables IPv6. (The option is described as disabling IPv6, not disabling IPv4.) [1][2] Caveat on fallback: aria2c sometimes fails to fall back between IPv4 and IPv6 on certain networks; an issue requests better “fallback and try again” behavior when one address family fails. That means on dual-stack or transition networks you may see outright failure patterns rather than clean automatic fallback to IPv4 when IPv6 is disabled/unreachable. [3] So the practical answer: on an IPv6-only network (and on DNS64/NAT64 where reaching the host requires using the synthesized IPv6 addresses), --disable-ipv6=true should prevent downloads. On networks that also provide working IPv4 (and where name resolution/URI selection yields usable IPv4 addresses), downloads may still work because only IPv6 is disabled. [1][2][3] Citations: - 1: https://aria2.github.io/manual/en/html/aria2c.html - 2: https://manpages.ubuntu.com/manpages/jammy/man1/aria2c.1.html - 3: https://github.com/aria2/aria2/issues/2158 --- </details> **Remove `--disable-ipv6=true` from the default command.** Line 15 unconditionally disables IPv6, which breaks downloads on IPv6-only networks and DNS64/NAT64 environments. The `aria2c` tool explicitly disables IPv6 transport with this flag, making synthesized IPv6 addresses (used in NAT64 scenarios) unreachable. Instead, use the default command without this flag and present `--disable-ipv6=true` as a troubleshooting option for users encountering IPv4 DNS issues. <details> <summary>Suggested direction</summary> ```diff - const command = `aria2c -x 16 -s 16 --disable-ipv6=true "${urlPlaceholder}"` + const command = `aria2c -x 16 -s 16 "${urlPlaceholder}"` + const troubleshootingCommand = `aria2c -x 16 -s 16 --disable-ipv6=true "${urlPlaceholder}"` ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion const command = `aria2c -x 16 -s 16 "${urlPlaceholder}"` const troubleshootingCommand = `aria2c -x 16 -s 16 --disable-ipv6=true "${urlPlaceholder}"` ``` </details> <!-- suggestion_end --> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/components/Aria2Tip.tsx` at line 15, The default aria2c command in the Aria2Tip component unconditionally includes --disable-ipv6=true which breaks IPv6-only and DNS64/NAT64 environments; remove this flag from the command constant (the const command in Aria2Tip.tsx) so the default becomes aria2c -x 16 -s 16 "${urlPlaceholder}", and instead add UI text or an optional, clearly-labeled troubleshooting snippet that shows --disable-ipv6=true as an optional flag users can try if they have IPv4/DNS issues. ``` </details> <!-- fingerprinting:phantom:poseidon:hawk --> <!-- 4e71b3a2 --> <!-- This is an auto-generated comment by CodeRabbit -->
function handleCopy() {
navigator.clipboard.writeText(command)

View file

@ -22,7 +22,7 @@ const faqs: FaqItem[] = [
},
{
q: 'Can I use this with IDM or aria2?',
a: 'Absolutely — and we strongly recommend it. Microsoft throttles single-threaded browser downloads. Tools like aria2 (aria2c -x 16 -s 16 "URL") or IDM use 16 parallel connections, which typically give you full line speed on their CDN.',
a: 'Absolutely — and we strongly recommend it. Microsoft throttles single-threaded browser downloads. Tools like aria2 (aria2c -x 16 -s 16 --disable-ipv6=true "URL") or IDM use 16 parallel connections, which typically give you full line speed on their CDN.',
},
{
q: 'What\'s the difference between the various product IDs?',