Commit Graph

206 Commits (58d54c638470f50d42a7f32d835ac592d42cc87f)

Author SHA1 Message Date
Ben Busby 817b51eb48
Document WHOOGLE_CONFIG_NEAR env var
Fixes #406
2021-09-15 16:00:36 -06:00
Peter Dave Hello ed963933d9
Add ini highlighting to readme (#426) 2021-09-15 15:27:50 -06:00
FlawCra 598b58a43d
Update location of public instance (#425)
https://search.flawcra.cc -> DE
2021-09-15 15:25:51 -06:00
Flux Industries f093fd26c1
Add public instance to readme (#423)
search.flux.industries
2021-09-15 15:25:00 -06:00
Ben Busby 118c9da813
Remove ARM specific Docker tag note from readme
ARM devices can now use the `latest` tag, so the `buildx-experimental`
tag is no longer necessary.
2021-08-31 08:15:28 -06:00
Ben Busby 9320d8e230
Remove travis yml, update readme test badge 2021-08-30 16:47:49 -06:00
alefvanoon 388f51cfb7
Add table for public instances (#398)
Includes new "Country" and "Cloudflare" columns
2021-08-30 16:07:23 -06:00
alefvanoon 14a5e63ad9
Remove dead instance, add new public instance (#387)
https://s.alefvanboon.xyz
2021-08-24 09:10:38 -06:00
Ben Busby c41e0fc239
Allow theme to mirror user system settings
Introduces a new config element and environment variable
(WHOOGLE_CONFIG_THEME) for setting the theme of the app. Rather than
just having either light or dark, this allows a user to have their
instance use their current system light/dark preference to determine the
theme to use.

As a result, the dark mode setting (and WHOOGLE_CONFIG_DARK) have been
deprecated, but will still work as expected until a system theme has
been chosen.
2021-06-28 10:26:51 -04:00
Ben Busby bcb1d8ecc9
Add lingva translation support in search (#360)
* Add support for Lingva translations in results

Searches that contain the word "translate" and are normal search queries
(i.e. not news/images/video/etc) now create an iframe to a Lingva url to
translate the user's search using their configured search language.

The Lingva url can be configured using the WHOOGLE_ALT_TL env var, or
will fall back to the official Lingva instance url (lingva.ml).

For more info, visit https://github.com/TheDavidDelta/lingva-translate

* Add basic test for lingva results

* Allow user specified lingva instances through csp frame-src

* Fix pep8 issue
2021-06-15 10:14:42 -04:00
Ben Busby 83d19d7644
Update instructions for Firefox 89+
Also adds steps to take for allowing searches using Firefox Containers

Closes #352
2021-06-10 11:52:30 -04:00
Ben Busby e7a604d428
Fix handling of http (vs https) proxy creation
The requests library requires both 'http' and 'https' values in any
included proxy dict, and whoogle was previously copying the http proxy
to https for simplicity. The assumption was that if the underlying
request wasn't able to connect via https, it would default to http
(otherwise why have the requirement to specify both?)

This led to connectivity issues for users with http only proxies as of
the latest urllib and requests package versions, which are a lot more
strict with connections over https. With the latest versions, if an
https connection cannot be made, the library returns an error.

As a result, the new proxy dict must look something like this for plain
http proxies:

{'http': 'http://domain.tld:port', 'https': 'http://domain.tld:port'}

where both http and https are identical, but both are still required.
2021-06-04 15:30:21 -04:00
Ben Busby 59479228bf
Add clarification note for Whoogle CSP headers
Fixes #336
2021-06-01 20:03:05 -04:00
Myzel394 7103d9eccb
Add German translation (#339)
* Added german language

* Fixed translations.json path

* Fixed German name
2021-06-01 19:57:48 -04:00
Jerome Gravel-Niquet e1e6e84649
Add instructions to deploy to Fly.io (#330)
* Add instructions to deploy to Fly.io

* Put Fly.io as #3 in the installation options
2021-05-28 10:29:19 -04:00
Ben Busby 4649d96dda
Support basic localization (#325)
* Replace hardcoded strings using translation json file

This introduces a new "translations.json" file under app/static/settings
that is loaded on app init and uses the user config value for interface
language to determine the appropriate strings to use in Whoogle-specific
elements of the UI (primarily only on the home page).

* Verify interface lang can be used for localization

Check the configured interface language against the available
localization dict before attempting to use, otherwise fall back to
english.

Also expanded language names in the languages json file.

* Add test for validating translation language keys

Also adds Spanish translation to json (the only non-English language I
can add and reasonably validate on my own).

* Validate all translations against original keyset, update readme

Readme has been updated to include basic contributing guidelines for
both code and translations.
2021-05-24 17:03:02 -04:00
Oscar c2a76bd73a
Add new public instance to readme (#323)
https://whoogle.silkky.cloud
2021-05-24 11:06:48 -04:00
Ben Busby 75e7410981
Add WHOOGLE_CONFIG_DISABLE doc to readme 2021-05-21 11:22:43 -04:00
Joao A. Candido Ramos 448efb8f2a
Add "view image" functionality (#268)
* add view image option

* prevent whoogle links from opening in a new tab.

* remove view image template on mobile requests

* change loop values to be more robust to the number of images

* Update app/templates/imageresults.html

* fix "Basically the .cvifge class needs width: 100%; in order to expand the search input to fit the form width."

* Update app/templates/imageresults.html

* remove hardcoded string from template

* Add view image config var to app.json

* Add view image config var to whoogle.env

Co-authored-by: jacr13 <ramos.joao@protonmail.com>
Co-authored-by: Ben Busby <benbusby@protonmail.com>
2021-05-21 11:19:45 -04:00
Ben Busby 3f1096b05d
Remove search.whoogle.tech public instance
The instance is no longer maintained.
2021-05-20 12:28:45 -04:00
Ben Busby 373a466cb5
Use relative paths in readme toc
This change was needed to allow mirrored readmes to still link to the
correct section without redirecting to github.
2021-05-19 13:25:07 -04:00
Ben Busby 65d948368c
Add read-only mirrors to readme 2021-05-19 13:12:52 -04:00
Ben Busby 2bd17bef47
Expand readme toc, add chromium instructions 2021-05-19 10:06:08 -04:00
Exonip 45f7522e65
Add public instance "search.exonip.de" (#321) 2021-05-19 09:50:50 -04:00
Ben Busby c8da53d4b0
Block websites from search results via user config (#304)
* Block websites in search results via user config

Adds a new config field "Block" to specify a comma separated list of
websites to block in search results. This is applied for all searches.

* Add test for blocking sites from search results

* Document WHOOGLE_CONFIG_BLOCK usage

* Strip '-site:' filters from query in header template

The 'behind the scenes' site filter applied for blocked sites was
appearing in the query field when navigating between search categories
(all -> images -> news, etc). This prevents the filter from appearing in
all except "images", since the image category uses a separate header.
This should eventually be addressed when the image page can begin using
the standard whoogle header, but until then, the filter will still
appear for image searches.
2021-05-07 11:45:53 -04:00
Ben Busby 35aa02167c
Clarify how to enable whoogle.env for docker/docker-compose
The readme section on enabling whoogle.env needed to be updated to clarify
how it should work for "docker-compose" and "docker build" runs.
2021-05-03 14:36:00 -04:00
Ben Busby 8ae7b5947e
Separate interface language from search language in env vars
The search language is now set using the WHOOGLE_CONFIG_SEARCH_LANGUAGE
environment variable. Interface language is still set using
WHOOGLE_CONFIG_LANGUAGE.

Fixes #260
2021-04-26 11:38:55 -04:00
FlawCra 18af72c182
Add public instance to readme (#273)
https://search.flawcra.cc
2021-04-12 10:02:37 -04:00
igosad 8a6e0709b8
Allow replit to auto detect dependencies (#266) 2021-04-07 12:21:39 -04:00
igosad b48090c23a
Add public instance: search.whoogle.tech (#269) 2021-04-07 10:37:04 -04:00
Ben Busby 3312072cc1 Add new public instance to readme
See https://whooglesearch.net/
2021-04-05 11:00:56 -04:00
Ben Busby 7b9ee37beb Allow defining initial config state w/ env vars
This introduces a set of environment variables that can be used for
defining initial config state, to expedite the process of
destroying/relaunching instances quickly with the same settings every
time.

Closes #228

Closes #195
2021-04-05 11:00:56 -04:00
Shimul 8a10efaa01 Allow setting environment variables in whoogle.env (#237)
This allows the user to enable their preferred settings in a variety of
ways, depending on their deployment preference. Values added to
whoogle.env can be enabled using WHOOGLE_DOTENV=1, in which case all
values in the env var file will overwrite defaults or user provided
settings.

Co-authored-by: Ben Busby <benbusby@protonmail.com>
2021-04-05 11:00:56 -04:00
Nico b2416394ff Add Garuda Linux public instance (#241)
Co-authored-by: Ben Busby <benbusby@protonmail.com>
2021-04-05 11:00:56 -04:00
Ben Busby 8f6d9cf3f5 Remove public instance from readme
I've received multiple reports that the Whoogle instance hosted at 
whoogle.tormentasolar.win is spam, so it has been removed from the
readme.
2021-04-05 11:00:56 -04:00
fredster33 ad0b48b034 Reformat public instance links in readme (#224)
Co-authored-by: Ben Busby <benbusby@protonmail.com>
2021-04-05 11:00:56 -04:00
FireMasterK 6f46facf9e Add new public instances (#223) 2021-04-05 11:00:56 -04:00
Ben Busby 0e2757fc07 Update heroku quick deploy branch, env vars in readme
The Heroku quick deploy branch has been changed from heroku-app to
heroku-app-beta, since a lot of users want to use features from develop
in their heroku instances.

The environment variables in the readme were updated to include the
reddit redirect var.
2021-04-05 11:00:56 -04:00
Nico 1d612c68a4 Add Arch Linux installation instructions to readme (#217) 2021-04-05 11:00:56 -04:00
Ben Busby 3ed0cf02bf List public instances in readme
Note: future public instances should be added with a PR
2021-04-05 11:00:56 -04:00
Ben Busby 6600d8580c Add ability to redirect reddit.com to libredd.it (#180)
* Adds the ability to redirect reddit.com to libredd.it using the existing
 "site alts" config setting.

This adds the WHOOGLE_ALT_RD environment variable for optionally
redirecting reddit links to libreddit
(https://github.com/spikecodes/libreddit).

* Include libreddit in home page site alt note
2021-04-05 11:00:56 -04:00
Ben Busby fad937fe08
Update ARM instructions for docker 2021-01-05 18:09:00 -05:00
Ben Busby d4a4a03de1
Add pep8 workflow badge to readme 2020-12-17 16:08:32 -05:00
Spike dad80ff8fb
Update repl.it info in readme (#157)
Repl.it has deprecated the anonymous experience so I have removed the part of the README stating that users can host on Repl.it without an account. -- @spikecodes
2020-12-11 19:09:12 -05:00
Ben Busby 6c429e6dd1
Allow setting site alts using environment vars (#155)
* Add ability to configure site alts w/ env vars

Site alternatives (i.e. twitter.com -> nitter.net) can now be configured
using environment variables:

WHOOGLE_ALT_TW='nitter.net' # twitter alt
WHOOGLE_ALT_YT='invidio.us' # youtube alt
WHOOGLE_ALT_IG='bibliogram.art/u' # instagram alt

Updated testing to confirm results have been modified.

* Add site alt vars to docker settings and readme
2020-12-05 17:01:21 -05:00
Ben Busby 54109874fb
Move screenshots/branding to separate docs folder 2020-12-04 10:53:12 -05:00
Ben Busby a97e837b09 Default to disabled environment vars, update readme
Environment variables should by default be disabled, since they are
optional and need further configuration by the user before enabling.

Readme was updated to reflect this approach, as well as moving the
documentation for the variables a bit lower and properly linking to them
in other areas of the readme.
2020-11-03 17:28:43 -05:00
Paolo Basso 4447cb682a
Document environment variables (#143)
Adds documentation for all available envirnrment variables to the README

Co-authored-by: Ben Busby <benbusby@protonmail.com>
2020-11-03 16:28:42 -05:00
Ben Busby 0ef098069e
Add tor and http/socks proxy support (#137)
* Add tor and http/socks proxy support

Allows users to enable/disable tor from the config menu, which will
forward all requests through Tor.

Also adds support for setting environment variables for alternative
proxy support. Setting the following variables will forward requests
through the proxy:
    - WHOOGLE_PROXY_USER (optional)
    - WHOOGLE_PROXY_PASS (optional)
    - WHOOGLE_PROXY_TYPE (required)
      - Can be "http", "socks4", or "socks5"
    - WHOOGLE_PROXY_LOC  (required)
      - Format: "<ip address>:<port>"

See #30

* Refactor acquire_tor_conn -> acquire_tor_identity

Also updated travis CI to set up tor

* Add check for Tor socket on init, improve Tor error handling

Initializing the app sends a heartbeat request to Tor to check for
availability, and updates the home page config options accordingly. This
heartbeat is sent on every request, to ensure Tor support can be
reconfigured without restarting the entire app.

If Tor support is enabled, and a subsequent request fails, then a new
TorError exception is raised, and the Tor feature is disabled until a
valid connection is restored.

The max attempts has been updated to 10, since 5 seemed a bit too low
for how quickly the attempts go by.

* Change send_tor_signal arg type, update function doc

send_tor_signal now accepts a stem.Signal arg (a bit cleaner tbh). Also
added the doc string for the "disable" attribute in TorError.

* Fix tor identity logic in Request.send

* Update proxy init, change proxyloc var name

Proxy is now only initialized if both type and location are specified,
as neither have a default fallback and both are required. I suppose the
type could fall back to http, but seems safer this way.

Also refactored proxyurl -> proxyloc for the runtime args in order to
match the Dockerfile args.

* Add tor/proxy support for Docker builds, fix opensearch/init

The Dockerfile is now updated to include support for Tor configuration,
with a working torrc file included in the repo.

An issue with opensearch was fixed as well, which was uncovered during
testing and was simple enough to fix here. Likewise, DDG bang gen was
updated to only ever happen if the file didn't exist previously, as
testing with the file being regenerated every time was tedious.

* Add missing "@" for socks proxy requests
2020-10-28 20:47:42 -04:00
Ben Busby 58a7868d25
Update README.md
Added DDG-style bang searches to feature list in the readme, removed Gitter chat badge
2020-10-21 13:16:32 -04:00
Ben Busby dfb1e81fa1 Added search input auto focus, updated README
The javascript controller has been updated to include a call to focus
the cursor on the search field. This previously had only been seen on
Firefox, and was assumed to be a weird FF-specific bug. Adding in a
timeout to allow elements to finish loading allows the field to be
focused as expected.

Also updated the README to include clarification for IP address
tracking.
2020-09-30 10:26:27 -04:00
Ben Busby a1894975af Merge remote-tracking branch 'origin/master' into develop 2020-09-07 07:43:43 -06:00
Dee-Jay Logozzo 481c5d1798
Added instructions for Android Firefox >=79.0.0 (#119)
* Added instructions for Android Firefox >=79.0.0

Long pressing on the search bar and selecting "Add search engine" no longer works as of Android Firefox 79.0.0

* Update README.md

* Corrected search strings to use backticks
2020-09-07 07:42:11 -06:00
Chad Smith 6ba5e8f165
fix pipx run command (#118)
Add the required `--spec` argument
2020-08-20 13:40:34 -06:00
Spike f4eca3711b
Allow for free deployment to Repl.it (#114)
* Update README.md with instructions for deploying via Repl.it

* Create .replit
2020-08-11 23:06:16 -06:00
Ben Busby 3d7456f37b
Added gitter badge 2020-07-08 23:26:04 -06:00
Ben Busby d859e46a6c
Update README.md
Added clarification for enforcing https
2020-06-09 10:58:19 -06:00
Ben Busby 77c4920e83
Update README.md 2020-05-25 10:58:57 -06:00
Ben Busby 21012f5265
Feature: autocomplete/search suggestions (#72)
Basic autocomplete/search suggestion functionality added

* Adds new GET and POST routes for '/autocomplete' that accept a string query and returns an array of suggestions

* Adds new autoscript.js file for handling queries on the main page and results view

* Updated requests class to include autocomplete method

* Updated opensearch template to handle search suggestions

* Added header template to allow for autocomplete on results view

* Updated readme to mention autocomplete feature
2020-05-24 14:03:11 -06:00
Ben Busby c9f99b3eb6
Fixed docker hub instructions 2020-05-22 16:33:06 -06:00
Ben Busby 516bc765b0
Update README.md
Fixed docker badge link
2020-05-20 12:55:23 -06:00
Ben Busby d2b60544c5
Update README.md
Added instructions for setting default search engine while using a reverse proxy
2020-05-20 11:11:07 -06:00
Ben Busby ea37044d67
Minor change to systemd setup
I thought this was addressed during the pull request, but I guess not?
2020-05-15 17:05:46 -06:00
thomcatdotrocks 46b6c66312
Added instructions for running with systemd (#45)
Co-authored-by: ThomCat <me@thomcat.rocks>
2020-05-15 17:04:01 -06:00
Ben Busby 11fa44eec1 Minor refactoring for clarification
Executable renamed to "run" to avoid confusion with pip installed script

Updated heroku deploy button to use the heroku-app branch, which by
default enforces HTTPS

Added instructions for enforcing HTTPS on various deployment options,
with note about how this isn't a required task.

Updated setup.py description to use improved app description
2020-05-15 16:47:39 -06:00
Paul Rothrock 0e9bbc737d
Add Alfred Instructions (#52) 2020-05-15 16:01:26 -06:00
Ben Busby 1ed6178e9a
Feature: https only -- adds option to enforce https on running instances (#48)
* Adding HTTPS enforcement

Command line runs of Whoogle Search through pip/pipx/etc will need the
`--https-only` flag appended to the run command.

Docker runs require the `use_https` build arg applied.

* Update README.md

Moved https-only note to top of docker run command, updated pip runner help output

* Dockerfile: removed HTTPS enforcement, updated PORT setting

Dockerfile no longer enforces an HTTPS connection, but still allows for
setting via a build arg. The Flask server port is now configurable as a
build arg as well, by setting a port number to "whoogle_port"

* Fixed incorrect port assignment
2020-05-15 15:44:50 -06:00
Ben Busby e3d002f6c1 Updated readme with more docker instructions 2020-05-15 10:07:11 -06:00
Jake Howard f700ed88e7
Swap out Flask's default web server for Waitress (#32)
* Ignore venv when building docker file

* Remove reference to 8888 port

It wasn't really used anywhere, and setting it to 5000 everywhere removes ambiguity, and makes things easier to track and reason about

* Use waitress rather than Flask's built in web server

It's not production grade

* Actually add waitress to requirements

Woops!
2020-05-12 17:14:55 -06:00
Ben Busby f7e69bded1
Minor punctuation fix 2020-05-12 00:51:00 -06:00
ygsk10 f36a63e3f0
Update README.md (#22)
* Update README.md

* Update README.md
2020-05-11 19:08:35 -06:00
Ben Busby 2fc48ced6a
Merge pull request #10 from DjLogozzo/master
Added Firefox Android instructions for primary search settings
2020-05-10 11:11:01 -06:00
Dee-Jay Logozzo 05f6ad2815
Added Firefox Android instructions for setting whoogle as primary search engine 2020-05-10 20:19:39 +10:00
mendel5 3a4a8ce95b
fix spelling: Whoole --> Whoogle 2020-05-10 10:53:19 +02:00
Ben Busby 3d38b80833
Small update to readme
Clarified the heroku app naming section
2020-05-08 13:19:51 -06:00
Ben Busby 1ae946eab7
Update README.md 2020-05-08 13:15:17 -06:00
Ben Busby 68da3cd4cd Updated readme with pip instructions, fixed travis badge 2020-05-08 10:38:01 -06:00
Ben Busby d1a268551e
Update README.md 2020-05-06 19:08:25 -06:00
Ben Busby d01f56ea03 Removed referrer from links, refacored routes
Added <meta name="referrer" content="no-referrer"> to all whoogle
templates

Refactored search route to use conditionally use either request.args or
request.form, depending on rest call (get vs post respectively)
2020-05-05 18:28:43 -06:00
Ben Busby ab317fa0d0
Update README.md
Replaced img header with regular text header
2020-05-04 18:06:38 -06:00
Ben Busby 29a13d0e6e
Update README.md
Fixed separator formatting
2020-05-04 18:03:11 -06:00
Ben Busby 708769f682 Minor styling refactor, updated app name 2020-05-04 18:00:43 -06:00
Ben Busby 0300eab6df Updated formatting and setup instructions
Switched encoding from utf-8 to unicode-escape in an effort to support multiple
languages besides English.

Updated image results page formatting to fix bad image links (added TODO
for adding full res image link for each image result).

Updated README to include libcurl and libssl install instructions for
manual setup.
2020-05-03 19:32:47 -06:00
Ben Busby 0c0ebb8917 Added POST search, encrypted query strings, refactoring
The implementation of POST search support comes with a few benefits. The
most apparent is the avoidance of search queries appearing in web server
logs -- instead of the prior GET approach (i.e.
/search?q=my+search+query), using POST requests with the query stored in
the request body creates logs that simply appear as "/search".

Since a lot of relative links are generated in the results page, I came
up with a way to generate a unique key at run time that is used to
encrypt any query strings before sending to the user. This benefits both
regular text queries as well as fetching of image links and means that
web logs will only show an encrypted string where a link or query
string might slip through.

Unfortunately, GET search requests still need to be supported, as it
doesn't seem that Firefox (on iOS) supports loading search engines by
their opensearch.xml file, but instead relies on manual entry of a
search query string. Once this is updated, I'll probably remove GET
request search support.
2020-04-28 18:19:34 -06:00
Ben Busby 5d6256662f
Update README.md
Fixed typo in location based searching
2020-04-27 11:12:40 -06:00
Ben Busby 36ce44ae6a
Update README.md 2020-04-26 18:00:29 -06:00
Ben Busby fe0f17588a
Update README.md
Updated "Setup" section to clarify that docker setup is unnecessary if using Heroku quick deploy, and restructured to include local setup instructions as well.
2020-04-25 11:30:44 -06:00
Ben Busby 1f6bfa092e Complete refactoring of opensearch
Refactored opensearch.xml to only exist as a template that is
served by a flask route, which is then populated with the
necessary url root.
2020-04-24 18:45:57 -06:00
Ben Busby 79f5c607eb
Update README.md
Added clarification for prerequisites if using the Heroku single-click deploy option
2020-04-24 18:06:28 -06:00
Ben Busby ae94650aee
Updated README
Added single click deploy option for heroku
2020-04-24 18:02:28 -06:00
Ben Busby e21341d6f4 Deployment related refactoring, fixes to Dockerfile
- Updated Dockerfile to include chmod of run script
- Added app.json for Heroku quick deploy
- Removed unused function var in js controller
- Moved requirements back to root of repo
- Added Codebeat report to readme
2020-04-24 17:23:08 -06:00
Ben Busby 6f80c35fd2
Fixed missing releases link in readme 2020-04-19 15:47:27 -06:00
Ben Busby 1713bcbf23
Update README.md 2020-04-19 15:43:44 -06:00
Ben Busby 31b9e19af7 Fixed main banner in readme 2020-04-19 15:28:40 -06:00
Ben Busby 67e3c788c7 Updated readme, added screenshots 2020-04-19 15:23:39 -06:00
Ben Busby 2631335dbf Updated README 2020-04-16 18:37:24 -06:00
Ben Busby b5351c8502
Update README.md 2020-04-15 18:06:59 -06:00
Ben Busby b5b6e64177 Added testing and ci build, refactored filter class, refactored project structure 2020-04-15 17:41:53 -06:00
Ben Busby 56417787ab
Fixed typo 2020-04-12 13:52:08 -06:00
Ben Busby 3412e3cd59
Added instructions for preventing heroku downtime 2020-04-12 13:51:27 -06:00
Ben Busby 58bd93dbd0
Update README.md 2020-04-11 17:10:11 -06:00
Ben Busby 48b9f66490 Fixed incorrect opensearch template, updated readme 2020-04-11 15:57:06 -06:00
Ben Busby 20fce34db3 Added opensearch setup 2020-04-11 15:24:00 -06:00
Ben Busby 137f92d432
Added heroku setup instructions to README 2020-04-11 14:59:32 -06:00
Ben Busby c3f29a3993
Updated readme (WIP) 2020-04-03 12:14:41 -06:00
Ben Busby 6e7eef165e Initial commit 2020-01-21 13:26:49 -07:00