Skip to content

Commit

Permalink
Moved Tor to code instead of hardcoded into base
Browse files Browse the repository at this point in the history
  • Loading branch information
Aadniz committed Oct 13, 2024
1 parent 9fa9926 commit d096f48
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions searx/templates/simple/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@
<footer>
<p>
{{ _('Powered by') }} <a href="{{ url_for('info', pagename='about') }}">searxng</a> - {{ searx_version }} — {{ _('a privacy-respecting, open metasearch engine') }}<br>
<a href="http://kantanrucloofzrfn7vqlsxbhipkqv55qygn4oxogbnjpfex54bw4gad.onion">Tor</a>
| <a href="{{ searx_git_url }}">{{ _('Source code') }}</a>
{% if searx_tor_url %}
<a href="{{ searx_tor_url }}">Tor</a> |
{% endif %}
<a href="{{ searx_git_url }}">{{ _('Source code') }}</a>
| <a href="{{ get_setting('brand.issue_url') }}">{{ _('Issue tracker') }}</a>
{% if enable_metrics %}| <a href="{{ url_for('stats') }}">{{ _('Engine stats') }}</a>{% endif %}
{% if get_setting('brand.public_instances') %}
Expand Down
1 change: 1 addition & 0 deletions searx/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
VERSION_TAG = "1.0.0"
GIT_URL = "unknow"
GIT_BRANCH = "unknow"
TOR_URL = "http://kantanrucloofzrfn7vqlsxbhipkqv55qygn4oxogbnjpfex54bw4gad.onion"

logger = logging.getLogger("searx")

Expand Down
3 changes: 2 additions & 1 deletion searx/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
gen_useragent,
dict_subset,
)
from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH
from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH, TOR_URL
from searx.query import RawTextQuery
from searx.plugins import Plugin, plugins, initialize as plugin_initialize
from searx.plugins.oa_doi_rewrite import get_doi_resolver
Expand Down Expand Up @@ -421,6 +421,7 @@ def render(template_name: str, **kwargs):
kwargs['instance_name'] = get_setting('general.instance_name')
kwargs['searx_version'] = VERSION_STRING
kwargs['searx_git_url'] = GIT_URL
kwargs['searx_tor_url'] = TOR_URL
kwargs['enable_metrics'] = get_setting('general.enable_metrics')
kwargs['get_setting'] = get_setting
kwargs['get_pretty_url'] = get_pretty_url
Expand Down

0 comments on commit d096f48

Please sign in to comment.