🛡️ Synchronize AdGuard Home config to replicas

Go Go Report Card Coverage Status

AdGuardHome sync

Synchronize AdGuardHome config to a replica instance.

Current sync features

  • General Settings
  • Filters
  • Rewrites
  • Services
  • Clients

Install

go get -u github.com/bakito/adguardhome-sync

Prerequisites

Both the origin and replica mist be initially setup via the Adguard Home installation wizard.

Run

export ORIGIN_URL=https://192.168.1.2:3000
export ORIGIN_USERNAME=username
export ORIGIN_PASSWORD=password
export REPLICA_URL=http://192.168.1.3
export REPLICA_USERNAME=username
export REPLICA_PASSWORD=password

# run once
adguardhome-sync run

# run as daemon
adguardhome-sync run --cron "*/10 * * * *"

docker cli

docker run -d \
  --name=adguardhome-sync \
  -p 8080:8080 \
  -v /path/to/appdata/config/adguardhome-sync.yaml:/config/adguardhome-sync.yaml \
  --restart unless-stopped \
  quay.io/bakito/adguardhome-sync:latest

docker compose

config file

---
version: "2.1"
services:
  adguardhome-sync:
    image: quay.io/bakito/adguardhome-sync
    container_name: adguardhome-sync
    volumes:
      - /path/to/appdata/config/adguardhome-sync.yaml:/config/adguardhome-sync.yaml
    ports:
      - 8080:8080
    restart: unless-stopped

env

---
version: "2.1"
services:
  adguardhome-sync:
    image: quay.io/bakito/adguardhome-sync
    container_name: adguardhome-sync
    command: run
    environment:
      - ORIGIN_URL=https://192.168.1.2:3000
      - ORIGIN_USERNAME=username
      - ORIGIN_PASSWORD=password
      - REPLICA_URL=http://192.168.1.3
      - REPLICA_USERNAME=username
      - REPLICA_PASSWORD=password
      - REPLICA1_URL=http://192.168.1.4
      - REPLICA1_USERNAME=username
      - REPLICA1_PASSWORD=password
      - REPLICA1_APIPATH=/some/path/control
      - CRON=*/10 * * * * # run every 10 minutes
    ports:
      - 8080:8080
    restart: unless-stopped

Config file

location: $HOME/.adguardhome-sync.yaml

# cron expression to run in daemon mode. (default; "" = runs only once)
cron: "*/10 * * * *"

origin:
  # url of the origin instance
  url: https://192.168.1.2:3000
  # apiPath: define an api path if other than "/control"
  # insecureSkipVerify: true # disable tls check
  username: username
  password: password

# replica instance (optional, if only one)
replica:
  # url of the replica instance
  url: http://192.168.1.3
  username: username
  password: password

# replicas instances (optional, if more than one)
replicas:
  # url of the replica instance
  - url: http://192.168.1.3
    username: username
    password: password
  - url: http://192.168.1.4
    username: username
    password: password

# Configure the sync API server, disabled if api port is 0
api:
  # Port, default 8080
  port: 8080
  # if username and password are defined, basic auth is applied to the sync API 
  username: username
  password: password
