{"id":19253041,"url":"https://github.com/afiestas/gluetun-sync","last_synced_at":"2025-04-11T12:13:49.214Z","repository":{"id":193841479,"uuid":"685052463","full_name":"afiestas/gluetun-sync","owner":"afiestas","description":"Gluetun-Sync is an open-source utility designed to automatically update your services when the NAT port changes in Gluetun VPN","archived":false,"fork":false,"pushed_at":"2024-09-25T09:01:48.000Z","size":52,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T12:45:24.364Z","etag":null,"topics":["gluetun","hooks","http","slack","sync","synchronisation","synchronization","torrent","webhooks"],"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/afiestas.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}},"created_at":"2023-08-30T12:16:45.000Z","updated_at":"2025-01-12T18:24:35.000Z","dependencies_parsed_at":"2023-09-10T11:38:14.366Z","dependency_job_id":null,"html_url":"https://github.com/afiestas/gluetun-sync","commit_stats":null,"previous_names":["afiestas/gluetun-sync"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiestas%2Fgluetun-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiestas%2Fgluetun-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiestas%2Fgluetun-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiestas%2Fgluetun-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afiestas","download_url":"https://codeload.github.com/afiestas/gluetun-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248398947,"owners_count":21097295,"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":["gluetun","hooks","http","slack","sync","synchronisation","synchronization","torrent","webhooks"],"created_at":"2024-11-09T18:29:18.558Z","updated_at":"2025-04-11T12:13:49.192Z","avatar_url":"https://github.com/afiestas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gluetun-Sync\n\n![Build](https://github.com/afiestas/gluetun-sync/actions/workflows/main.yml/badge.svg)\n![License](https://img.shields.io/badge/license-MIT-blue)\n![Version](https://img.shields.io/badge/version-1.0.0-orange)\n[![Go Report Card](https://goreportcard.com/badge/github.com/afiestas/gluetun-sync)](https://goreportcard.com/report/github.com/afiestas/gluetun-sync)\n\nGluetun-Sync is an open-source utility designed to automatically update your services when the NAT port changes in Gluetun VPN.\nBuilt to run seamlessly alongside Gluetun, this tool monitors port changes and triggers HTTP requests to update the relevant services or send notifications.\n\n## Features\n\n- **Auto Monitoring**: Continuously watches Gluetun for port changes.\n- **Configurable Actions**: HTTP requests to update services or send notifications.\n- **Authenticated actions**: HTTP requests are executed in series and cookies/authorization headers are carried on\n- **Flexible Configuration**: Support for JSON, TOML, and YAML configuration files.\n- **Docker Friendly**: Designed to run in a Docker container.\n\n## Installation\n### Go get\n```bash\ngo get -u github.com/afiestas/gluetun-sync\n```\n\n### Container/Docker\n```bash\ndocker run ...\n```\n\n\n## Configuration\n\nThe service can be configured using JSON, TOML, or YAML configuration files.\nThe URL and payload fields can be configured using a Go template to include either\nthe provided credentials or the port.\n\n- Username\n- Password\n- Port\n\nHere is an example using YAML for a service that requires login\n\n### config.yml\n```yaml\nport-file: \"/tmp/portfile\"\nrequests:\n  - someservice:\n      credentials:\n        username: \"admin\"\n        password: \"password\"\n      requests:\n        - method: \"POST\"\n          url: \"http://localhost:8080/api/v2/auth/login\"\n          payload: \"username={{.Username}}\u0026password={{.Password}}\"\n          content-type: \"application/x-www-form-urlencoded\"\n        - method: \"POST\"\n          url: \"http://localhost:8080/api/v2/app/setPreferences\"\n          payload: \"json={\\\"listen_port\\\": \\\"{{.Port}}\\\"}\"\n          content-type: \"application/x-www-form-urlencoded\"\n```\n\n### config.toml\nExample in TOML for slack webhook\n```toml\n[[requests]]\n  [requests.slack]\n    [[requests.slack.requests]]\n      method = \"POST\"\n      url = \"https://hooks.slack.com/services/your/webhook/url\"\n      payload = \"{\\\"text\\\":\\\"New Port: {{.Port}}\\\"}\"\n      content-type = \"application/json\"\n```\n\nIf you have some configuration that you want to share please issue a PR and we'll add it\nto the `config/` folder as an example.\n\n## Usage\n\nA config file is required for the list of requests, the port file can easily be indicated\nvia arguments\n\n```bash\ngluetun-sync --port-file /portfile\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafiestas%2Fgluetun-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafiestas%2Fgluetun-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafiestas%2Fgluetun-sync/lists"}