gitmyhub

dasan-router-cli

Go ★ 2 updated 26d ago

CLI and Prometheus exporter for the Dasan/Airtel H660GM-A GPON router

dasan-router-cli is a fast command line tool and Prometheus exporter for managing a Dasan or Airtel H660GM-A home router instead of its slow web interface.

GoCobraDockerPrometheussetup: moderatecomplexity 3/5

dasan-router-cli is a fast command line tool for managing a specific home internet router model, the Dasan or Airtel H660GM-A GPON router, as an alternative to its slow web based admin page. Instead of clicking through the router's browser interface, this tool talks directly to the same internal data endpoints that the router's own web frontend uses, letting you check status and change settings much faster from a terminal.

The tool covers a wide range of router functions: viewing device information like uptime, CPU, memory, and optical signal stats, checking WAN and LAN connection status, listing connected devices, managing WiFi networks including renaming them, changing passwords, turning radios off, and setting MAC address filters, configuring firewall features like port forwarding, DMZ, parental controls, and UPnP, viewing maintenance information such as firmware version and system logs, and downloading a configuration backup. Credentials can be supplied as command flags, environment variables, or saved once so future commands work automatically without extra typing.

Alongside the command line tool, the project also includes a built in Prometheus metrics exporter, which is a small background service that regularly polls the router and exposes 21 different measurements in a format monitoring tools like Grafana can graph over time. It ships as a very small Docker image and can be run alongside a ready made Grafana dashboard for visualizing the router's health.

The README is candid about the tool's limitations, since much of it was built by reverse engineering the router's own web interface rather than from official documentation. Some settings, like enabling UPnP or adding MAC filter entries, appear to succeed on this particular router but do not actually save, and the tool detects and warns about this instead of falsely reporting success. Certain advanced features are also gated behind account permissions the author's test unit did not have. This project is aimed at developers and home network enthusiasts who own this specific router model and want faster, scriptable control over it than the web interface allows.

Where it fits