{"id":50299521,"url":"https://github.com/nuriofernandez/movistarapi","last_synced_at":"2026-05-28T11:32:16.329Z","repository":{"id":355911322,"uuid":"638072376","full_name":"nuriofernandez/movistarapi","owner":"nuriofernandez","description":"🌐 Go library to manipulate/operate Movistar router settings/actions. 🧮","archived":false,"fork":false,"pushed_at":"2026-05-13T01:19:49.000Z","size":57,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-13T02:34:26.523Z","etag":null,"topics":["api","askey","golang","library","movistar","router"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuriofernandez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-09T02:54:29.000Z","updated_at":"2026-05-13T01:19:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nuriofernandez/movistarapi","commit_stats":null,"previous_names":["nuriofernandez/movistarapi"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nuriofernandez/movistarapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuriofernandez%2Fmovistarapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuriofernandez%2Fmovistarapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuriofernandez%2Fmovistarapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuriofernandez%2Fmovistarapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuriofernandez","download_url":"https://codeload.github.com/nuriofernandez/movistarapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuriofernandez%2Fmovistarapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33607334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","askey","golang","library","movistar","router"],"created_at":"2026-05-28T11:32:16.273Z","updated_at":"2026-05-28T11:32:16.324Z","avatar_url":"https://github.com/nuriofernandez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e ⚠️ _Currently under development, expect breaking changes in the future._\n\n# Movistar unofficial router api\n\nThis library allows to manipulate the movistar router from GO code.\n\n- Tested on Askey RTF3505VW\n\n\u003cimg width=\"836\" height=\"393\" alt=\"image\" src=\"https://github.com/user-attachments/assets/11ac9c94-ef63-41e7-b467-4d841def9bb1\" /\u003e\n\n# Implemented features\n\n- movistarapi.HGULogin(routerPassword string) (*HGUSession, error)\n- HGUSession#Restart() (error)\n- HGUSession#LocalMap() ([]ConnectedDevice, error)\n- HGUSession#OpenPorts() ([]OpenPort, error)\n- HGUSession#OpenPort(OpenPort) (error)\n- HGUSession#UpdatePort(OpenPort) (error)\n- HGUSession#DeletePort(int, string) (error)\n## Example usage to open a port (creating a NAT rule)\n\n```go\nhguRouter, err := movistarapi.HGULogin(routerPass)\nif err != nil {\n\tfmt.Println(\"invalid pass\")\n    return\n}\nerr = hguRouter.OpenPort(hgu.OpenPort{\n\t\tName:              \"rule-name\",\n\t\tProtocol:          hgu.TCP, // TCP/UDP/BOTH\n\t\tAddress:           \"192.168.1.100\",\n\t\tExternalPortStart: 80,\n\t\tExternalPortEnd:   0, // optional\n\t\tInternalPortStart: 80,\n\t\tEnabled:           true,\n\t\tInterface:         \"ppp0.1\",\n})\nif err != nil {\n    fmt.Println(err)\n    return\n}\nfmt.Println(\"Port was open!\")\n```\n\n## Example usage to update a NAT rule\n\n```go\nhguRouter, err := movistarapi.HGULogin(routerPass)\nif err != nil {\n\tfmt.Println(\"invalid pass\")\n    return\n}\n\n// Fetch rules and search a rule we want to update by name\nports, err := hguRouter.OpenPorts()\nif err != nil {\n    fmt.Println(err)\n    return\n}\nvar openPort hgu.OpenPort\nfor _, existingPort := range ports {\n    if existingPort.Name == \"RULE-NAME\" {\n        openPort = existingPort\n    }\n}\nif openPort == (hgu.OpenPort{}) {\n    fmt.Println(err)\n    return\n}\n\n// Modify the rule\nopenPort.Enabled = false\nopenPort.Name = \"NEW-RULE-NAME\"\n\n// Update the rule with HGUSession#UpdatePort(OpenPort)\nerr = hguRouter.UpdatePort(openPort)\nif err != nil {\n    fmt.Println(err)\n    return\n}\nfmt.Println(\"NAT rule was disabled and renamed!\")\n```\n\n## Example usage to delete a NAT rule\n\n```go\nhguRouter, err := movistarapi.HGULogin(routerPass)\nif err != nil {\n\tfmt.Println(\"invalid pass\")\n    return\n}\n\n// Fetch rules and search a rule we want to delete by name\nports, err := hguRouter.OpenPorts()\nif err != nil {\n    fmt.Println(err)\n    return\n}\nvar openPort hgu.OpenPort\nfor _, existingPort := range ports {\n    if existingPort.Name == \"RULE-NAME\" {\n        openPort = existingPort\n    }\n}\nif openPort == (hgu.OpenPort{}) {\n    fmt.Println(err)\n    return\n}\n\n// Delete the rule with HGUSession#DeletePort(int, string)\nerr = hguRouter.DeletePort(openPort.Id, openPort.Interface)\nif err != nil {\n    fmt.Println(err)\n    return\n}\nfmt.Println(\"NAT rule was deleted!\")\n```\n\n## Example usage as a CLI:\n\n```go\nfunc main() {\n\tfmt.Println(\"Welcome to the Unofficial Movistar router control CLI!\")\n\n\t// Ensure the user actually typed something\n\tif len(os.Args) \u003c 2 {\n\t\tfmt.Println(\"Invalid command\")\n\t\tfmt.Println(\"Usage: binary \u003crouter-password\u003e\")\n\t\treturn\n\t}\n\n\t// Store router password\n\tpassword := os.Args[1]\n\n\t// Prepare login\n\tfmt.Println(\"Logging in...\")\n\thguRouter, err := movistarapi.HGULogin(password)\n\tif err != nil {\n\t\tfmt.Println(\"Unable to login, \" + err.Error())\n\t\treturn\n\t}\n\tfmt.Println(\"Successfully logged in\")\n\n\t// Prepare to restart router\n\tfmt.Println(\"Restarting Movistar HGU router...\")\n\terr = hguRouter.Reboot()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfmt.Println(\"Gone!\")\n}\n```\n\n## Example output\n\n```bash\n$ movistarcli routerpass123\n\nWelcome to the Unofficial Movistar router control CLI!\nLogging in...\nSuccessfully logged in\nRestarting Movistar HGU router...\nGone!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuriofernandez%2Fmovistarapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuriofernandez%2Fmovistarapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuriofernandez%2Fmovistarapi/lists"}