summaryrefslogtreecommitdiff
path: root/args/args.go
diff options
context:
space:
mode:
authorsimponic <simponic@hatecomputers.club>2024-04-07 21:08:43 -0400
committersimponic <simponic@hatecomputers.club>2024-04-07 21:08:43 -0400
commit86c4ad160a0442713680ff1eaa85ead635b10f8f (patch)
treefa0303581fdfc166ffaf3c9a482434a2ffa34e3e /args/args.go
parent83cc6267fd5ce2f61200314424c5f400f65ff2ba (diff)
parente2ce6804a76c771759603e3b3800a013275217a1 (diff)
downloadhatecomputers.club-86c4ad160a0442713680ff1eaa85ead635b10f8f.tar.gz
hatecomputers.club-86c4ad160a0442713680ff1eaa85ead635b10f8f.zip
Merge pull request 'reimplement-recursive-resolver' (#6) from reimplement-recursive-resolver into main
Reviewed-on: https://git.hatecomputers.club/hatecomputers/hatecomputers.club/pulls/6
Diffstat (limited to 'args/args.go')
-rw-r--r--args/args.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/args/args.go b/args/args.go
index f71e8e3..8465fc8 100644
--- a/args/args.go
+++ b/args/args.go
@@ -22,8 +22,9 @@ type Arguments struct {
OauthConfig *oauth2.Config
OauthUserInfoURI string
- Dns bool
- DnsPort int
+ DnsResolvers []string
+ Dns bool
+ DnsPort int
CloudflareToken string
CloudflareZone string
@@ -36,6 +37,7 @@ func GetArgs() (*Arguments, error) {
databasePath := flag.String("database-path", "./hatecomputers.db", "Path to the SQLite database")
templatePath := flag.String("template-path", "./templates", "Path to the template directory")
staticPath := flag.String("static-path", "./static", "Path to the static directory")
+ dnsResolvers := flag.String("dns-resolvers", "1.1.1.1,1.0.0.1", "Comma-separated list of DNS resolvers")
scheduler := flag.Bool("scheduler", false, "Run scheduled jobs via cron")
migrate := flag.Bool("migrate", false, "Run the migrations")
@@ -101,8 +103,10 @@ func GetArgs() (*Arguments, error) {
Server: *server,
Migrate: *migrate,
Scheduler: *scheduler,
- Dns: *dns,
- DnsPort: *dnsPort,
+
+ Dns: *dns,
+ DnsPort: *dnsPort,
+ DnsResolvers: strings.Split(*dnsResolvers, ","),
OauthConfig: oauthConfig,
OauthUserInfoURI: oauthUserInfoURI,