{"id":16162676,"url":"https://github.com/slashtechno/api-failover","last_synced_at":"2025-03-18T22:31:12.059Z","repository":{"id":61521500,"uuid":"551724590","full_name":"slashtechno/api-failover","owner":"slashtechno","description":"Using the Cloudflare API to change DNS records to maximize uptime","archived":false,"fork":false,"pushed_at":"2024-01-01T14:25:19.000Z","size":134,"stargazers_count":9,"open_issues_count":4,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-28T12:33:31.938Z","etag":null,"topics":["api","cloudflare","fallback-server","hacktoberfest","server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slashtechno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-10-15T01:02:37.000Z","updated_at":"2024-11-21T15:33:10.000Z","dependencies_parsed_at":"2024-06-20T11:25:08.982Z","dependency_job_id":null,"html_url":"https://github.com/slashtechno/api-failover","commit_stats":{"total_commits":77,"total_committers":5,"mean_commits":15.4,"dds":"0.38961038961038963","last_synced_commit":"dd3e30928c13eb6f76312caac050d25de5e692b3"},"previous_names":["slashtechno/api-fallback"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashtechno%2Fapi-failover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashtechno%2Fapi-failover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashtechno%2Fapi-failover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashtechno%2Fapi-failover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slashtechno","download_url":"https://codeload.github.com/slashtechno/api-failover/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950927,"owners_count":20373664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","cloudflare","fallback-server","hacktoberfest","server"],"created_at":"2024-10-10T02:32:14.115Z","updated_at":"2025-03-18T22:31:11.744Z","avatar_url":"https://github.com/slashtechno.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# API-Failover  \n[![Continuous Integration](https://github.com/slashtechno/api-failover/actions/workflows/ci.yml/badge.svg)](https://github.com/slashtechno/api-failover/actions/workflows/ci.yml) [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/) [![Create and publish a Docker image](https://github.com/slashtechno/api-failover/actions/workflows/build-Docker-image.yml/badge.svg)](https://github.com/slashtechno/api-failover/actions/workflows/build-Docker-image.yml)   \nUsing the Cloudflare API to change DNS records to maximize uptime\n\n## Usage/Examples  \nNecessary data can be passed via environment vairables or CLI flags  \n```bash\napi-failover --primary 0.0.0.0,0.0.0.1,0.0.0.2 --backup 0.0.0.3,0.0.0.4,0.0.0.5 --cloudflareapitoken token --cloudflarezoneid CLOUDFLAREZONEID --recordname RECORDNAME\n# Is equivalent to \nCLOUDFLARE_API_TOKEN=\"token\" CLOUDFLARE_ZONE_ID=\"zoneid\" RECORD_NAME=\"RECORDNAME\" PRIMARY_IPs=\"0.0.0.0,0.0.0.1,0.0.0.2\" BACKUP_IPs=\"0.0.0.3,0.0.0.4,0.0.0.5\" api-failover\n# and\ndocker run -e CLOUDFLARE_API_TOKEN=\"token\" -e CLOUDFLARE_ZONE_ID=\"zoneid\" -e RECORD_NAME=\"RECORDNAME\" -e PRIMARY_IPs=\"0.0.0.0,0.0.0.1,0.0.0.2\" -e BACKUP_IPs=\"0.0.0.3,0.0.0.4,0.0.0.5\" -it --rm ghcr.io/slashtechno/api-failover\n```  \nFor full flag usage, run:   \n`api-failover --help`  \n### Pinging on Linux  \nIn some cases, an error may be thrown when the program attempts to ping the specified hosts. The simplest way to alleviate this is to run the program as root or in Docker.  \nFor more information, check the Linux section in the  [pro-bing](https://github.com/prometheus-community/pro-bing#linux) README\n## Installation  \n### Precompiled releases   \nPrecompiled releases are build automatically by Github Actions and can be downloaded from the [releases](https://github.com/slashtechno/api-failover/releases) page  \nAfter downloading for the appropriate platform, the program can be run directly  \n### Docker  \nDocker images can either be built locally, or pulled from the [Github Container Registry](https://github.com/slashtechno/api-failover/pkgs/container/api-failover)  \nAn advantage to running with Docker is that the software is isolated which can reduce the possiblity of errors. In addition, it can increase security.\nTo pull and run, the following commands can be used:\n```bash\ndocker pull ghcr.io/slashtechno/api-failover:latest \n# If the image isn't pulled manually, the following command will pull it automatically before running\ndocker run -e CLOUDFLARE_API_TOKEN=\"token\" -e CLOUDFLARE_ZONE_ID=\"zoneid\" -e RECORD_NAME=\"RECORDNAME\" -e PRIMARY_IPs=\"0.0.0.0,0.0.0.1,0.0.0.2\" -e BACKUP_IPs=\"0.0.0.3,0.0.0.4,0.0.0.5\" -it --rm ghcr.io/slashtechno/api-failover\n```  \n### Compiling locally  \nIn order to compile locally, Go must be installed  \n```bash\ngit clone https://github.com/slashtechno/api-failover/\ncd api-failover\ngo install\n```\n## Roadmap  \n- [ ] Add support for CNAME records  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashtechno%2Fapi-failover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslashtechno%2Fapi-failover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashtechno%2Fapi-failover/lists"}