Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment Variable Parsing #2339

Open
PromoFaux opened this issue Mar 5, 2025 · 0 comments
Open

Environment Variable Parsing #2339

PromoFaux opened this issue Mar 5, 2025 · 0 comments

Comments

@PromoFaux
Copy link
Member

Currently, to pass an array item into an environment variable it needs to look something like:

FTLCONF_dns_hosts: '127.0.0.1 google.com;127.0.0.2 facebook.com'

Image

[dns]
  # Array of custom DNS records
  # Example: hosts = [ "127.0.0.1 mylocal", "192.168.0.1 therouter" ]
  #
  # Possible values are:
  #     Array of custom DNS records each one in HOSTS form: "IP HOSTNAME"
  hosts = [
    "127.0.0.1 google.com",
    "127.0.0.2 facebook.com"
  ] ### CHANGED (env), default = []

This is fine for a couple of values, but gets quite unreadable when you want to add in more.

Another way of passing these in would be:

FTLCONF_dns_hosts: |
    127.0.0.1 google.com
    127.0.0.2 facebook.com
    127.0.0.3 somethingelse.com
    127.0.0.4 you-get-the-point-im-trying-to-make.org

While this looks normal here:

Image

It looks odd in the config file:

[dns]
  # Array of custom DNS records
  # Example: hosts = [ "127.0.0.1 mylocal", "192.168.0.1 therouter" ]
  #
  # Possible values are:
  #     Array of custom DNS records each one in HOSTS form: "IP HOSTNAME"
  hosts = [
    "127.0.0.1 google.com\n127.0.0.2 facebook.com\n127.0.0.3 somethingelse.com\n127.0.0.4 you-get-the-point-im-trying-to-make.org\n"
  ] ### CHANGED (env), default = []

Weird still on the local DNS settings page:

Image

However the actual resolution of these hosts works despite that:

Image

Is there something we can do to pretty this up a bit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants