From b1bdd346b39ae2f5e5e5d116825c98a18a4696d6 Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Mon, 13 May 2024 14:17:53 +0500 Subject: [PATCH] Add Readme --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f91f55a --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# local-etc-hosts-updater + +Queries the mDNS record for a given .local address, and maps it to the given subdomains inside a hosts file + +## Usage + +### CLI Args + +`local-etc-hosts-updater ` + +- `local_domain` is the local domain to be queried +- `ip_version` is an enum. + - 4 will query for an IPv4 address in the `192.168.0.0/16` subnet + - 6 will query for a ULA IPv6 address in the `fd00::/8` subnet + - 0 will do both +- `interface` is the interface name to query, it is required for ipv6 + +### ENV vars + +- `OLD_HOSTS_PATH` path to the current hosts file +- `TARGET_DOMAIN` public domain for the subdomains +- `SUBDOMAIN_LIST` space separated list of subdomains to map