Commit Graph

30 Commits

Author SHA1 Message Date
Ben Busby
130ac4532e Refactored handling of user config
Now implemented as a flask global variable reads from the same json file
as before, but doesn't crash if it does not find an existing file.

Removed user config creation from run script
2020-05-06 18:39:12 -06:00
Ben Busby
d316fd77c6 Updated setup and routes for pipx compatibility 2020-05-06 18:13:02 -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
708769f682 Minor styling refactor, updated app name 2020-05-04 18:00:43 -06:00
Ben Busby
3e404cb524 Restructured valid params checking, added empty query redirect 2020-04-29 18:53:58 -06:00
Ben Busby
0a3da5cea4 Updated js controller and config api route
Controller was refactored to be a bit less monolithic.

Config route was updated to accept an html form data POST rather than
just a json object.
2020-04-28 20:50:12 -06:00
Ben Busby
1cbe394e6f Updated tests, fixed a few bugs
Added opensearch routes test and individual tests for searching via GET
and POST separately.

Fixed incorrect assignment in gen_query.
2020-04-28 18:59:33 -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
4180aedd87 Added image proxying, refactored filter class
Images were previously directly fetched from google search results,
which was a potential privacy hazard. All image sources are now modified
to be passed through shoogle's routing first, which will then fetch raw
image data and pass it through to the user.

Filter class was refactored to split the primary clean method into
smaller, more manageable submethods.
2020-04-27 20:21:36 -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
a7005c012e Refactoring of user requests and routing
Curl requests and user agent related functionality was moved to its own
request class.

Routes was refactored to only include strictly routing related
functionality.

Filter class was cleaned up (had routing/request related logic in here,
which didn't make sense)
2020-04-23 20:59:43 -06:00
Ben Busby
024552f2df Minor refactor of filter class, updated tests, fixed html/css, added ua to config 2020-04-16 10:01:02 -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
ea7ddce7b3 Updated dockerfile and run script to work with heroku deployment 2020-04-11 14:37:15 -06:00
Ben Busby
850a46aea1 Refactored routes, added filter class for returned results, added dockerignore 2020-04-10 14:52:27 -06:00
Ben Busby
5bfc4d9a74 Added user config for nojs links and dark mode, minor styling updates 2020-04-08 12:47:21 -06:00
Ben Busby
a00ccb1da8 Small fix for viewing images on mobile, updated document title formatting 2020-04-08 18:11:08 +00:00
Ben Busby
2411f9de8d Fixed bug in nojs config setting, updated pages to use new favicon and proper headers 2020-04-07 14:12:16 -06:00
Ben Busby
5687c87a65 Adding optional nojs links to results page, changed nojs to a user setting 2020-04-07 17:04:03 +00:00
Ben Busby
6a82f6e1ad Added filtering of sponsored content 2020-04-06 18:20:44 +00:00
Ben Busby
066c253c4d Added ability to update config from home page 2020-04-05 17:59:50 -06:00
Ben Busby
9c0b4a7f58 Minor fix for filtering by time range 2020-04-05 16:37:35 -06:00
Ben Busby
254c987254 Added filter by date range, minor aesthetic changes 2020-04-05 16:15:46 -06:00
Ben Busby
9fbaa1d6cf Added run script, updated to use config json file for general location, general restyling 2020-04-04 19:30:53 -06:00
Ben Busby
d90468c667 Updated to remove ads, minor renaming refactor 2020-04-03 18:02:45 +00:00
Ben Busby
24aa4367d3 Added optional no-js functionality, added location based searching (hardcoded), updated html 2020-02-21 23:52:29 +00:00
Ben Busby
4636b0f695 Added html parsing to remove returned scripts, added logo 2020-01-23 06:19:17 +00:00
Ben Busby
a922b42cbd Added desktop/mobile agent switching, updated gitignore 2020-01-22 05:51:02 +00:00
Ben Busby
1e1bb4a55a Added tbm (images/news/etc) handling, updated front page and search controls 2020-01-21 18:07:08 -07:00
Ben Busby
6e7eef165e Initial commit 2020-01-21 13:26:49 -07:00