<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Brenner Cruvinel - mvp</title>
    <subtitle>AI researcher and product designer building at the edge of computer science and mental health.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://brennercruvinel.blog/en/tags/mvp/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://brennercruvinel.blog"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-02-10T00:00:00+00:00</updated>
    <id>https://brennercruvinel.blog/en/tags/mvp/atom.xml</id>
    <entry xml:lang="en">
        <title>Hoff MVP: blocking addiction sites in /etc/hosts</title>
        <published>2026-02-10T00:00:00+00:00</published>
        <updated>2026-02-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            Brenner Cruvinel
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://brennercruvinel.blog/en/blog/hoff-mvp-bloqueio-hosts/"/>
        <id>https://brennercruvinel.blog/en/blog/hoff-mvp-bloqueio-hosts/</id>
        
        <content type="html" xml:base="https://brennercruvinel.blog/en/blog/hoff-mvp-bloqueio-hosts/">&lt;p&gt;Cleaning up the Hoff repository, I found the very first proof of concept. The goal was to block pornography sites and the like for a close friend who was struggling with this &lt;a href=&quot;https://brennercruvinel.blog/en/blog/vicios-dopaminergicos-digitais/&quot;&gt;addiction&lt;/a&gt;, which is silent and marginalized. It was the initial inspiration for everything. Finding it again was moving.&lt;/p&gt;
&lt;p&gt;It is the rawest MVP possible: no app, just the hosts file. The idea is to point the domain to loopback, so the computer tries to open the site on itself and finds nothing. And what matters most is keeping the way back, to restore the file when the block needs to come off.&lt;/p&gt;
&lt;h2 id=&quot;blocking&quot;&gt;Blocking&lt;/h2&gt;
&lt;p&gt;Each line in &lt;code&gt;/etc/hosts&lt;/code&gt; says &quot;this name resolves to this address&quot;. To block, the address is the machine itself:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;127.0.0.1   example.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;127.0.0.1   www.example.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You need one line for each variation of the domain, with and without &lt;code&gt;www&lt;/code&gt;. On macOS, after editing, it is worth flushing the DNS cache so the change takes effect right away:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#268BD2, #268BD2);&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; dscacheutil&lt;/span&gt;&lt;span style=&quot;color: light-dark(#CB4B16, #CB4B16);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#CB4B16, #CB4B16);&quot;&gt;flushcache&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#268BD2, #268BD2);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; killall&lt;/span&gt;&lt;span style=&quot;color: light-dark(#CB4B16, #CB4B16);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#CB4B16, #CB4B16);&quot;&gt;HUP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; mDNSResponder&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is an honest block, but a fragile one: anyone with the administrator password undoes it in seconds. Even so, it is one more bit of friction between the impulse and the click.&lt;/p&gt;
&lt;h2 id=&quot;restoring-hosts-on-macos&quot;&gt;Restoring hosts on macOS&lt;/h2&gt;
&lt;p&gt;Overwrites &lt;code&gt;/etc/hosts&lt;/code&gt; with the default macOS content:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#268BD2, #268BD2);&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; sh&lt;/span&gt;&lt;span style=&quot;color: light-dark(#CB4B16, #CB4B16);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#CB4B16, #CB4B16);&quot;&gt;c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;echo &amp;quot;##&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;# Host Database&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;#&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;# localhost is used to configure the loopback interface&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;# when the system is booting.  Do not change this entry.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;##&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;127.0.0.1       localhost&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;255.255.255.255 broadcasthost&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;::1             localhost&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;&amp;quot; &amp;gt; /etc/hosts&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;restoring-hosts-on-windows&quot;&gt;Restoring hosts on Windows&lt;/h2&gt;
&lt;p&gt;Open PowerShell as administrator. This command appends the localhost entries to the end of the file, without deleting the rest:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot; &gt;&lt;code data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#268BD2, #268BD2);&quot;&gt;Start-Process&lt;/span&gt;&lt;span&gt; powershell &lt;/span&gt;&lt;span style=&quot;color: light-dark(#859900, #859900);&quot;&gt;-&lt;/span&gt;&lt;span&gt;Verb runAs &lt;/span&gt;&lt;span style=&quot;color: light-dark(#859900, #859900);&quot;&gt;-&lt;/span&gt;&lt;span&gt;ArgumentList &lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value &amp;#39;127.0.0.1 localhost&amp;#39;, &amp;#39;::1 localhost&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To really remove the block, you need to overwrite the whole file, not just append:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot; &gt;&lt;code data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#268BD2, #268BD2);&quot;&gt;Start-Process&lt;/span&gt;&lt;span&gt; powershell &lt;/span&gt;&lt;span style=&quot;color: light-dark(#859900, #859900);&quot;&gt;-&lt;/span&gt;&lt;span&gt;Verb runAs &lt;/span&gt;&lt;span style=&quot;color: light-dark(#859900, #859900);&quot;&gt;-&lt;/span&gt;&lt;span&gt;ArgumentList &lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;Set-Content -Path C:\Windows\System32\drivers\etc\hosts -Value &amp;#39;127.0.0.1 localhost&lt;/span&gt;&lt;span style=&quot;color: light-dark(#CB4B16, #CB4B16);&quot;&gt;`n&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;::1 localhost&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
</feed>
