From b26904bd33fd24f8b74723789ce802ebe2d164f1 Mon Sep 17 00:00:00 2001 From: Joao Ramos Date: Wed, 21 Sep 2022 14:17:57 +0200 Subject: [PATCH] add new environment variables --- README.md | 37 +++++++++++++++++++------------------ app.json | 5 +++++ charts/whoogle/values.yaml | 33 +++++++++++++++++---------------- docker-compose-traefik.yaml | 1 + whoogle.template.env | 3 +++ 5 files changed, 45 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 025daca..3124b1d 100644 --- a/README.md +++ b/README.md @@ -389,24 +389,25 @@ There are a few optional environment variables available for customizing a Whoog ### Config Environment Variables These environment variables allow setting default config values, but can be overwritten manually by using the home page config menu. These allow a shortcut for destroying/rebuilding an instance to the same config state every time. -| Variable | Description | -| ------------------------------ | --------------------------------------------------------------- | -| WHOOGLE_CONFIG_DISABLE | Hide config from UI and disallow changes to config by client | -| WHOOGLE_CONFIG_COUNTRY | Filter results by hosting country | -| WHOOGLE_CONFIG_LANGUAGE | Set interface language | -| WHOOGLE_CONFIG_SEARCH_LANGUAGE | Set search result language | -| WHOOGLE_CONFIG_BLOCK | Block websites from search results (use comma-separated list) | -| WHOOGLE_CONFIG_THEME | Set theme mode (light, dark, or system) | -| WHOOGLE_CONFIG_SAFE | Enable safe searches | -| WHOOGLE_CONFIG_ALTS | Use social media site alternatives (nitter, invidious, etc) | -| WHOOGLE_CONFIG_NEAR | Restrict results to only those near a particular city | -| WHOOGLE_CONFIG_TOR | Use Tor routing (if available) | -| WHOOGLE_CONFIG_NEW_TAB | Always open results in new tab | -| WHOOGLE_CONFIG_VIEW_IMAGE | Enable View Image option | -| WHOOGLE_CONFIG_GET_ONLY | Search using GET requests only | -| WHOOGLE_CONFIG_URL | The root url of the instance (`https:///`) | -| WHOOGLE_CONFIG_STYLE | The custom CSS to use for styling (should be single line) | -| WHOOGLE_CONFIG_PREFERENCES_KEY | Key to encrypt preferences in URL (REQUIRED to show url) | +| Variable | Description | +| ------------------------------------ | --------------------------------------------------------------- | +| WHOOGLE_CONFIG_DISABLE | Hide config from UI and disallow changes to config by client | +| WHOOGLE_CONFIG_COUNTRY | Filter results by hosting country | +| WHOOGLE_CONFIG_LANGUAGE | Set interface language | +| WHOOGLE_CONFIG_SEARCH_LANGUAGE | Set search result language | +| WHOOGLE_CONFIG_BLOCK | Block websites from search results (use comma-separated list) | +| WHOOGLE_CONFIG_THEME | Set theme mode (light, dark, or system) | +| WHOOGLE_CONFIG_SAFE | Enable safe searches | +| WHOOGLE_CONFIG_ALTS | Use social media site alternatives (nitter, invidious, etc) | +| WHOOGLE_CONFIG_NEAR | Restrict results to only those near a particular city | +| WHOOGLE_CONFIG_TOR | Use Tor routing (if available) | +| WHOOGLE_CONFIG_NEW_TAB | Always open results in new tab | +| WHOOGLE_CONFIG_VIEW_IMAGE | Enable View Image option | +| WHOOGLE_CONFIG_GET_ONLY | Search using GET requests only | +| WHOOGLE_CONFIG_URL | The root url of the instance (`https:///`) | +| WHOOGLE_CONFIG_STYLE | The custom CSS to use for styling (should be single line) | +| WHOOGLE_CONFIG_PREFERENCES_ENCRYPTED | Encrypt preferences token, requires preferences key | +| WHOOGLE_CONFIG_PREFERENCES_KEY | Key to encrypt preferences in URL (REQUIRED to show url) | ## Usage Same as most search engines, with the exception of filtering by time range. diff --git a/app.json b/app.json index 2d91d26..bca034d 100644 --- a/app.json +++ b/app.json @@ -175,6 +175,11 @@ "value": ":root { /* LIGHT THEME COLORS */ --whoogle-background: #d8dee9; --whoogle-accent: #2e3440; --whoogle-text: #3B4252; --whoogle-contrast-text: #eceff4; --whoogle-secondary-text: #70757a; --whoogle-result-bg: #fff; --whoogle-result-title: #4c566a; --whoogle-result-url: #81a1c1; --whoogle-result-visited: #a3be8c; /* DARK THEME COLORS */ --whoogle-dark-background: #222; --whoogle-dark-accent: #685e79; --whoogle-dark-text: #fff; --whoogle-dark-contrast-text: #000; --whoogle-dark-secondary-text: #bbb; --whoogle-dark-result-bg: #000; --whoogle-dark-result-title: #1967d2; --whoogle-dark-result-url: #4b11a8; --whoogle-dark-result-visited: #bbbbff; }", "required": false }, + "WHOOGLE_CONFIG_PREFERENCES_ENCRYPTED": { + "description": "[CONFIG] Encrypt preferences token, requires WHOOGLE_CONFIG_PREFERENCES_KEY to be set", + "value": "", + "required": false + }, "WHOOGLE_CONFIG_PREFERENCES_KEY": { "description": "[CONFIG] Key to encrypt preferences", "value": "NEEDS_TO_BE_MODIFIED", diff --git a/charts/whoogle/values.yaml b/charts/whoogle/values.yaml index 47236c8..5b0f0da 100644 --- a/charts/whoogle/values.yaml +++ b/charts/whoogle/values.yaml @@ -47,22 +47,23 @@ conf: {} # WHOOGLE_AUTOCOMPLETE: "" # Controls visibility of autocomplete/search suggestions. Default on -- use '0' to disable # WHOOGLE_MINIMAL: "" # Remove everything except basic result cards from all search queries. - # WHOOGLE_CONFIG_DISABLE: "" # Hide config from UI and disallow changes to config by client - # WHOOGLE_CONFIG_COUNTRY: "" # Filter results by hosting country - # WHOOGLE_CONFIG_LANGUAGE: "" # Set interface language - # WHOOGLE_CONFIG_SEARCH_LANGUAGE: "" # Set search result language - # WHOOGLE_CONFIG_BLOCK: "" # Block websites from search results (use comma-separated list) - # WHOOGLE_CONFIG_THEME: "" # Set theme mode (light, dark, or system) - # WHOOGLE_CONFIG_SAFE: "" # Enable safe searches - # WHOOGLE_CONFIG_ALTS: "" # Use social media site alternatives (nitter, invidious, etc) - # WHOOGLE_CONFIG_NEAR: "" # Restrict results to only those near a particular city - # WHOOGLE_CONFIG_TOR: "" # Use Tor routing (if available) - # WHOOGLE_CONFIG_NEW_TAB: "" # Always open results in new tab - # WHOOGLE_CONFIG_VIEW_IMAGE: "" # Enable View Image option - # WHOOGLE_CONFIG_GET_ONLY: "" # Search using GET requests only - # WHOOGLE_CONFIG_URL: "" # The root url of the instance (https:///) - # WHOOGLE_CONFIG_STYLE: "" # The custom CSS to use for styling (should be single line) - # WHOOGLE_CONFIG_PREFERENCES_KEY: "" # Key to encrypt preferences in URL (REQUIRED to show url) + # WHOOGLE_CONFIG_DISABLE: "" # Hide config from UI and disallow changes to config by client + # WHOOGLE_CONFIG_COUNTRY: "" # Filter results by hosting country + # WHOOGLE_CONFIG_LANGUAGE: "" # Set interface language + # WHOOGLE_CONFIG_SEARCH_LANGUAGE: "" # Set search result language + # WHOOGLE_CONFIG_BLOCK: "" # Block websites from search results (use comma-separated list) + # WHOOGLE_CONFIG_THEME: "" # Set theme mode (light, dark, or system) + # WHOOGLE_CONFIG_SAFE: "" # Enable safe searches + # WHOOGLE_CONFIG_ALTS: "" # Use social media site alternatives (nitter, invidious, etc) + # WHOOGLE_CONFIG_NEAR: "" # Restrict results to only those near a particular city + # WHOOGLE_CONFIG_TOR: "" # Use Tor routing (if available) + # WHOOGLE_CONFIG_NEW_TAB: "" # Always open results in new tab + # WHOOGLE_CONFIG_VIEW_IMAGE: "" # Enable View Image option + # WHOOGLE_CONFIG_GET_ONLY: "" # Search using GET requests only + # WHOOGLE_CONFIG_URL: "" # The root url of the instance (https:///) + # WHOOGLE_CONFIG_STYLE: "" # The custom CSS to use for styling (should be single line) + # WHOOGLE_CONFIG_PREFERENCES_ENCRYPTED: "" # Encrypt preferences token, requires key + # WHOOGLE_CONFIG_PREFERENCES_KEY: "" # Key to encrypt preferences in URL (REQUIRED to show url) podAnnotations: {} podSecurityContext: {} diff --git a/docker-compose-traefik.yaml b/docker-compose-traefik.yaml index cb2262b..7aaedfd 100644 --- a/docker-compose-traefik.yaml +++ b/docker-compose-traefik.yaml @@ -72,6 +72,7 @@ services: # - WHOOGLE_CONFIG_SEARCH_LANGUAGE=lang_en # - WHOOGLE_CONFIG_GET_ONLY=1 # - WHOOGLE_CONFIG_COUNTRY=FR + # - WHOOGLE_CONFIG_PREFERENCES_ENCRYPTED=1 # - WHOOGLE_CONFIG_PREFERENCES_KEY="NEEDS_TO_BE_MODIFIED" #env_file: # Alternatively, load variables from whoogle.env #- whoogle.env diff --git a/whoogle.template.env b/whoogle.template.env index 631601c..8e752a5 100644 --- a/whoogle.template.env +++ b/whoogle.template.env @@ -86,5 +86,8 @@ # Set custom CSS styling/theming #WHOOGLE_CONFIG_STYLE=":root { /* LIGHT THEME COLORS */ --whoogle-background: #d8dee9; --whoogle-accent: #2e3440; --whoogle-text: #3B4252; --whoogle-contrast-text: #eceff4; --whoogle-secondary-text: #70757a; --whoogle-result-bg: #fff; --whoogle-result-title: #4c566a; --whoogle-result-url: #81a1c1; --whoogle-result-visited: #a3be8c; /* DARK THEME COLORS */ --whoogle-dark-background: #222; --whoogle-dark-accent: #685e79; --whoogle-dark-text: #fff; --whoogle-dark-contrast-text: #000; --whoogle-dark-secondary-text: #bbb; --whoogle-dark-result-bg: #000; --whoogle-dark-result-title: #1967d2; --whoogle-dark-result-url: #4b11a8; --whoogle-dark-result-visited: #bbbbff; }" +# Enable preferences encryption (requires key) +#WHOOGLE_CONFIG_PREFERENCES_ENCRYPTED=1 + # Set Key to encode config in url #WHOOGLE_CONFIG_PREFERENCES_KEY="NEEDS_TO_BE_MODIFIED" \ No newline at end of file