<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Alessandro Pogliaghi's Blog</title><image><url>https://apogliaghi.com/img/favicon/favicon.png</url><title>Docker on Alessandro Pogliaghi</title><link>https://apogliaghi.com/categories/docker/</link></image><link>https://apogliaghi.com/categories/docker/</link><description>Recent content in Docker on Alessandro Pogliaghi</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>apogliaghi@gmail.com (Alessandro Pogliaghi)</managingEditor><webMaster>apogliaghi@gmail.com (Alessandro Pogliaghi)</webMaster><copyright>Alessandro Pogliaghi ~ 2026 | Made with ❤️ in<span class='emoji'>🇪🇺</span></copyright><lastBuildDate>Sun, 04 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://apogliaghi.com/categories/docker/index.xml" rel="self" type="application/rss+xml"/><atom:link href="https://apogliaghi.com/" rel="alternate" type="text/html"/><item><title>Forking MeTube ~ You can just do stuff</title><link>https://apogliaghi.com/2026/01/forking-metube-~-you-can-just-do-stuff/</link><pubDate>Sun, 04 Jan 2026 00:00:00 +0000</pubDate><author>apogliaghi@gmail.com (Alessandro Pogliaghi)</author><guid>https://apogliaghi.com/2026/01/forking-metube-~-you-can-just-do-stuff/</guid><description>
&lt;h2 id="the-itch">
The Itch
&lt;a href="#the-itch" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;p>&lt;a href="https://github.com/alexta69/metube">MeTube&lt;/a> is a neat self-hosted YouTube downloader with a clean web UI. Paste a link, pick your format, hit download. Simple.&lt;/p>
&lt;p>Except YouTube decided that simple things shouldn&amp;rsquo;t stay simple.&lt;/p>
&lt;p>At some point, downloads started failing with the lovely &amp;ldquo;Sign in to confirm you&amp;rsquo;re not a bot&amp;rdquo; message. Classic. YouTube&amp;rsquo;s bot detection had gotten stricter, the web is not fun anymore.&lt;/p>
&lt;p>On top of that, I wanted my downloaded videos to actually show up properly in Jellyfin instead of appearing as mysterious &amp;ldquo;Unknown&amp;rdquo; entries with no metadata. Two itches, one fork.&lt;/p>
&lt;figure class="center" >
&lt;img src="https://apogliaghi.com/img/_metube-pot/metube_homepage.png"
/>
&lt;figcaption class="center" >MeTube POT interface&lt;/figcaption>
&lt;/figure>
&lt;h2 id="pot-proof-of-origin-support">
POT (Proof-of-Origin) Support
&lt;a href="#pot-proof-of-origin-support" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;p>YouTube&amp;rsquo;s anti-bot measures work by requiring a &amp;ldquo;Proof-of-Origin&amp;rdquo; token, basically proving that the request comes from a legitimate browser session rather than some script hammering their servers.&lt;/p>
&lt;p>The fix? &lt;a href="https://github.com/Brainicism/bgutil-ytdlp-pot-provider">bgutil-ytdlp-pot-provider&lt;/a>. It&amp;rsquo;s a yt-dlp plugin that generates these POT tokens, making YouTube believe the requests are coming from an actual browser.&lt;/p>
&lt;h2 id="jellyfin-integration">
Jellyfin Integration
&lt;a href="#jellyfin-integration" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;figure class="center" >
&lt;img src="https://apogliaghi.com/img/_metube-pot/jellyfin_homepage.png"
/>
&lt;figcaption class="center" >Video properly displayed in Jellyfin with full metadata&lt;/figcaption>
&lt;/figure>
&lt;p>Here&amp;rsquo;s the thing about downloading YouTube videos: yt-dlp can grab a ton of metadata and save it as a &lt;code>.info.json&lt;/code> file alongside the video. Title, description, upload date, channel name, tags, duration, everything.&lt;/p>
&lt;p>Jellyfin, however, doesn&amp;rsquo;t speak &lt;code>.info.json&lt;/code>. It wants &lt;code>.nfo&lt;/code> files, an XML format that media servers have used since the Kodi days.&lt;/p>
&lt;p>So I wrote a post-processor hook that runs after each download completes.&lt;/p>
&lt;p>It reads the &lt;code>.info.json&lt;/code>, extracts the relevant fields, and generates a Jellyfin-compatible &lt;code>.nfo&lt;/code> file. The metadata mapping looks like this:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Title&lt;/strong> and &lt;strong>Original Title&lt;/strong> from the video title&lt;/li>
&lt;li>&lt;strong>Plot&lt;/strong> from the description&lt;/li>
&lt;li>&lt;strong>Year&lt;/strong> and &lt;strong>Premiered&lt;/strong> from the upload date&lt;/li>
&lt;li>&lt;strong>Studio&lt;/strong> and &lt;strong>Director&lt;/strong> mapped to the uploader/channel&lt;/li>
&lt;li>&lt;strong>Tags&lt;/strong> from the video tags (capped at 20 to keep things sane)&lt;/li>
&lt;li>&lt;strong>Runtime&lt;/strong> converted from seconds to minutes&lt;/li>
&lt;li>&lt;strong>Unique ID&lt;/strong> storing the YouTube video ID&lt;/li>
&lt;/ul>
&lt;p>After generating the &lt;code>.nfo&lt;/code>, the hook cleans up by deleting the original &lt;code>.info.json&lt;/code>. No leftover clutter.&lt;/p>
&lt;h2 id="keeping-up-with-upstream">
Keeping Up with Upstream
&lt;a href="#keeping-up-with-upstream" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;figure class="center" >
&lt;img src="https://apogliaghi.com/img/_metube-pot/aint_nobody.png"
width="600px"
/>
&lt;figcaption class="center" >Creating a meme without Nano Banana 🍌? Ain&amp;rsquo;t nobody got time for that!&lt;/figcaption>
&lt;/figure>
&lt;p>Forking is easy. Maintaining a fork? Not so fun.&lt;/p>
&lt;p>The upstream MeTube repo keeps getting updates: bug fixes, new features, dependency bumps.&lt;/p>
&lt;p>I automated this with a GitHub Action (lame, I know) that runs weekly. Here&amp;rsquo;s what it does:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Fetches the latest upstream release&lt;/strong> from the original MeTube repo&lt;/li>
&lt;li>&lt;strong>Checks if it&amp;rsquo;s already been analyzed&lt;/strong> (no point in creating duplicate reports)&lt;/li>
&lt;li>&lt;strong>Generates a diff&lt;/strong> between the fork and the new release&lt;/li>
&lt;li>&lt;strong>Sends the diff to an LLM&lt;/strong> for analysis because, I ain&amp;rsquo;t got time for that&lt;/li>
&lt;li>&lt;strong>Creates a GH issue&lt;/strong> with the analysis report&lt;/li>
&lt;/ol>
&lt;p>The result? A nicely formatted issue telling me whether I should bother merging upstream changes or if I can safely ignore them. The boring parts of fork maintenance, automated.&lt;/p>
&lt;h2 id="use-it-yourself">
Use it yourself
&lt;a href="#use-it-yourself" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;p>The fork lives at &lt;a href="https://github.com/tatoalo/metube_pot">tatoalo/metube_pot&lt;/a>. If you&amp;rsquo;re running MeTube and hitting YouTube&amp;rsquo;s bot detection, or you want your downloads to play nice with Jellyfin, give it a spin:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>docker pull ghcr.io/tatoalo/metube_pot
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Sometimes you just see something that&amp;rsquo;s 90% of what you need, and the remaining 10% is an afternoon of hacking. Fork stuff, scratch your own itches, automate the tedious parts.&lt;/p>
&lt;p>&lt;strong>Note&lt;/strong>: I don&amp;rsquo;t condone piracy. Use this tool responsibly and ethically. Also, respect YouTube&amp;rsquo;s terms of service and copyright laws. 🤷‍♂️&lt;/p>
&lt;p>&lt;strong>Note&lt;/strong>: This has been done for fun and for research purposes. 🤷‍♂️🤷‍♂️&lt;/p></description></item><item><title>Crypto Miner in hotio/qbittorrent</title><link>https://apogliaghi.com/2025/09/crypto-miner-in-hotio/qbittorrent/</link><pubDate>Tue, 23 Sep 2025 00:00:00 +0000</pubDate><author>apogliaghi@gmail.com (Alessandro Pogliaghi)</author><guid>https://apogliaghi.com/2025/09/crypto-miner-in-hotio/qbittorrent/</guid><description>
&lt;div style="background: linear-gradient(135deg, #ff6b35, #f7931e); padding: 20px; border-radius: 10px; margin: 30px 0; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.1);">
&lt;h3 style="margin: 0 0 15px 0; color: white; font-size: 1.3em;">🗣️ Join the Discussion 🗣️&lt;/h3>
&lt;div style="display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 15px;">
&lt;a href="https://news.ycombinator.com/item?id=45345233" style="display: inline-flex; align-items: center; padding: 10px 20px; background: rgba(255,255,255,0.2); border-radius: 25px; text-decoration: none; color: white; font-weight: bold; transition: all 0.3s ease; backdrop-filter: blur(10px);" onmouseover="this.style.background='rgba(255,255,255,0.3)'; this.style.transform='translateY(-2px)'" onmouseout="this.style.background='rgba(255,255,255,0.2)'; this.style.transform='translateY(0)'">
&lt;img src="https://news.ycombinator.com/favicon.ico" alt="HN" style="width: 16px; height: 16px; margin-right: 8px;">
Hacker News
&lt;/a>
&lt;a href="https://lobste.rs/s/6wzpji/crypto_miner_hotio_qbittorrent" style="display: inline-flex; align-items: center; padding: 10px 20px; background: rgba(255,255,255,0.2); border-radius: 25px; text-decoration: none; color: white; font-weight: bold; transition: all 0.3s ease; backdrop-filter: blur(10px);" onmouseover="this.style.background='rgba(255,255,255,0.3)'; this.style.transform='translateY(-2px)'" onmouseout="this.style.background='rgba(255,255,255,0.2)'; this.style.transform='translateY(0)'">
&lt;span style="font-size: 1.2em; margin-right: 8px;">🦞&lt;/span>
Lobste.rs
&lt;/a>
&lt;/div>
&lt;/div>
&lt;hr>
&lt;h3 id="infected-container-image">
Infected Container Image
&lt;a href="#infected-container-image" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Registry:&lt;/strong> &lt;code>ghcr.io/hotio/qbittorrent&lt;/code>&lt;/li>
&lt;li>&lt;strong>Tag:&lt;/strong> &lt;code>release&lt;/code>&lt;/li>
&lt;li>&lt;strong>Digest:&lt;/strong> &lt;code>sha256:3779f89712dbaa8b25fc22897d0b471ee&lt;/code>
&lt;code>29049b2b0f8d3c192df83b098c84fc5&lt;/code>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>Recently, while migrating to a new server, I discovered a suspicious process running inside a &lt;a href="https://hotio.dev/containers/qbittorrent/">hotio/qbittorrent&lt;/a> Docker container.&lt;/p>
&lt;p>I mainly use this to download Linux ISOs, as anybody else, right?&lt;/p>
&lt;p>I just want to get that sweet sweet &lt;a href="https://omarchy.org/">Omarchy&lt;/a> ISO.&lt;/p>
&lt;h2 id="the-problem">
The Problem
&lt;a href="#the-problem" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;p>While monitoring system resources, I noticed a process consuming unusually high CPU:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ ps -ef | grep netservlet
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">1000&lt;/span> &lt;span style="color:#ae81ff">758679&lt;/span> &lt;span style="color:#ae81ff">756435&lt;/span> &lt;span style="color:#ae81ff">99&lt;/span> 09:39 ? 00:13:43 ./netservlet
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;figure class="center" >
&lt;img src="https://apogliaghi.com/img/_qbittorrent-cryptominer/cpu_spike.png"
/>
&lt;/figure>
&lt;p>The binary &lt;code>netservlet&lt;/code> was unfamiliar, and attempts to inspect it via &lt;code>/proc&lt;/code> failed:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ docker exec qbittorrent cat /proc/758679/exe &amp;gt; /tmp/netservlet
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Output: No such file or directory&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This indicates the binary was likely &lt;strong>unlinked from the filesystem&lt;/strong>, pretty much as expected.&lt;/p>
&lt;h2 id="investigation">
Investigation
&lt;a href="#investigation" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;p>Since direct access to the executable was blocked, I generated a core dump:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ gcore -o /tmp/netservlet_core &lt;span style="color:#ae81ff">758679&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>I could now simply use &lt;code>strings&lt;/code> to further have a look:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ strings /tmp/netservlet.elf | egrep -i &lt;span style="color:#e6db74">&amp;#39;stratum|pool|wallet|http|crypto|mining|eth|btc|pool&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Highlights included:&lt;/p>
&lt;ul>
&lt;li>References to cryptocurrency mining: &lt;code>cryptonight&lt;/code>, &lt;code>ethash_calculate_dag_item&lt;/code>, &lt;code>mining.submit&lt;/code>, &lt;code>mining.authorize&lt;/code>.&lt;/li>
&lt;li>Mining pool addresses: &lt;code>auto.c3pool.org:19999&lt;/code>.&lt;/li>
&lt;li>Miner configuration options: &lt;code>--cpu-memory-pool&lt;/code>, &lt;code>--opencl&lt;/code>, &lt;code>--cuda&lt;/code>, &lt;code>--rig-id&lt;/code>, &lt;code>http-access-token&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>This confirmed that &lt;code>netservlet&lt;/code> was &lt;strong>a stealth crypto miner&lt;/strong>, likely XMRig or a variant.
I thought we were over crypto bros and all over to AI-bros, I was mistaken 😂.&lt;/p>
&lt;figure class="center" >
&lt;img src="https://apogliaghi.com/img/_qbittorrent-cryptominer/wat.png"
/>
&lt;/figure>
&lt;p>Just for fun, I also ran &lt;code>binwalk&lt;/code> against the dump, which ended up with a &lt;code>1.3GB&lt;/code> &lt;code>gzip&lt;/code> archive.
We couldn&amp;rsquo;t just unzip it, though, due to obfuscation.&lt;/p>
&lt;p>I will analyze it via &lt;code>ghidra&lt;/code> later, today I should be OOO lol.&lt;/p>
&lt;h2 id="conclusion">
Conclusion
&lt;a href="#conclusion" class="h-anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;p>Remember:&lt;/p>
&lt;ul>
&lt;li>Never trust random Docker images—your containers aren’t magic elves.&lt;/li>
&lt;li>Keep an eye on system resources—they have feelings too.&lt;/li>
&lt;li>Audit your host and containers often—because surprises are only fun at parties.&lt;/li>
&lt;/ul></description></item></channel></rss>