<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Jalil&#39;s Blog - programming</title>
    <subtitle>Jalil&#39;s Blog where he explains stuff he has been working on... maybe...</subtitle>
    <link rel="self" type="application/atom+xml" href="https://jalil.salame.cl/tags/programming/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://jalil.salame.cl"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-01-23T00:00:00+00:00</updated>
    <id>https://jalil.salame.cl/tags/programming/atom.xml</id>
    <entry xml:lang="en">
        <title>Package repositories and mirroring</title>
        <published>2026-01-23T00:00:00+00:00</published>
        <updated>2026-01-23T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jalil.salame.cl/blog/packages-and-mirrors/"/>
        <id>https://jalil.salame.cl/blog/packages-and-mirrors/</id>
        
        <summary type="html">&lt;p&gt;Modern programming languages include package managers and package repositories,
but they seem to forget about the learnings from older system package managers
that are system package managers and the tool they use to reduce the load on
their infrastructure: repository mirrors.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Building WebNSUpdate</title>
        <published>2025-10-05T00:00:00+00:00</published>
        <updated>2025-10-05T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jalil.salame.cl/blog/webnsupdate-progress/"/>
        <id>https://jalil.salame.cl/blog/webnsupdate-progress/</id>
        
        <content type="html" xml:base="https://jalil.salame.cl/blog/webnsupdate-progress/">&lt;p&gt;I have&#39;t been programming much outside of work. Mostly &#39;cause life&#39;s gotten in
the way, but also, my personal project, &lt;a rel=&quot;nofollow noreferrer external&quot; title=&quot;WebNSUpdate source
code on GitHub&quot; href=&quot;https://github.com/jalil-salame/webnsupdate&quot;&gt;&lt;code&gt;webnsupdate&lt;/code&gt;&lt;/a&gt;, has been very stable
lately so I haven&#39;t needed to do anything to it.&lt;/p&gt;
&lt;h2 id=&quot;my-self-hosting-journey&quot;&gt;My self-hosting journey&lt;/h2&gt;
&lt;p&gt;I&#39;ve been self-hosting some things since I got my Raspberry Pi 4 around 2022,
but I only really got into it once I switched to NixOS and got a small mini PC
to become a more powerful server.&lt;/p&gt;
&lt;p&gt;When I started self-hosting I didn&#39;t have an income, I got some money working as
a student assistant at University which is how I saved enough to buy the
Raspberry Pi 4, but I didn&#39;t have enough money nor the need to justify paying
for a VPS provider and a static IP address. So I used free services like CloudNS
and &lt;a rel=&quot;nofollow noreferrer external&quot; href=&quot;https://freedns.afraid.org/&quot;&gt;freedns.afraid.org&lt;/a&gt; to connect to my server
while it was behind a Dynamic IP.&lt;/p&gt;
&lt;p&gt;I eventually graduated and started earning a decent income so I got myself a
Mini PC and started running more services which meant I ran out of free
subdomains on the mentioned services. Around that time I got this domain
(salame.cl), since I had to help my Dad buy his own domain, and I decided it
would be fun to self-host my own Dynamic DNS service.&lt;/p&gt;
&lt;p&gt;My searching skills must&#39;ve gotten rusty since I failed to find any open source
project that did something like this, so I made my own in Rust, and that&#39;s how
we got &lt;a rel=&quot;nofollow noreferrer external&quot; title=&quot;WebNSUpdate source
code on GitHub&quot; href=&quot;https://github.com/jalil-salame/webnsupdate&quot;&gt;&lt;code&gt;webnsupdate&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;basic-architecture&quot;&gt;Basic architecture&lt;/h2&gt;
&lt;p&gt;Now I might be implementing my own DynDNS service, but since I would be relying
on it for my self-hosted CI and Git server I wanted it to be as reliable as
possible. Which meant not implementing a DNS server, instead I created a small
web interface to BIND 9&#39;s &lt;code&gt;nsupdate&lt;/code&gt; CLI tool, this way the heavy lifting is
done by the much better tested BIND 9 server, and the only thing &lt;a rel=&quot;nofollow noreferrer external&quot; title=&quot;WebNSUpdate source
code on GitHub&quot; href=&quot;https://github.com/jalil-salame/webnsupdate&quot;&gt;&lt;code&gt;webnsupdate&lt;/code&gt;&lt;/a&gt;
handles is the updates to the Dynamic IP.&lt;/p&gt;
&lt;p&gt;WebNSUpdate takes care of requests to the &lt;code&gt;/update&lt;/code&gt; endpoint by checking the IP
of the request (usually the right-most IP in the &lt;code&gt;X-Forwarded-for&lt;/code&gt; header set by
nginx) and verifying the password set in HTTP Basic Auth, then forwarding the IP
to &lt;code&gt;nsupdate&lt;/code&gt; and making it update the BIND zone file.&lt;/p&gt;
&lt;p&gt;WebNSUpdate intentionally doesn&#39;t handle HTTPS traffic. Since I&#39;m the only one
maintaining it I didn&#39;t want to mess something up by misconfiguring it or having
to scramble to update it since a Rust library had a high-severity vulnerability.
This is why you are expected to run it behind a reverse proxy like Caddy or
nginx.&lt;/p&gt;
&lt;p&gt;I did have to store a password since I didn&#39;t want anyone hitting the &lt;code&gt;/update&lt;/code&gt;
endpoint being able to trigger an update to my DNS server, but since the systemd
unit doesn&#39;t run as root there is not much damage that can be done through this
service.&lt;/p&gt;
&lt;h2 id=&quot;challenges&quot;&gt;Challenges&lt;/h2&gt;
&lt;p&gt;The &quot;It&#39;s always DNS&quot; meme is way too accurate, I&#39;ve had many issues with DNS
and with how it interacts with IPv6. That and the propagation potentially taking
days is rough for testing.&lt;/p&gt;
&lt;p&gt;Having NixOS integration tests is great though, I can test some common
configurations using full VMs instead of simple integration tests. I do still
come across issues in my production server that the tests didn&#39;t catch, but they
do make me way more confident that by the time I push an update the basic
functionality is there.&lt;/p&gt;
&lt;p&gt;I do want to create a coverage report to help with testing more of the codebase,
I know I have some blindspots in my testsuite, but I would like something more
substantial than a gut feeling to keep track of the untested code.&lt;/p&gt;
&lt;h2 id=&quot;future-work&quot;&gt;Future Work&lt;/h2&gt;
&lt;p&gt;Some things I&#39;d like to add are:&lt;/p&gt;
&lt;h3 id=&quot;multi-user-support&quot;&gt;Multi-user support&lt;/h3&gt;
&lt;p&gt;Currently I have a single password that allows updating all domains, since I
only have one machine this works fine, but for it to be easier to host for a
group of friends or similar, it would be better if you couldn&#39;t accidentally
point someone else&#39;s domain to your server.&lt;/p&gt;
&lt;p&gt;I already started work on this by allowing multiple DynIP records allowing
different machines to use the same webnsupdate server, but they still must share
the same password.&lt;/p&gt;
&lt;h3 id=&quot;extended-avm-fritzbox-router-support&quot;&gt;Extended AVM FritzBox Router support&lt;/h3&gt;
&lt;p&gt;Here in Germany, AVM&#39;s FritzBox routers are very popular and they have some nice
features like automatic DynDNS handling; you can give them a URL to send a GET
request once they get a new IP address. They even allow for templating of Query
Parameters so you can set the IP it was updated to and other useful information.&lt;/p&gt;
&lt;p&gt;I would like to test this area more thoroughly and start making use of it.&lt;/p&gt;
&lt;h3 id=&quot;use-ipv6-in-production&quot;&gt;Use IPv6 in production&lt;/h3&gt;
&lt;p&gt;IPv6 has been a headache, but I would like to start using it in my own server.
For this I probably want to have more confidence in my testsuite first since
issues with DNS are annoying to solve.&lt;/p&gt;
&lt;h3 id=&quot;writing-documentation&quot;&gt;Writing Documentation&lt;/h3&gt;
&lt;p&gt;I&#39;d like to have some public docs I could point people (and my future self) to
so the information in this blog post and more details would be easily accessible
to them.&lt;/p&gt;
&lt;p&gt;Ideally this would ensure people can install it outside NixOS without issues.&lt;/p&gt;
&lt;h3 id=&quot;publishing-the-project&quot;&gt;Publishing the project&lt;/h3&gt;
&lt;p&gt;I should publish the project to crates.io and nixpkgs at least and make a public
announcement so people know it exists and is ready to be used.&lt;/p&gt;
&lt;h2 id=&quot;final-thoughts&quot;&gt;Final thoughts&lt;/h2&gt;
&lt;p&gt;Honestly, none of that sounds very exciting, but I&#39;m very proud of my project
and the end result would be learinig a bunch of useful things.&lt;/p&gt;
&lt;p&gt;I don&#39;t know where this will end up, but maybe check back in a year and things
might have been done? Maybe that&#39;s a bit too optimistic...&lt;/p&gt;
&lt;p&gt;Hope this was fun to read through, I decided I needed to write something for my
blog and get some practice with my new keyboard so I wrote this.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Direnv and Nix devShells: A match made in heaven</title>
        <published>2024-02-10T00:00:00+00:00</published>
        <updated>2024-02-10T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jalil.salame.cl/blog/nix-devshells/"/>
        <id>https://jalil.salame.cl/blog/nix-devshells/</id>
        
        <summary type="html">&lt;p&gt;I use &lt;a rel=&quot;nofollow noreferrer external&quot; title=&quot;NixOS&quot; href=&quot;https://nixos.org&quot;&gt;NixOS&lt;/a&gt; since last year and I recently started making use of
&lt;code&gt;devShells&lt;/code&gt; (development shells). They are very useful and more people should
know about them! Especially when used in combination with &lt;a rel=&quot;nofollow noreferrer external&quot; title=&quot;direnv GitHub&quot; href=&quot;https://github.com/direnv/direnv&quot;&gt;&lt;code&gt;direnv&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>N-Sudoku Solver</title>
        <published>2023-03-21T00:00:00+00:00</published>
        <updated>2023-03-21T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jalil.salame.cl/blog/nsudoku-solver/"/>
        <id>https://jalil.salame.cl/blog/nsudoku-solver/</id>
        
        <summary type="html">&lt;p&gt;This is an in progress blog post about my sudoku solver:
&lt;a rel=&quot;nofollow noreferrer external&quot; href=&quot;https://github.com/jalil-salame/nsudoku-solver&quot;&gt;nsudoku-solve&lt;/a&gt;&lt;/p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>(WIP) Rust SAT-solver</title>
        <published>2023-03-04T00:00:00+00:00</published>
        <updated>2023-03-04T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://jalil.salame.cl/blog/rsat/"/>
        <id>https://jalil.salame.cl/blog/rsat/</id>
        
        <summary type="html">&lt;p&gt;This is a (WIP) post about my (WIP) SAT solver:
&lt;a rel=&quot;nofollow noreferrer external&quot; href=&quot;https://github.com/jalil-salame/rsat&quot;&gt;rsat&lt;/a&gt;&lt;/p&gt;</summary>
        
    </entry>
</feed>
