This is a simple program that can be used to update the dynamic seedbox ip on MAM. It periodically checks the external ip and, in case a change is detected, it calls MAM APIs to update it. I wrote it using rust, as a lightweight alternative to mousehole. There is also a web UI, which lets you update the MAM cookie, check when the ip was last updated, and manually request an update. The web UI is optional, and is deployed using a separate container.
The configuration is a yaml file. You can check the template
The cookies can be persisted. As far as I can see, you don't need to do this, you can keep using the initial MAM
cookie. However, if you want to, you can mount the cookies.json file as shown in the comment in the next section.
Keep in mind that the configuration takes precendence over the stored cookies, so you need to remove it in order
for the persisted cookie to be loaded.
These are some docker compose templates to run qbittorrent + gluetun + squeaky updater. They are configured for ProtonVPN, so change it with your vpn configuration. Check gluetun-wiki for more information.
services:
gluetun:
image: qmcgaw/gluetun:v3.41
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
ports:
- 8081:8081/tcp
environment:
- VPN_SERVICE_PROVIDER=protonvpn
- VPN_TYPE=wireguard
- WIREGUARD_PRIVATE_KEY=<your_key_here>
- WIREGUARD_ADDRESSES=10.2.0.2/32
- SERVER_COUNTRIES=Netherlands
- VPN_PORT_FORWARDING=on
- PORT_FORWARD_ONLY=on
- VPN_PORT_FORWARDING_PROVIDER=protonvpn
- VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":{{PORTS}}}" http://127.0.0.1:8081/api/v2/app/setPreferences 2>&1'
restart: unless-stopped
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=UTC
- WEBUI_PORT=8081
volumes:
- ./config:/config/qBittorrent
- /share/:/share # This is where the torrents are downloaded
restart: unless-stopped
depends_on:
gluetun:
condition: service_healthy
network_mode: "service:gluetun"
mamseedbox:
image: fballer/squeaky_updater
user: 1000:1000
container_name: seedboxapi
network_mode: "service:gluetun"
restart: unless-stopped
depends_on:
gluetun:
condition: service_healthy
environment:
- RUST_LOG=info
volumes:
- ./config.yaml:/app/config.yaml # this is your configuration files, which needs to contain your initial MAM cookie
# - ./coookies.json:/app/cookies.json # This is the cookie store used to persist cookies on disk. Uncomment and create an empty file to enable
services:
gluetun:
image: qmcgaw/gluetun:v3.41
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
ports:
- 8081:8081/tcp
- 8558:8558/tcp
environment:
- VPN_SERVICE_PROVIDER=protonvpn
- VPN_TYPE=wireguard
- WIREGUARD_PRIVATE_KEY=<your_key_here>
- WIREGUARD_ADDRESSES=10.2.0.2/32
- SERVER_COUNTRIES=Netherlands
- VPN_PORT_FORWARDING=on
- PORT_FORWARD_ONLY=on
- VPN_PORT_FORWARDING_PROVIDER=protonvpn
- VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":{{PORTS}}}" http://127.0.0.1:8081/api/v2/app/setPreferences 2>&1'
restart: unless-stopped
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=UTC
- WEBUI_PORT=8081
volumes:
- ./config:/config/qBittorrent
- /share/:/share # This is where the torrents are downloaded
restart: unless-stopped
depends_on:
gluetun:
condition: service_healthy
network_mode: "service:gluetun"
squeaky_updater:
image: fballer/squeaky_updater
user: 1000:1000
container_name: squeaky_updater
network_mode: "service:gluetun"
restart: unless-stopped
depends_on:
gluetun:
condition: service_healthy
environment:
- RUST_LOG=info
volumes:
- ./config.yaml:/app/config.yaml # this is your configuration files, which needs to contain your initial MAM cookie
- SQUEAKY_BIND_ADDR=127.0.0.1:8944
# - ./coookies.json:/app/cookies.json # This is the cookie store used to persist cookies on disk. Uncomment and create an empty file to enable
squeaky_webui:
image: fballer/squeaky_webui
container_name: squeaky_webui
network_mode: "service:gluetun"
restart: unless-stopped
depends_on:
gluetun:
condition: service_healthy
This configuration will listen on port 8558, so if you are running it on the local machine you can access the webui at http://127.0.0.1:8558.
There are APIs to change the mam_id cookie, to manually trigger the IP update, and to get the current status.
These APIs are used by the web UI, and are only available if you specify as bind address in the configuration,
so if you don't plan on using the web UI or the APIs you can save some resources. Since the code is pretty
straightforward, and honestly I'm not sure how many people will want to use the APIs anyway, you can check
it directly, starting from api/mod.rs which registers the routes. If you find
yourself unable to understand it, feel free to open an issue and I will answer as soon as I can.
Content type
Image
Digest
sha256:215210202…
Size
11.2 MB
Last updated
8 months ago
docker pull fballer/squeaky_webui