Skip to content

Commit

Permalink
Upstream update to 2023.11.14
Browse files Browse the repository at this point in the history
* added option to set tor address as base url
  • Loading branch information
k0gen committed Nov 16, 2023
1 parent 930d10b commit 5966933
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM redis:alpine as redis

FROM searxng/searxng:2023.10.22-526d5c7b3
FROM searxng/searxng:2023.11.14-b3d29cb86

USER root

Expand Down
2 changes: 1 addition & 1 deletion docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _term() {
kill -TERM "$searxng_process" 2>/dev/null
}

export TOR_ONLY="false"
export TOR_ONLY=$(yq e '.tor-url' /root/start9/config.yaml)
export SEARXNG_HOSTNAME=$(yq e '.public-host' /root/start9/config.yaml)
export LAN_ADDRESS=$(yq e '.lan-address' /root/start9/config.yaml)
export TOR_ADDRESS=$(yq e '.tor-address' /root/start9/config.yaml)
Expand Down
4 changes: 2 additions & 2 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
id: searxng
title: "SearXNG"
version: 2023.10.22
version: 2023.11.14
release-notes: |
* Updated SearXNG code to the latest version from upstream.
* Minor code fixes, cleanup and changes.
* Added option to set a Tor address as the base URL.
license: MIT
wrapper-repo: "https://github.com/Start9Labs/searxng-startos"
upstream-repo: "https://github.com/searxng/searxng-docker"
Expand Down
12 changes: 6 additions & 6 deletions scripts/services/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
target: "lan-address",
interface: "main",
},
// "tor-only": {
// "name": "Enable Tor",
// "description": "Enables your search engine on the Tor Network.",
// "type": "boolean",
// "default": false,
// },
// "autocomplete": {
// "name": "Enable Autocomplete",
// "description": "Turns on autocomplete when using SearXNG. This will send data to your Start9 server while typing, before pressing the search button and use multiple known search engines to return frequently searched terms. Note: This will decrease performance of the website when typing, and will make calls to the search engines before the search button is pressed.",
Expand All @@ -42,6 +36,12 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
default: "My SearXNG Engine",
placeholder: "Uncle Jim SearXNG Engine",
},
"tor-url": {
"name": "Enable Tor address as the base URL",
"description": "Activates the utilization of a .onion address as the primary URL, particularly beneficial for publicly hosted instances over the Tor network.",
"type": "boolean",
"default": false,
},
"enable-metrics": {
name: "Enable Stats",
description:
Expand Down
26 changes: 25 additions & 1 deletion scripts/services/migrations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
import { compat, types as T } from "../deps.ts";

export const migration: T.ExpectedExports.migration =
compat.migrations.fromMapping({}, "2023.10.22");
compat.migrations.fromMapping(
{
"2023.11.14": {
up: compat.migrations.updateConfig(
(config: any) => {
config["tor-url"] = false;

return config;
},
true,
{ version: "2023.11.14", type: "up" }
),
down: compat.migrations.updateConfig(
(config: any) => {
delete config["tor-url"];

return config;
},
true,
{ version: "2023.11.14", type: "down" }
),
},
},
"2023.11.14"
);

0 comments on commit 5966933

Please sign in to comment.