Commit Graph

268 Commits (271782bead7d369847a71264f97e35fcfc7ca6a5)
 

Author SHA1 Message Date
Nico 271782bead
Add Garuda Linux public instance (#241)
Co-authored-by: Ben Busby <benbusby@protonmail.com>
4 years ago
Ben Busby 9a097d79d4
Add custom builder image to buildx action
Also added debug to list architectures for buildx. Needless to say,
the buildx action is super flakey (as evidenced by a change to the
README breaking the entire build somehow).
4 years ago
Ben Busby fba8e3d9f8
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.
4 years ago
Ben Busby f4a087303d
Improve static typing throughout repo
Eventually this should be part of a separate mypy ci build, but right
now it's just a general guideline. Future commits and PRs should be
validated for static typing wherever possible.

For reference, the testing commands used for this commit were:

mypy --ignore-missing-imports --pretty --disallow-untyped-calls app/
mypy --ignore-missing-imports --pretty --disallow-untyped-calls test/
4 years ago
Shimul c893f5d7a2
Configure PWA for mobile browsers (#234)
Fix PWA issue for mobile phones
Fix icon loading issue
Update app/static/img/favicon/manifest.json

Co-authored-by: Ben Busby <benbusby@pm.me>
4 years ago
Ben Busby d81b232248
Re-add search css to results page
The results page search css was removed during the refactor to allow for
user defined css. This adds that back.
4 years ago
fredster33 bba3c32313
Reformat public instance links in readme (#224)
Co-authored-by: Ben Busby <benbusby@protonmail.com>
4 years ago
Shimul dc20de6fed
Fixing typo in Dockerfile (#235) 4 years ago
Ben Busby 56258a16b0
Return 503 if response is blocked by captcha
Also added in a slight modification to the dark theme style, which
should only apply the border radius in the header.

Closes #226
4 years ago
Ben Busby c0f4ba99cf
Allow user-defined CSS/theming (#227)
* Add custom CSS field to config

This allows users to set/customize an instance's theme and appearance to
their liking. The config CSS field is prepopulated with all default CSS
variable values to allow quick editing.

Note that this can be somewhat of a "footgun" if someone updates the
CSS to hide all fields/search/etc. Should probably add some sort of
bandaid "admin" feature for public instances to employ until the whole
cookie/session issue is investigated further.

* Symlink all app static files to test dir

* Refactor app/misc/*.json -> app/static/settings/*.json

The country/language json files are used for user config settings, so
the "misc" name didn't really make sense. Also moved these to the static
folder to make testing easier.

* Fix light theme variables in dark theme css

* Minor style tweaking
4 years ago
Shimul e4299f7a72
Handle manifest-src in CSP (#231) 4 years ago
dependabot[bot] d9dcbfccb9
Bump jinja2 from 2.10.3 to 2.11.3 (#229)
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10.3 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.10.3...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
FireMasterK 5da53fb50f
Add new public instances (#223) 4 years ago
Ben Busby 8e0fffc181
Use bash for heroku-regen 4 years ago
Ben Busby fea76c927d
Add heroku-regen script, rename config/ -> misc/
Introduces a new script for quickly regenerating a Heroku instance
(typically with a new IP) to handle the rare circumstances where an
instance is flagged by Google and prompted for a captcha.

The config/ dir was renamed to misc/ to avoid confusion with the Docker
mounted config volume, and to more closely match its intended purpose
(which is to contain all miscellaneous features/scripts/etc that add
functionality to Whoogle, but are not critical for general use).
4 years ago
Ben Busby f4b8b7bc2d
Add UI requests note to feature template
The feature request template should not be used for requesting updates to the UI.

There's already a pinned issue for UI customization, and all requests should go there.
4 years ago
Ben Busby e2080f0592
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.
4 years ago
Ben Busby ba7493a846
Add healthcheck to Dockerfile
See #184
4 years ago
Ben Busby d447e5009f
Improve naming of *_utils files, update fn/class doc
The app/utils/*_utils weren't named very well, and all have been updated
to have more accurate names.

Function and class documention for the utils have been updated as well,
as part of the effort to improve overall documentation for the project.
4 years ago
Nico 855b4e8502
Add Arch Linux installation instructions to readme (#217) 4 years ago
Ben Busby a1134e7633
Send CSP header in all responses
Introduces a new content security policy header for responses to all
requests to reduce the possibility of ip leaks to outside connections.
By default blocks all inline scripts, and only allows content loaded
from Whoogle.

Refactors a few small inline scripting cases in the project to their own
individual scripts.
4 years ago
Ben Busby e912b8f5e0
Move ssl install to Dockerfile build stage 4 years ago
Ben Busby 08379efa26
Remove auth req for accessing opensearch
Requiring authentication for accessing the opensearch template prevents
the browser from accessing the file when adding as a default search
engine. This removes the authentication requirement from the opensearch
route, which should never provide any sensitive information anyways.
4 years ago
Basti b3ae0b7594
Use multi-stage container build (#210)
This only adds necessary packages and files from the repo to reduce the image size.

Co-authored-by: pred2k <does@not.exists>
4 years ago
Basti 2e599c0a7e
Update docker-compose security features (#208)
Co-authored-by: Sebastian Forst <sebastian.forst@posteo.de>
4 years ago
Ben Busby 6c85468cd6
Allow bang operator anywhere in query
Bang operator can now be placed anywhere in the query, to allow for peak
efficiency in stream of consciousness querying (i.e. `big !reddit
chungus` will search reddit for big chungus`).

Fixes #196
4 years ago
Ben Busby e066a19411
Ensure G logo doesn't appear in mobile img results
Adds a separate check to remove all images sourced from www.gstatic.com,
which is where the mobile logo in particular is coming from.
4 years ago
Ben Busby 38f160142e
Add basic keyboard support #202
This adds basic keyboard support on the search results page:

    ArrowUp or k - focus previous result
    ArrowDown or j - focus next result
    / focus search box

Because this just focuses links in the search result items hitting Enter
(or ctrl/cmd + Enter) when an item is focused - will open the search 
result (because the link is already focused and this is browser's default
behaviour).
4 years ago
Tomasz Borychowski 4bbfc8c8f7 fix 'j' and 'k' inside search input 4 years ago
Ben Busby 3958e607de
Merge branch 'develop' into develop 4 years ago
Roman Štefko c5fdf84635
Do not autocapitalize on index page search bar (#200) 4 years ago
Tomasz Borychowski 04718099f4 add basic keyboard support 4 years ago
Ben Busby 16b3d0f543
List public instances in readme
Note: future public instances should be added with a PR
4 years ago
dependabot[bot] 5689285816
Bump cryptography from 3.2 to 3.3.2 (#193)
Bumps [cryptography](https://github.com/pyca/cryptography) from 3.2 to 3.3.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/3.2...3.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
Ben Busby 35b555273c
Merge remote-tracking branch 'origin/main' into develop 4 years ago
Ben Busby 0a6575d219
Hotfix: Move language/country json to app dir
Pip installs of whoogle search were missing access to the misc/ folder,
which previously contained the language and country json files. These
have been moved to app/misc, and the previous root level misc/ was
renamed to config/ (since it now only contains the tor config files).

Bump to 0.3.1.
4 years ago
Ben Busby 01b810b130
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
4 years ago
Ben Busby 329c38efb0
Hotfix: Enforce https in heroku opensearch template
Heroku instances were using the base http url when formatting the
opensearch.xml template. This adds a new routing utility, "needs_https",
which can be used for determining if the url in question needs
upgrading.
4 years ago
Ben Busby 5c69283e80
Hotfix: Add hidden submit btn for nojs searches
With javascript disabled, searches could not be submitted on the results
page using the "Enter" key. Adding a hidden submit button to the header
template resolves this issue.
4 years ago
Ben Busby 406e236666
Bump version to 0.3.0 4 years ago
Ben Busby 7e39b4e7a0
Fix default site alts in Dockerfile
The Dockerfile was incorrectly assigning an empty string to the site alt
values, which caused the filter to update relevant sites with an empty
host. This replaces the empty string with the correct domain for each
site alternative.
4 years ago
Ben Busby fad937fe08
Update ARM instructions for docker 4 years ago
Ben Busby 934749e0b8
Add docker buildx gh action
This automatically builds and pushes a cross platform image to Docker
Hub.
4 years ago
Ben Busby 440c4e9c50
Remove lxml dependency
The lxml dependency in the project was fairly unnecessary, and made the
initial build time for the project considerably slower. This replaces
all instances of lxml with either the default html parser (for bs4
constructors) or the built in xml.etree package (for search suggestion
parsing).
4 years ago
Ben Busby 2bbc649903
Add support for UPS/USPS/FedEx tracking queries
Introduces a new javascript "utils" file, which includes a check for
matching the query against a set of tracking number regexes on page
load. If a match is found, the script prepends a link to the
(presumably) appropriate tracking page.

Referenced in #98
4 years ago
Ben Busby 6e7ec9918a
Move language/country settings to app config
Moves the language and country dicts from the config model to json files
that are loaded during app init and stored in the app config dict. This
substantially improves the readability of the config model and allows
for much more sensible loading of the language/country options.
4 years ago
Ben Busby d4a4a03de1
Add pep8 workflow badge to readme 4 years ago
Ben Busby 375f4ee9fd
PEP-8: Fix formatting issues, add CI workflow (#161)
Enforces PEP-8 formatting for all python code

Adds a github action build for checking pep8 formatting using pycodestyle
4 years ago
Ziga Zajc b55aad3fdf
Use #222 for dark mode bg (#159) 4 years ago
Ben Busby b695179c79
Add ability to collapse "people also ask"
This adds a step in the filter process to wrap the "people also ask"
section in a <details> element, which automatically collapses the
contents of the section. Clicking/tapping the details element expands
the view as normal.

See #113
4 years ago