Skip to content

ChristianJacobsen/mouser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mouser

Dynamic seedbox IP reporter for MyAnonaMouse. Periodically checks the host's public IP and reports changes to MAM's dynamic seedbox API.

Based on the backend logic of t-mart/mousehole, rewritten in Rust.

Configuration

All configuration is via environment variables.

Variable Default Description
MOUSER_MAM_ID Initial MAM session cookie; seeds the state file on first run. To change it later, use the web UI or wipe the state file.
MOUSER_PORT 7878 HTTP server port
MOUSER_STATE_FILE /data/mouser/state.json Path to persistent state file
MOUSER_CHECK_INTERVAL 300 Seconds between IP checks
MOUSER_STALE_THRESHOLD 86400 Seconds before forcing a re-report
MOUSER_USER_AGENT mouser/<version> User-Agent for MAM API requests
LOG_LEVEL info Log level filter (debug, info, warn, error)

Web UI

A minimal web interface is served at the root path for managing cookies and triggering updates from a browser.

API

Method Endpoint Description
GET / Web UI for cookie management and manual updates
GET /health 200 if synced, 503 if stale/no cookie/last error
GET /state Current persistent state as JSON
PUT /state Update cookie: {"cookie": "..."}
POST /update Trigger immediate check/update cycle

Running

MOUSER_MAM_ID=your_mam_id MOUSER_STATE_FILE=/tmp/mouser.json cargo run

Docker

docker run -e MOUSER_MAM_ID=your_mam_id -v mouser-data:/data/mouser ghcr.io/christianjacobsen/mouser

Compose with Gluetun

services:
  gluetun:
    image: qmcgaw/gluetun
    cap_add: [NET_ADMIN]
    environment:
      - VPN_SERVICE_PROVIDER=your_provider
      - VPN_TYPE=wireguard
    ports:
      - 7878:7878

  mouser:
    image: ghcr.io/christianjacobsen/mouser:latest
    network_mode: service:gluetun
    environment:
      - MOUSER_MAM_ID=your_mam_id
    volumes:
      - mouser-data:/data/mouser

volumes:
  mouser-data:

About

Dynamic seedbox IP reporter for MyAnonaMouse

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors