Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 7, 2023. It is now read-only.

Comments

New category: Onions#565

Merged
asciimoo merged 2 commits intosearx:masterfrom
MarcAbonce:onions
Oct 26, 2020
Merged

New category: Onions#565
asciimoo merged 2 commits intosearx:masterfrom
MarcAbonce:onions

Conversation

@MarcAbonce
Copy link
Contributor

@MarcAbonce MarcAbonce commented May 20, 2016

With engines Ahmia, Torch and Not Evil.

Disabled by default. Can be enabled by setting the SOCKS proxies to wherever Tor is listening and setting using_tor_proxy as True.

To avoid manually adding the timeout on each engine, you can set extra_proxy_timeout to account for Tor's (or whatever proxy used) extra time.

Should solve #413 and probably #519

@GreenLunar
Copy link
Contributor

GreenLunar commented May 20, 2016

There is also not Evil at http://hss3uro2hsxfogfq.onion/ (was TorSearch at http://kbhpodhnfxl3clb4.onion/)

@MarcAbonce
Copy link
Contributor Author

MarcAbonce commented May 31, 2016

By the way, htk2rvtgj6vv3ppj.onion is currently running this branch.
Edit: mze6ter6fchwojcr.onion http://jiwfbtg2kfkadjku.onion http://7ea7vegvcqgdzxjz.onion

@asciimoo
Copy link
Member

@a01200356 great, the only problem is that it isn't compatible with the existing non-tor configuration. It would be cool to provide both to the users. Could be a separated settings_tor.yml for the tor config.

@MarcAbonce
Copy link
Contributor Author

Sorry for the delay.
I just updated the PR. But instead of having two settings files, I added the using_tor_proxy setting that should automatically set up all the other Tor specific configurations.
When set to False or commented out, as default, everything should behave exactly the same as current version on upstream.

@MarcAbonce
Copy link
Contributor Author

MarcAbonce commented Feb 4, 2017

I just fixed the issue I had with not evil's encoding.

About the last commit, I just assume that using Tor Browser's user agent would make our traffic seem more "normal" when using Tor than using a random user agent. However, this is merely an assumption on my part. I can't really tell if it actually helps or not.

@ghost
Copy link

ghost commented Feb 19, 2017

Looks interesting.

searx/utils.py Outdated
# TODO
return ua.format(os=choice(ua_os), version=choice(ua_versions))
if settings['outgoing'].get('using_tor_proxy'):
return tor_browser_ua
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a specific behavior for Tor ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that, when using Tor, Tor Browser's user agent would make our requests blend in better with "normal" Tor users, while using unique agents would only make our requests stand out compared to the other (non Searx) requests coming out of the same exit node.

@MarcAbonce MarcAbonce force-pushed the onions branch 5 times, most recently from 9bfeca1 to cf589bb Compare June 7, 2017 02:35
@MarcAbonce MarcAbonce force-pushed the onions branch 2 times, most recently from d403002 to ecd9827 Compare December 27, 2017 02:01
@MarcAbonce
Copy link
Contributor Author

MarcAbonce commented Dec 27, 2017

With the fix in #1121, Google doesn't block Tor exit nodes any more.
I also reverted the Tor Browser user-agent in Tor requests, I don't think it makes any difference anyway.
Also, DuckDuckGo currently uses the normal website because the hidden service is extremely slow, which makes it reach timeout most of the time.
An updated instance running this branch is in http://jiwfbtg2kfkadjku.onion http://7ea7vegvcqgdzxjz.onion

@MarcAbonce MarcAbonce force-pushed the onions branch 6 times, most recently from 518b307 to 26f18a6 Compare July 4, 2019 05:45
@asciimoo
Copy link
Member

@MarcAbonce sorry for the delayed answer. I still think that this is a useful functionality, could you please rebase it to the latest master? I'm happy to do it if you don't have capacity.

MarcAbonce and others added 2 commits October 25, 2020 17:59
Xpath engine and results template changed to account for the fact that
archive.org doesn't cache .onions, though some onion engines migth have
their own cache.

Disabled by default. Can be enabled by setting the SOCKS proxies to
wherever Tor is listening and setting using_tor_proxy as True.

Requires Tor and updating packages.

To avoid manually adding the timeout on each engine, you can set
extra_proxy_timeout to account for Tor's (or whatever proxy used) extra
time.
@MarcAbonce
Copy link
Contributor Author

I rebased to master and I also added another commit.

Copy link
Member

@asciimoo asciimoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@asciimoo asciimoo merged commit db703a0 into searx:master Oct 26, 2020
@asciimoo
Copy link
Member

This is a great addition, we should mention it in the documentation.

@dalf
Copy link
Contributor

dalf commented Oct 27, 2020

Note about the plugin, it can't be disabled, I guess on purpose :

if 'enabled_plugins' in settings:
for plugin in plugins:
if plugin.name in settings['enabled_plugins']:
plugin.default_on = True
else:
plugin.default_on = False
# load tor specific plugins
if settings['outgoing'].get('using_tor_proxy'):
plugins.register(ahmia_filter)

The plugin is loaded after enabled_plugins parsing and in the preferences (in the oscar theme), it is hidden:

{% if plugin.preference_section != 'onions' %}

@MarcAbonce
Copy link
Contributor Author

Yeah, maybe it would be better to extend the new preferences lock to include plugins and use that instead?

@Perflyst
Copy link

Looks like if a proxy is configured the proxy is used for all search engines and not only for onion search engines. Is there an option to use the proxy (in this specific use-case the Tor socks proxy) only for onion search engines?

@dalf
Copy link
Contributor

dalf commented Dec 15, 2020

You can specify a proxy per engine.
See https://searx.github.io/searx/admin/settings.html#engine-settings

So you have to copy / paste the proxy section for each onion engine
or you can use YAML anchor ( https://en.wikipedia.org/wiki/YAML#Advanced_components )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants