I have a GL.iNet AR-150 router that I bought from here. It is running OpenWrt. The variant that I chose is the one with an external antenna.
I did write a shell script for manipulating the GPIOs. But I lost it(lol). I even implemented an abstraction for the shift register(74HC595). The idea is that the output pins of the shift register could be easily manipulated without thinking of the details. The shift register is for extending the number of the output pins of the router as it only has 4 free GPIOs. If you want some details how shift registers work, here is a good video by Kevin Darrah.
Just as I said that I lost the shell script(It is relatively slower anyway), I decided to rewrite it in Golang(I did choose between it and C). But I haven’t implemented the abstraction of the shift register yet. That part will come later. What I got so far are just methods for manipulating the native GPIOs. Here is the link for the github repository for it.