Comments
  • synch error

    synch error

    can you please have a look at the error below

    2021-04-05T12:57:01.816+0200 ERROR sync sync/sync.go:104 Error getting origin filters {"from": "192.168.1.101:81", "error": "parsing time \"\"\"\" as \"\"2006-01-02T15:04:05Z07:00\"\": cannot parse \"\"\" as \"2006\""} github.com/bakito/adguardhome-sync/pkg/sync.(*worker).sync /root/go/pkg/mod/github.com/bakito/[email protected]/pkg/sync/sync.go:104 github.com/bakito/adguardhome-sync/pkg/sync.Sync.func1 /root/go/pkg/mod/github.com/bakito/[email protected]/pkg/sync/sync.go:24 github.com/robfig/cron/v3.FuncJob.Run /root/go/pkg/mod/github.com/robfig/cron/[email protected]/cron.go:136 github.com/robfig/cron/v3.(*Cron).startJob.func1 /root/go/pkg/mod/github.com/robfig/cron/[email protected]/cron.go:312

  • no route to host

    no route to host

    I'm getting bellow error. Could you please help to work around? Thank you.

    2021-06-12T19:21:53.750Z INFO sync sync/http.go:65 Starting API server {"version": "v0.3.0-rc1", "port": 8080}, 2021-06-12T19:22:55.636Z INFO root cmd/root.go:102 Using config file:/config/adguardhome-sync.yaml, 2021-06-12T19:22:55.638Z INFO sync sync/sync.go:48 Setup cronjob {"version": "v0.3.0-rc1", "cron": "*/10 * * * *"}, 2021-06-12T19:22:55.639Z INFO sync sync/sync.go:56 Run on startup {"version": "v0.3.0-rc1"}, 2021-06-12T19:22:56.520Z INFO sync sync/sync.go:181 Start sync {"from": "192.168.20.197:80", "to": "192.168.20.73:80"}, 2021-06-12T19:22:59.573Z ERROR sync sync/sync.go:185 Error getting replica status {"from": "192.168.20.197:80", "to": "192.168.20.73:80", "error": "Get "http://192.168.20.73:80/control/status": dial tcp 192.168.20.73:80: connect: no route to host"}, github.com/bakito/adguardhome-sync/pkg/sync.(*worker).syncTo, /go/src/app/pkg/sync/sync.go:185, github.com/bakito/adguardhome-sync/pkg/sync.(*worker).sync, /go/src/app/pkg/sync/sync.go:168, github.com/bakito/adguardhome-sync/pkg/sync.Sync, /go/src/app/pkg/sync/sync.go:57, github.com/bakito/adguardhome-sync/cmd.glob..func1, /go/src/app/cmd/run.go:23, github.com/spf13/cobra.(*Command).execute, /go/pkg/mod/github.com/spf13/[email protected]/command.go:852, github.com/spf13/cobra.(*Command).ExecuteC, /go/pkg/mod/github.com/spf13/[email protected]/command.go:960, github.com/spf13/cobra.(*Command).Execute, /go/pkg/mod/github.com/spf13/[email protected]/command.go:897, github.com/bakito/adguardhome-sync/cmd.Execute, /go/src/app/cmd/root.go:60,, n, /go/src/app/main.go:6, runtime.main, /usr/local/go/src/runtime/proc.go:225, 2021-06-12T19:22:59.573Z INFO sync sync/http.go:65 Starting API server {"version": "v0.3.0-rc1", "port": 80},

  • AdGuardHome replica version used in Home Assistant is not detected by AdGuardHomeSync

    AdGuardHome replica version used in Home Assistant is not detected by AdGuardHomeSync

    Describe the bug AdGuardHome replica version used in Home Assistant is not detected by AdGuardHomeSync

    To Reproduce Steps to reproduce the behavior:

    1. What version of AdGuardHome sync used? 0.4.8
    2. What version of AdGuardHome us used? 0.107.17
    3. How does the configuration look?
    # cron expression to run in daemon mode. (default; "" = runs only once)
    cron: "*/10 * * * *"
    
    # runs the synchronisation on startup
    runOnStart: true
    
    origin:
      # url of the origin instance
      url: http://192.168.2.X:3000
      # apiPath: define an api path if other than "/control"
      username: ***
      password: ***
    
    # replica instance (optional, if only one)
    replica:
      # url of the replica instance
      url: http://192.168.2.Y:5353
      username: ***
      password: ***
    
    # Configure the sync API server, disabled if api port is 0
    api:
      # Port, default 8080
      port: 8080
      # if username and password are defined, basic auth is applied to the sync API 
      # username: username
      # password: password
    
    # Configure sync features; by default all features are enabled.
    features:
      generalSettings: true
      queryLogConfig: true
      statsConfig: true
      clientSettings: true
      services: true
      filters: true
      dhcp:
        serverConfig: true
        staticLeases: true
      dns:
        serverConfig: true
        accessLists: true
        rewrites: true
    
    1. What is the error message?
    2022-11-07T13:09:23.397+0100	INFO	sync	sync/sync.go:196	Start sync	{"from": "192.168.2.X:3000", "to": "192.168.2.Y:5353"}
    2022-11-07T13:09:23.431+0100	INFO	sync	sync/sync.go:204	Connected to replica	{"from": "192.168.2.X:3000", "to": "192.168.2.Y:5353", "version": "v0.107.17"}
    2022-11-07T13:09:23.431+0100	ERROR	sync	sync/sync.go:207	Replica AdGuard Home version must be >= v0.107.0	{"from": "192.168.2.X:3000", "to": "192.168.2.Y:5353", "error": null, "version": ""}
    github.com/bakito/adguardhome-sync/pkg/sync.(*worker).syncTo
    	/home/bakito/go/src/github.com/bakito/adguardhome-sync/pkg/sync/sync.go:207
    github.com/bakito/adguardhome-sync/pkg/sync.(*worker).sync
    	/home/bakito/go/src/github.com/bakito/adguardhome-sync/pkg/sync/sync.go:184
    github.com/bakito/adguardhome-sync/pkg/sync.Sync.func3
    	/home/bakito/go/src/github.com/bakito/adguardhome-sync/pkg/sync/sync.go:66
    

    Expected behavior Have a successful sync

    More context Successful request to the replica in the /status path: image

  • 400 Bad Request error syncing filters

    400 Bad Request error syncing filters

    Describe the bug 400 Bad Request error syncing filters.

    To Reproduce Steps to reproduce the behavior:

    1. What version of AdGuardHome sync used? v0.3.0-rc1 Docker Container
    2. What version of AdGuardHome us used? Version: v0.106.3
    3. How does the configuration look?
    # cron expression to run in daemon mode. (default; "" = runs only once)
    cron: ""
    
    # runs the synchronisation on startup
    runOnStart: true
    
    origin:
      # url of the origin instance
      url: http://172.16.0.2:81
    
    
    # replica instance (optional, if only one)
    replica:
      # url of the replica instance
      url: http://172.16.0.3
      username: usr
      password: psw
    
    1. What is the error message?
    2021-06-02T19:29:43.627Z	INFO	sync	sync/http.go:65	Starting API server	{"version": "v0.3.0-rc1", "port": 8080}
    
    2021-06-02T19:40:10.843Z	INFO	root	cmd/root.go:102	Using config file:/config/adguardhome-sync.yaml
    
    2021-06-02T19:40:10.844Z	INFO	sync	sync/sync.go:56	Run on startup	{"version": "v0.3.0-rc1"}
    
    2021-06-02T19:40:10.933Z	INFO	sync	sync/sync.go:181	Start sync	{"from": "172.16.0.2:81", "to": "172.16.0.3"}
    
    2021-06-02T19:40:11.436Z	INFO	client	client/client.go:239	Add filter	{"host": "172.16.0.3", "url": "https://hosts-file.net/ad_servers.txt", "whitelist": false, "enabled": false}
    
    2021-06-02T19:40:11.969Z	ERROR	sync	sync/sync.go:212	Error syncing filters	{"from": "172.16.0.2:81", "to": "172.16.0.3", "error": "400 Bad Request"}
    
    github.com/bakito/adguardhome-sync/pkg/sync.(*worker).syncTo
    
    	/go/src/app/pkg/sync/sync.go:212
    
    github.com/bakito/adguardhome-sync/pkg/sync.(*worker).sync
    
    	/go/src/app/pkg/sync/sync.go:168
    
    github.com/bakito/adguardhome-sync/pkg/sync.Sync
    
    	/go/src/app/pkg/sync/sync.go:57
    
    github.com/bakito/adguardhome-sync/cmd.glob..func1
    
    	/go/src/app/cmd/run.go:23
    
    github.com/spf13/cobra.(*Command).execute
    
    	/go/pkg/mod/github.com/spf13/[email protected]/command.go:852
    
    github.com/spf13/cobra.(*Command).ExecuteC
    
    	/go/pkg/mod/github.com/spf13/[email protected]/command.go:960
    
    github.com/spf13/cobra.(*Command).Execute
    
    	/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
    
    github.com/bakito/adguardhome-sync/cmd.Execute
    
    	/go/src/app/cmd/root.go:60
    
    
    n
    
    	/go/src/app/main.go:6
    
    runtime.main
    
    	/usr/local/go/src/runtime/proc.go:225
    
    2021-06-02T19:40:11.969Z	INFO	sync	sync/http.go:65	Starting API server	{"version": "v0.3.0-rc1", "port": 8080}
    
  • Syncing more/most/all settings like DNS Settings & DHCP Settings

    Syncing more/most/all settings like DNS Settings & DHCP Settings

    Is your feature request related to a problem? Please describe.

    I would like to have full replica's of several AGH instances. The current replication does not yet replicate the DNS Settings (Settings->DNS) and DHCP settings for instance. This means I still have to manually configure multiple AGH instances and manually keep them in sync.

    Describe the solution you'd like

    Either a full replica, or selectable replication settings. I have no idea if it would be a problem for some people if a replica is a full replica of the origin instance.

    Describe alternatives you've considered

    Manual sync is not an option regarding DHCP settings. Error prone...

    Additional context

    None.

  • Modify the way that DHCP settings are synced

    Modify the way that DHCP settings are synced

    Is your feature request related to a problem? Please describe. I have 2 servers with adguardhome-sync copying settings between, and have noticed some errors in how I think replication of DHCP settings should take place. My 2 servers have different network settings (different NIC names / VLANS) It appears that adgaurdhome-sync is attempting to sync all DHCP settings. I think it would be preferable to sync just some

    Describe the solution you'd like With 2 DHCP Servers on the same subnet standard practice would be to configure each with a seperate non-overlapping range of addresses within the same CIDR range. This is to prevent IP address conflicts caused by the 2 servers handing the same address to 2 different clients. Suggestion would be not to sync the DHCP range setting. Also with difference between servers possible in terms of network name etc, suggesting would be to also not sync this setting. The setting that I think would be good to sync, but doesn't seem to be in my setup is the DHCP Static Reservations - the benefit here is that both servers should have the same static reservations to server these clients correctly

    Describe alternatives you've considered No alternatives that I can think of

    Additional context Add any other context or screenshots about the feature request here.

  • Sync fails due to DHCP when origin (and possibly replica) is running on windows

    Sync fails due to DHCP when origin (and possibly replica) is running on windows

    Describe the bug I am running AdGuard home on Windows Server 2019. Adguard Home does not support the DHCP module on windows servers and returns a 501 unimplemented for API requests about DHCP. Even with DHCP.ServerConfig & DHCP.StaticLeases disabled, Adguardhome-sync attempts to pull the DHCP config, which fails. Once the requests fails, it appears that adguardhome-sync exits without performing any sync

    To Reproduce Steps to reproduce the behavior:

    1. What version of AdGuardHome sync used? 0.4.10
    2. What version of AdGuardHome us used? v0.107.2
    3. How does the configuration look? Defaults, except i have disabled all features from sync except for filters (trying to get at least one thing working first)
    4. What is the error message? Error getting dhcp server config {"from": "10.15.10.10", "error": "501 Not Implemented({\"message\":\"dhcp is unsupported on windows\"}\n)"}

    Expected behavior When a sync feature is disabled, Adguardhome-sync should not attempt to pull the data and continue to sync only enabled features OR have a feature flag that is essentially hosted_by_windows that specifically excludes the DHCP config request.

    Log Files

    root@adguardsync-adguardhome-sync-7896745c67-bjt58:/app/adguardhome-sync# ./adguardhome-sync run --config ./config.yaml
    2022-12-25T14:42:53.314Z        INFO    root    cmd/root.go:118 Using config file:./config.yaml
    2022-12-25T14:42:53.316Z        INFO    sync    sync/sync.go:29 AdGuardHome sync        {"version": "0.4.10", "build": "2022-11-18T17:51:16Z"}
    2022-12-25T14:42:53.316Z        INFO    sync    types/features.go:70    Disabled features       {"features": ["DHCP.ServerConfig", "DHCP.StaticLeases", "DNS.AccessLists", "DNS.ServerConfig", "DNS.Rewrites", "GeneralSettings", "QueryLogConfig", "StatsConfig", "ClientSettings", "Services"]}
    2022-12-25T14:42:53.316Z        INFO    sync    sync/sync.go:55 Setup cronjob   {"cron": "*/1 * * * *", "next-execution": "2022-12-25T14:43:00.000Z"}
    2022-12-25T14:42:53.316Z        INFO    sync    sync/http.go:52 Starting API server     {"port": 8081}
    2022-12-25T14:42:53.316Z        INFO    sync    sync/sync.go:65 Running sync on startup
    2022-12-25T14:42:53.370Z        INFO    sync    sync/sync.go:113        Connected to origin     {"from": "10.15.10.10", "version": "v0.107.21"}
    2022-12-25T14:42:53.989Z        ERROR   sync    sync/sync.go:178        Error getting dhcp server config        {"from": "10.15.10.10", "error": "501 Not Implemented({\"message\":\"dhcp is unsupported on windows\"}\n)"}
    github.com/bakito/adguardhome-sync/pkg/sync.(*worker).sync
            /home/bakito/go/src/github.com/bakito/adguardhome-sync/pkg/sync/sync.go:178
    github.com/bakito/adguardhome-sync/pkg/sync.Sync.func3
            /home/bakito/go/src/github.com/bakito/adguardhome-sync/pkg/sync/sync.go:66
    

    Additional context I do not have a lot of experience with go, but I think wrapping each request in the sync function of sync.go with a feature check would eliminate this? https://github.com/bakito/adguardhome-sync/blob/main/pkg/sync/sync.go#L176 but I am not sure if it would cause issues with null values in the SyncTo function?

  • Using special characters in AGH password gives 403 error

    Using special characters in AGH password gives 403 error

    Describe the bug Using special characters in your AGH password results in the sync tool to get a 403 forbidden error.

    To Reproduce

    1. What version of AdGuardHome sync used? v 0.4.3
    2. What version of AdGuardHome is used? v 0.107.7
    3. How does the configuration look? (Anonimized some parts of the password) ORIGIN_PASSWORD: "ho*********k^CvvZ^eo2g" ORIGIN_URL: "http://192.168.1.5:3000" ORIGIN_USERNAME: "User" REPLICA_URL: "http://192.168.1.7" REPLICA_USERNAME: "User" REPLICA_PASSWORD: "e%nSe&E***********s#FfftS&UxB&" REPLICA1_AUTOSETUP: false CRON: "/10 * * * *" # run every 10 minutes RUNONSTART: true LOG_LEVEL: "debug"
    4. What is the error message? When trying to use this config I get a 403 forbidden on the origin, so I then moved to using a password using only alphanumerical characters on the origin and then the whole system functioned properly. Because the replica has some special characters too and that just works I suspect the ^ character to be the culprit

    Expected behavior To connect properly to the instance and start syncing with every password regardless of characters included.

  • Can't sync. Strange message about auto redirect is disabled

    Can't sync. Strange message about auto redirect is disabled

    Describe the bug I have a two servers in docker behind traefik. Found via google search your amazing product. Now trying to use - and faced with problem - I can't sync my two servers. Most interesting thing - i tried to change the order of syncing - I had the same error

    To Reproduce Steps to reproduce the behavior:

    1. What version of AdGuardHome sync used? 0.4.2, in container by linuxserver.
    2. What version of AdGuardHome us used? v0.107.3
    3. How does the configuration look?
    
    runOnStart: true
    
    origin:
      # url of the origin instance
      url: https://adguard-cat.my.org
      # apiPath: define an api path if other than "/control"
      # insecureSkipVerify: true # disable tls check
      username: admin
      password: *
    
    # replica instance (optional, if only one)
    replica:
      # url of the replica instance
      url: http://adguard-two.my.org
      username: admin
      password: *
    
    # replicas instances (optional, if more than one)
    replicas:
    
    # Configure the sync API server, disabled if api port is 0
    api:
      # Port, default 8080
      port: 8080
      # if username and password are defined, basic auth is applied to the sync API.
      #username:.
      #password:.
    
    features:
      generalSettings: false
      queryLogConfig: false
      statsConfig: false
      clientSettings: false
      services: false
      filters: false
      dhcp:
        serverConfig: false
        staticLeases: false
      dns:
        serverConfig: true
        accessLists: false
        rewrites: false
    
    1. What is the error message? Error getting replica status {"from": "adguard-two.my.org", "to": "adguard-one.my.org", "error": "Get \"https://adguard-one.catshome.name/control/status\": auto redirect is disabled"} But, when I set reverse order of sync, i.e. origin.url = http://adguard-two.my.org and replica.url=https://adguard-cat.my.org I had error with adguard-cat.my.org! Error getting replica status {"from": "adguard-two.catshome.name", "to": "adguard-cat.catshome.name", "error": "Get \"https://adguard-cat.catshome.name/control/status\": auto redirect is disabled"} Most interesting things:
    • sync from two to cat:
      • 2022-02-03T18:43:05.668+0200 DEBUG client client/client.go:114 do get {"host": "adguard-cat.my.org", "method": "GET", "path": "status", "username": "admin"} 2022-02-03T18:43:05.748+0200 DEBUG client client/client.go:126 got response {"host": "adguard-cat.my.org", "method": "GET", "path": "status", "username": "admin", "status": 200, "body": "{"dns_addresses":["127.0.0.1","172.23.0.11"],"dns_port":53,"http_port":80,"protection_enabled":true,"dhcp_available":true,"running":true,"version":"v0.107.3","language":""}\n"}
      • 2022-02-03T18:43:06.435+0200 DEBUG client client/client.go:114 do get {"host": "adguard-two.my.org", "method": "GET", "path": "status", "username": "admin"} 2022-02-03T18:43:06.441+0200 DEBUG client client/client.go:123 error in do get {"host": "adguard-two.my.org", "method": "GET", "path": "status", "username": "admin", "status": 301, "body": "", "error": "Get "https://adguard-two.my.org/control/status": auto redirect is disabled"}
    • sync cat to two:
      • 2022-02-03T18:37:35.773+0200 DEBUG client client/client.go:114 do get {"host": "adguard-two.my.org", "method": "GET", "path": "status", "username": "admin"} 2022-02-03T18:37:35.958+0200 DEBUG client client/client.go:126 got response {"host": "adguard-two.my.org", "method": "GET", "path": "status", "username": "admin", "status": 200, "body": "{"dns_addresses":["127.0.0.1","172.23.0.9"],"dns_port":53,"http_port":80,"protection_enabled":true,"dhcp_available":true,"running":true,"version":"v0.107.3","language":""}\n"}
      • 2022-02-03T18:37:36.962+0200 DEBUG client client/client.go:114 do get {"host": "adguard-cat.my.org", "method": "GET", "path": "status", "username": "admin"} 2022-02-03T18:37:36.966+0200 DEBUG client client/client.go:123 error in do get {"host": "adguard-cat.my.org", "method": "GET", "path": "status", "username": "admin", "status": 301, "body": "", "error": "Get "https://adguard-cat.my.org/control/status": auto redirect is disabled"} So, in case of primary source - everything is ok. But with replica - "redirect detected" ... With the same servers and urls! I have no idea, except the something not cleared in the transport (i.e. get ...) and it identified changing the dns name as redirect ... As additional proof - please look on curl trace - no any 301 code at all - see in the curl-to-cat.log and curl-to-two.log. The same with wget (not posted here)

    Expected behavior Replication is working

    Log Files from-two-to-cat.log from-cat-to-two.log

    Additional context P.S. DNS names is changed, but it doesn't matter - it's official DNS and Let's Encrypt certs.

  • Secondary install brocken and adguardhome-sync stuck

    Secondary install brocken and adguardhome-sync stuck

    Hi, I try to set up new installs of AGH on seperated hardware (PIs) My main is a 3B+, AGH in docker, with 100-ish lists in the filter. That's also where I have AGH-sync installed in docker. My secondary is a pi zero W, first with AGH in docher and it breaks once. Then I installed AGH with apt directly and it broke again. when I say brocken, everything is actually frozen, and I can ssh into the pi anymore. At this moment, i have the logs below in AGH-sync and AGH-sync is displayed as running but the logs are frozen too. Can you help please?

    To Reproduce Steps to reproduce the behavior:

    1. What version of AdGuardHome sync used? docker, fresh install
    2. What version of AdGuardHome us used? v0.106.3
    3. How does the configuration look? looks ok :-)
    4. What is the error message?
    n"}
    
    
    2021-05-22T12:40:37.721Z	INFO	client	client/client.go:228	Add filter	{"host": "192.168.1.178", "url": "https://v.firebog.net/hosts/static/w3kbl.txt", "whitelist": false, "enabled": true}
    
    
    2021-05-22T12:40:37.721Z	DEBUG	client	client/client.go:133	do post	{"host": "192.168.1.178", "method": "POST", "path": "/filtering/add_url", "username": "Nicolas"}
    
    
    2021-05-22T12:40:39.362Z	DEBUG	client	client/client.go:138	got response	{"host": "192.168.1.178", "method": "POST", "path": "/filtering/add_url", "username": "Nicolas", "status": 200, "body": "OK 909 rules\n"}
    
    
    2021-05-22T12:40:39.362Z	INFO	client	client/client.go:228	Add filter	{"host": "192.168.1.178", "url": "http://sysctl.org/cameleon/hosts", "whitelist": false, "enabled": true}
    
    
    2021-05-22T12:40:39.362Z	DEBUG	client	client/client.go:133	do post	{"host": "192.168.1.178", "method": "POST", "path": "/filtering/add_url", "username": "Nicolas"}
    
    
    2021-05-22T12:40:40.886Z	DEBUG	client	client/client.go:138	got response	{"host": "192.168.1.178", "method": "POST", "path": "/filtering/add_url", "username": "Nicolas", "status": 400, "body": "Couldn't fetch filter from url http://sysctl.org/cameleon/hosts: Get \"http://sysctl.org/cameleon/hosts\": couldn't do a GET request to 'https://dns10.quad9.net:443/dns-query', cause: Get \"https://dns10.quad9.net:443/dns-query?dns=Zw0BAAABAAAAAAAABnN5c2N0bANvcmcAAAEAAQ\": read tcp 192.168.1.178:40118->9.9.9.10:443: read: connection reset by peer\n"}
    
    
    2021-05-22T12:40:40.887Z	ERROR	sync	sync/sync.go:190	Error syncing filters	{"from": "192.168.1.45", "to": "192.168.1.178", "error": "400 Bad Request"}
    
    
    github.com/bakito/adguardhome-sync/pkg/sync.(*worker).syncTo
    
    
    	/go/src/app/pkg/sync/sync.go:190
    
    
    github.com/bakito/adguardhome-sync/pkg/sync.(*worker).sync
    
    
    	/go/src/app/pkg/sync/sync.go:146
    
    
    github.com/bakito/adguardhome-sync/pkg/sync.Sync.func2
    
    
    	/go/src/app/pkg/sync/sync.go:42
    
    
    github.com/robfig/cron/v3.FuncJob.Run
    
    
    	/go/pkg/mod/github.com/robfig/cron/[email protected]/cron.go:136
    
    
    github.com/robfig/cron/v3.(*Cron).startJob.func1
    
    
    	/go/pkg/mod/github.com/robfig/cron/[email protected]/cron.go:312
    

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add log files or json responses from AdGuardHome to help explain your problem.

    Additional context Add any other context about the problem here.

  • Stop-Sleep-Start all instances

    Stop-Sleep-Start all instances

    Could you add a feature to your project that disables all instances for a set period of time and then re-enables them?

    That would be a really useful feature.

  • Would like to use this for a HA k8s setup - make it k8s aware

    Would like to use this for a HA k8s setup - make it k8s aware

    Sorry, this is somehow unspecific - a little bit brain storming. I am working on a HA k8s setup. I have implemented some active/standby leader election mechanism, so that there can run more than one instance of this in a kubernetes cluster, but only one will receive traffic. If one pod fails, there will be a failover to another one (new leder elected) within a very short time period. I would like to use this sync, to keep the instances in sync.

    The elected leader is allways available under the service ip / internal service dns record, in addition each pod is allways available via its pod ip / internal pod dns record.

    There should be a regular sync from the elected leader, to the passive pods.

    Is your feature request related to a problem? Please describe. I would like to have some magic, that can lookup the sync targets via the kubernetes api

    Describe the solution you'd like I would like to have something like:

    before syncing:

    1. lookup lease
    apiVersion: coordination.k8s.io/v1
    kind: Lease
    metadata:
      creationTimestamp: "2022-12-11T22:52:03Z"
      name: adguard-leader-election
      namespace: adguard
      resourceVersion: "3741631"
      uid: 8590256a-b50a-4c9e-9d82-f30158c5b299
    spec:
      acquireTime: "2022-12-12T19:59:45.402214Z"
      holderIdentity: adguard-1
      leaseDurationSeconds: 60
      leaseTransitions: 5
      renewTime: "2022-12-12T20:31:15.799654Z"
    

    => we now adguard-1 is leader 2. get all pods of statefulset

    adguard-0
    adguard-1
    adguard-2
    

    => so we know that sync targets are adguard-0 and adguard-2 and sync source is adguard-1

    Describe alternatives you've considered Maybe some init container, that is rewriting the config every time and only let this container run once and let the schedule trigger via k8s jobs...

    As already said, this is more a brainstorming and I would like to see what you can imagine in your sync tool :-)

  • Auto initialise should allow the setting of the adguard UI listening port

    Auto initialise should allow the setting of the adguard UI listening port

    Is your feature request related to a problem? Please describe. When using auto initialise of an instance it should be possible to set the port of the UI as you can currently do in the normal setup wizard.

    Describe the solution you'd like A few things are possible:

    1. A setting for the intended port number. This would replace whatever was in the replica url.
    2. Using the port number specified (or implied i.e. with a http:// prefix) in the replica url.
    3. Syncing the port number from the origin instance.

    In all 3 of the cases, if auto initialise is true and the adguard instance has not been initialised then the inital configuration and setup should take place at port 3000. I realise this will likely require some sort of probe to happen to figure out what port should be used for initial configuration.

    Describe alternatives you've considered Running the install manually and then not using the auto initialise feature.

Synchronize ssh client config with lxc instances

Quickly add remote LXD instances to your ssh client configuration. Expecially useful for VS Code Remote/SSH development.

Nov 12, 2021
K8s-network-config-operator - Kubernetes network config operator to push network config to switches

Kubernetes Network operator Will add more to the readme later :D Operations The

May 16, 2022
A pod scaler golang app that can scale replicas either inside of cluster or out of the cluster

pod-scaler A simple pod scaler golang application that can scale replicas via manipulating the deployment Technologies The project has been created us

Oct 24, 2021
kubehelper : a golang project patches the replicas field of a kubernetes deployment

kubehelper This golang project patches the replicas field of a kubernetes deployment for scaling purposes, this project is mainly just for fun and lea

Dec 11, 2021
Dubbo2istio watches Dubbo ZooKeeper registry and synchronize all the dubbo services to Istio.
Dubbo2istio watches Dubbo ZooKeeper registry and synchronize all the dubbo services to Istio.

Dubbo2Istio Dubbo2istio 将 Dubbo ZooKeeper 服务注册表中的 Dubbo 服务自动同步到 Istio 服务网格中。 Aeraki 根据 Dubbo 服务信息和用户设置的路由规则生成数据面相关的配置,通过 Istio 下发给数据面 Envoy 中的 Dubbo p

Dec 1, 2022
This application is a tool to rapidly create TFS tasks and synchronize them with wiki.

This application is a tool to rapidly create TFS tasks and synchronize them with wiki.

Jan 10, 2022
State observer - StateObserver used to synchronize the local(cached) state of the remote object with the real state

state observer StateObserver used to synchronize the local(cached) state of the

Jan 19, 2022
ProfileStatusSyncer - A tool to synchronize user profile status of Github and Netease CloudMusic

ProfileStatusSyncer A tool to synchronize user profile status of GitHub and Nete

Jul 20, 2022
Issue-mafia - An out-of-the-box CLI that helps you to easily synchronize Git hooks with a remote repository

issue-mafia is an out-of-the-box CLI that helps you to easily synchronize Git hooks with a remote repository.

Feb 14, 2022
⚙️ Dead Simple Config Management, load and persist config without having to think about where and how.

Configo Dead Simple Config Management, load and persist config without having to think about where and how. Install go get github.com/UltiRequiem/conf

Apr 6, 2022
Traefik config validator: a CLI tool to (syntactically) validate your Traefik configuration filesTraefik config validator: a CLI tool to (syntactically) validate your Traefik configuration files
Traefik config validator: a CLI tool to (syntactically) validate your Traefik configuration filesTraefik config validator: a CLI tool to (syntactically) validate your Traefik configuration files

Traefik Config Validator Note This is currently pre-release software. traefik-config-validator is a CLI tool to (syntactically) validate your Traefik

Dec 16, 2021
Go-config - Config parser for go that supports environment vars and multiple yaml files

go-multiconfig This package is able to parse yaml config files. It supports gett

Jun 23, 2022
Goconf - The rudimentary golang config tool purpose is to config PHP servers via SSH

goconf The rudimentary golang config tool purpose is to config PHP servers via S

Jan 31, 2022
oDrop, a fast efficient cross-platform file transfer software for server and home environments

oDrop is a cross-platform LAN file transfer software to efficiently transfer files between computers, oDrop is useful in environments where GUI is not available.

Jun 4, 2022
🏠 An HTTP-based command runner for home automation.
🏠 An HTTP-based command runner for home automation.

Badges Reporting Issues If you are facing a problem with this package or found any bug, please open an issue on GitHub. License The MIT License (MIT).

Oct 29, 2022
The new home of the CUE language! Validate and define text-based and dynamic configuration

The CUE Data Constraint Language Configure, Unify, Execute CUE is an open source data constraint language which aims to simplify tasks involving defin

Dec 31, 2022
CasaOS - A simple, easy-to-use, elegant open-source home server system.
CasaOS - A simple, easy-to-use, elegant open-source home server system.

CasaOS - A simple, easy-to-use, elegant open-source home server system. CasaOS is an open-source home server system based on the Docker ecosystem and

Jan 8, 2023
Vallox RS-485 MQTT gateway to integrate Vallox RS485 ventilation device to Home Assistant via MQTT.
Vallox RS-485 MQTT gateway to integrate Vallox RS485 ventilation device to Home Assistant via MQTT.

Vallox RS-485 MQTT gateway to integrate Vallox RS485 ventilation device to Home Assistant via MQTT. Implements Home Assistant MQTT discovery but can also be used without Home Assistant.

Dec 26, 2021
Sensirion SCD30 CO2 sensor MQTT gateway with Home Assistant MQTT discovery

Sensirion SCD30 CO2 sensor MQTT gateway for Home Assistant Overview This gateway can be used to publish measurements SCD30 to mqtt. It supports Home A

Oct 10, 2022
OCI drive, available from home

OCI Drive ... use your storage with Oracle Object Store Quick Start Make sure you have the Object Storage, bucket and you know the compartment id wher

Nov 10, 2021