diff --git a/README.md b/README.md index 852c41c..949afd4 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,12 @@ For a public service you should use a reverse proxy like Caddy, apache2 or nginx `echoip-slatecave` has some simle ratelimiting built in (see the `[ratelimit]` section in the configuration file) this should help you with too frequest automated requests causung high load. The default configuration is pretty liberal so that the average human probably won't notice the rate limit, but a misbehavingig bot will be limited to one request every 3 seconds after 15 requests. +## TODO + +* [ ] Investigate why search isn't working for global TLDs +* [ ] Add a way to configure just the dns server addresses and derive the port from the protocol. +* [ ] Add an about page for the system resolver + ## License Copyright (c) 2023 Slatian diff --git a/templates/404.html b/templates/404.html index 871583d..c8f95a3 100644 --- a/templates/404.html +++ b/templates/404.html @@ -8,6 +8,7 @@
  • The homepage
  • The /ip/ or /dig/ endpoints.
  • The /ua endpoint wich just displays your user agent.
  • +
  • The list of configured dns resolvers.
  • {% endblock %} diff --git a/templates/dig.txt b/templates/dig.txt index 2b32473..38be133 100644 --- a/templates/dig.txt +++ b/templates/dig.txt @@ -3,7 +3,7 @@ {% block path %}dig/{{ data.query | urlencode_strict }}{% endblock %} {% block content -%} -# dig {{data.query}} +# dig {{data.query}} via {{ data.result.used_dns_resolver }} {% if data.result.idn -%} {%- set idn = data.result.idn -%} diff --git a/templates/dns_resolver.html b/templates/dns_resolver.html index 5d8a195..34247c4 100644 --- a/templates/dns_resolver.html +++ b/templates/dns_resolver.html @@ -17,7 +17,7 @@ {% else %} {% set ip = a | split(pat=":") | first %} {% endif %} -
    {{ helper::ip(extra=extra, ip=ip) }}
    +
    {{ helper::ip(extra=extra, ip=ip, text=a) }}
    {%- endfor %} {%- else %}
    None Configured
    @@ -53,5 +53,6 @@

    You can use this DNS server by typing via {{c.aliases | first }} {% if c.aliases | length > 1 %}(or any other alias){% endif %} in the searchfield.

    +

    Back to DNS Resolver list

    {% endif %} {% endblock %} diff --git a/templates/helpers.html b/templates/helpers.html index d45fca7..44d2dce 100644 --- a/templates/helpers.html +++ b/templates/helpers.html @@ -17,8 +17,8 @@ {% if prefix %}{{ prefix }} {% endif %}{% if fqdn or name=="." %}{{ name }}{% else %}{{ name | trim_end_matches(pat=".") }}{% endif %} {% endmacro dig %} -{% macro ip(extra, ip) %} -{{ ip }} +{% macro ip(extra, ip, text="") %} +{{ text | default(value=ip) }} {% endmacro dig %} {% macro breadcrumb_domain(extra, name) %} diff --git a/templates/index.html b/templates/index.html index 02c9821..b492c18 100644 --- a/templates/index.html +++ b/templates/index.html @@ -33,5 +33,7 @@

    Did you know?

    If you share this site and the Link gets a preview. The IP-Address after the dash is the one of the machine that generated that preview.

    +

    This service exports a list of dns resolvers it supports, with configuration.

    +

    Every query that can output html can also output json or plain text using the ?format=json or ?format=text url parameters?

    {% endblock %}