{"id":15706548,"url":"https://github.com/qdm12/updated","last_synced_at":"2025-05-12T15:39:51.554Z","repository":{"id":57560165,"uuid":"157561027","full_name":"qdm12/updated","owner":"qdm12","description":"Go program to update files periodically","archived":false,"fork":false,"pushed_at":"2023-03-07T01:04:43.000Z","size":257,"stargazers_count":5,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T23:42:49.965Z","etag":null,"topics":["block-list","dns","docker","go","golang"],"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/qdm12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["qdm12"]}},"created_at":"2018-11-14T14:29:09.000Z","updated_at":"2023-06-14T00:32:19.000Z","dependencies_parsed_at":"2024-06-18T22:46:47.686Z","dependency_job_id":"190f4733-46e8-4ac4-801a-39f454669501","html_url":"https://github.com/qdm12/updated","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fupdated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fupdated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fupdated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fupdated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qdm12","download_url":"https://codeload.github.com/qdm12/updated/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249909182,"owners_count":21343932,"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":["block-list","dns","docker","go","golang"],"created_at":"2024-10-03T20:24:15.487Z","updated_at":"2025-04-20T14:30:31.566Z","avatar_url":"https://github.com/qdm12.png","language":"Go","funding_links":["https://github.com/sponsors/qdm12"],"categories":[],"sub_categories":[],"readme":"# Updated\r\n\r\n*Go program to update and push files periodically to a Git repository*\r\n\r\n[![updated](https://github.com/qdm12/updated/raw/master/title.png)](https://hub.docker.com/r/qmcgaw/updated)\r\n\r\n[![GitHub last commit](https://img.shields.io/github/last-commit/qdm12/updated.svg)](https://github.com/qdm12/updated/issues)\r\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/qdm12/updated.svg)](https://github.com/qdm12/updated/issues)\r\n[![GitHub issues](https://img.shields.io/github/issues/qdm12/updated.svg)](https://github.com/qdm12/updated/issues)\r\n\r\n## Features\r\n\r\n- Periodically builds\r\n    - A list of unique malicious hostnames\r\n    - A list of unique malicious IP addresses\r\n    - A list of unique ads hostnames\r\n    - A list of unique surveillance hostnames\r\n    - InterNIC's named roots for DNS resolvers\r\n    - Root anchors XML for DNS resolvers\r\n    - Root keys to be used by Unbound\r\n- Optionally upload the changes to a Git repository using an SSH key\r\n- Based on the Scratch image with a total uncompressed size of 15.4MB\r\n- Compatible with amd64 only although it is easily cross CPU compiled if needed\r\n\r\n## Setup\r\n\r\n### Using Docker (recommended)\r\n\r\n1. For bind mounting, create a `files` directory with the right permissions:\r\n\r\n    ```sh\r\n    mkdir files\r\n    chown 1000 files\r\n    chmod 700 files\r\n    ```\r\n\r\n1. Use the following command:\r\n\r\n    ```sh\r\n    docker run -d -v $(pwd)/files:/files qmcgaw/updated\r\n    ```\r\n\r\n    You can also use [docker-compose.yml](https://github.com/qdm12/updated/blob/master/docker-compose.yml) with:\r\n\r\n    ```sh\r\n    docker-compose up -d\r\n    ```\r\n\r\n    To use with Git, you will also need to bind mount some files:\r\n    - SSH key file at `/key` by default\r\n    - SSH key passphrase optionally at `/passphrase`, if your SSH key is encrypted\r\n    - SSH known hosts at `/known_hosts` by default, the default contains only Github key\r\n    And set their ownership to user ID `1000` also.\r\n\r\n1. Check logs with `docker logs updated` and update the image with `docker pull qmcgaw/updated`\r\n\r\n### Environment variables\r\n\r\nThis Go program only reads parameters from environment variables for ease of use with Docker.\r\n\r\n- Commonly used\r\n\r\n    | Environment variable | Default | Possible values | Description |\r\n    | --- | --- | --- | --- |\r\n    | `OUTPUT_DIR` | `./files` | Any absolute or relative directory path | Directory where files are written to |\r\n    | `PERIOD` | `24h` | Integer from `1` | Period in minutes between each run |\r\n    | `RESOLVE_HOSTNAMES` | `no` | `yes` or `no` | Resolve hostnames found to obtain IP addresses |\r\n    | `HTTP_TIMEOUT` | `3s` | *integer* from 1 | Default HTTP client timeout in milliseconds |\r\n    | `LOG_LEVEL` | `info` | `debug`, `info`, `warning`, `error` | Logging level |\r\n    | `TZ` | `America/Montreal` | *string* | Timezone |\r\n\r\n- Git operation\r\n\r\n    | Environment variable | Default | Possible values | Description |\r\n    | --- | --- | --- | --- |\r\n    | `GIT` | `no` | `yes` or `no` | Do Git operations or not |\r\n    | `GIT_URL` | | SSH Git URL address | SSH URL to the remote repository, used only if `GIT=yes` |\r\n    | `SSH_KEY` | `./key` | File path | File path containing your SSH key, only used if `GIT=yes` |\r\n    | `SSH_KEY_PASSPHRASE` | | File path | Optional file path containing your SSH key passphrase, only used if `GIT=yes`. **Does not work with OpenSSH keys** |\r\n\r\n- Checksums\r\n\r\n    | Environment variable | Default | Possible values | Description |\r\n    | --- | --- | --- | --- |\r\n    | `NAMED_ROOT_MD5` | `076cfeb40394314adf28b7be79e6ecb1` | MD5 hexadecimal sum or `\"\"` | Named root MD5 sum. Disables checking if empty |\r\n    | `ROOT_ANCHORS_SHA256` | `45336725f9126db810a59896ae93819de743c416262f79c4444042c92e520770` | SHA256 hexadecimal sum or `\"\"` | Root anchors SHA256 sum. Disables checking if empty |\r\n\r\n- Extras\r\n\r\n    | Environment variable | Default | Possible values | Description |\r\n    | --- | --- | --- | --- |\r\n    | `SHOUTRRR_SERVICES` | | One or more comma separated Shoutrrr URLs | Comma separated list of [Shoutrrr URLs](https://containrrr.dev/shoutrrr/services/overview/) |\r\n\r\n### Using Go\r\n\r\n1. Build the program\r\n\r\n    ```sh\r\n    go build cmd/updated/main.go -o updated\r\n    ```\r\n\r\n1. Depending on your system, change its permissions `chmod +x updated`\r\n1. Run the program `./updated`\r\n\r\n## Why\r\n\r\nThis container is used to periodically update files at [github.com/qdm12/files](https://github.com/qdm12/files) which are used by several other projects.\r\n\r\n## TODOs\r\n\r\n- [ ] Compress long repetitive files\r\n- [ ] Unit tests (no time sorry)\r\n- [ ] Version in json file with updated files\r\n- [ ] Use lists from Blockada\r\n\r\n## License\r\n\r\nThis repository is under an [MIT license](https://github.com/qdm12/updated/master/license)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqdm12%2Fupdated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqdm12%2Fupdated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqdm12%2Fupdated/lists"}