diff --git a/.github/workflows/buildx.yml b/.github/workflows/buildx.yml index 535a72a..6958087 100644 --- a/.github/workflows/buildx.yml +++ b/.github/workflows/buildx.yml @@ -20,6 +20,13 @@ jobs: - name: Wait for tests to succeed if: ${{ github.event.workflow_run.conclusion != 'success' && startsWith(github.ref, 'refs/tags') != true }} run: exit 1 + - name: Debug workflow context + run: | + echo "Event name: ${{ github.event_name }}" + echo "Ref: ${{ github.ref }}" + echo "Actor: ${{ github.actor }}" + echo "Branch: ${{ github.event.workflow_run.head_branch }}" + echo "Conclusion: ${{ github.event.workflow_run.conclusion }}" - name: checkout code uses: actions/checkout@v4 - name: Set up QEMU diff --git a/.github/workflows/docker_main.yml b/.github/workflows/docker_main.yml index e2e47e9..80dd5fb 100644 --- a/.github/workflows/docker_main.yml +++ b/.github/workflows/docker_main.yml @@ -14,7 +14,7 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: build and test (docker) run: | docker build --tag whoogle-search:test . diff --git a/Dockerfile b/Dockerfile index 5361a1a..56b029f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,14 @@ -FROM python:3.12.6-alpine3.20 AS builder +# NOTE: ARMv7 support has been dropped due to lack of pre-built cryptography wheels for Alpine/musl. +# To restore ARMv7 support for local builds: +# 1. Change requirements.txt: +# cryptography==3.3.2; platform_machine == 'armv7l' +# cryptography==46.0.1; platform_machine != 'armv7l' +# pyOpenSSL==19.1.0; platform_machine == 'armv7l' +# pyOpenSSL==25.3.0; platform_machine != 'armv7l' +# 2. Add linux/arm/v7 to --platform flag when building: +# docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64 . + +FROM python:3.12-alpine3.22 AS builder RUN apk --no-cache add \ build-base \ @@ -12,13 +22,16 @@ COPY requirements.txt . RUN pip install --upgrade pip RUN pip install --prefix /install --no-warn-script-location --no-cache-dir -r requirements.txt -FROM python:3.12.6-alpine3.20 +FROM python:3.12-alpine3.22 -RUN apk add --no-cache tor curl openrc libstdc++ +# Remove bridge package to avoid CVEs (not needed for Docker containers) +RUN apk add --no-cache --no-scripts tor curl openrc libstdc++ && \ + apk del --no-cache bridge || true # git go //for obfs4proxy # libcurl4-openssl-dev - -RUN apk --no-cache upgrade +RUN pip install --upgrade pip +RUN apk --no-cache upgrade && \ + apk del --no-cache --rdepends bridge || true # uncomment to build obfs4proxy # RUN git clone https://gitlab.com/yawning/obfs4.git diff --git a/README.md b/README.md index 037771f..66ec022 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ >works -- Whoogle requests the JavaScript-free search results, then filters out garbage from the results page and proxies all external content for the user. > >This is possibly a breaking change that may mean the end for Whoogle. We'll continue fighting back and releasing workarounds until all workarounds are ->exhausted or a better method is found. +>exhausted or a better method is found. If you know of a better way, please review and comment in our Way Forward Discussion ___ @@ -88,6 +88,17 @@ Contents ***If deployed to a remote server, or configured to send requests through a VPN, Tor, proxy, etc. ## Install + +### Supported Platforms +Official Docker images are built for: +- **linux/amd64** (x86_64) +- **linux/arm64** (ARM 64-bit, Raspberry Pi 3/4/5, Apple Silicon) + +**Note**: ARMv7 support (32-bit ARM, Raspberry Pi 2) was dropped in v1.2.0 due to incompatibility with modern security libraries on Alpine Linux. Users with ARMv7 devices can either: +- Use an older version (v1.1.x or earlier) +- Build locally with pinned dependencies (see notes in Dockerfile) +- Upgrade to a 64-bit OS if hardware supports it (Raspberry Pi 3+) + There are a few different ways to begin using the app, depending on your preferences: ___ @@ -700,7 +711,6 @@ Instead of using auto-generated Opera UA strings, you can provide your own list ``` Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.13337/22.478; U; en) Presto/2.4.15 Version/10.00 Opera/9.80 (Android; Linux; Opera Mobi/498; U; en) Presto/2.12.423 Version/10.1 -Opera/9.30 (Nintendo Wii; U; ; 3642; en) ``` 2. Set the `WHOOGLE_UA_LIST_FILE` environment variable to point to your file: diff --git a/app/models/config.py b/app/models/config.py index ed56af8..3446309 100644 --- a/app/models/config.py +++ b/app/models/config.py @@ -81,7 +81,6 @@ class Config: self.tbs = os.getenv('WHOOGLE_CONFIG_TIME_PERIOD', '') self.theme = os.getenv('WHOOGLE_CONFIG_THEME', 'system') self.safe = read_config_bool('WHOOGLE_CONFIG_SAFE') - self.dark = read_config_bool('WHOOGLE_CONFIG_DARK') # deprecated self.alts = read_config_bool('WHOOGLE_CONFIG_ALTS') self.nojs = read_config_bool('WHOOGLE_CONFIG_NOJS') self.tor = read_config_bool('WHOOGLE_CONFIG_TOR') diff --git a/app/routes.py b/app/routes.py index 59a14f0..b176000 100644 --- a/app/routes.py +++ b/app/routes.py @@ -217,9 +217,7 @@ def index(): translation=app.config['TRANSLATIONS'][ g.user_config.get_localization_lang() ], - logo=render_template( - 'logo.html', - dark=g.user_config.dark), + logo=render_template('logo.html'), config_disabled=( app.config['CONFIG_DISABLE'] or not valid_user_session(session)), @@ -581,7 +579,7 @@ def search(): languages=app.config['LANGUAGES'], countries=app.config['COUNTRIES'], time_periods=app.config['TIME_PERIODS'], - logo=render_template('logo.html', dark=g.user_config.dark), + logo=render_template('logo.html'), query=urlparse.unquote(query), search_type=search_util.search_type, mobile=g.user_request.mobile, diff --git a/app/templates/display.html b/app/templates/display.html index c044512..a742284 100644 --- a/app/templates/display.html +++ b/app/templates/display.html @@ -26,10 +26,12 @@ {% else %} {% endif %} - {% else %} - {% endif %} - + {% if config.style %} + + {% endif %} {{ clean_query(query) }} - Whoogle Search diff --git a/app/templates/error.html b/app/templates/error.html index 839f8bc..c7a41eb 100644 --- a/app/templates/error.html +++ b/app/templates/error.html @@ -7,8 +7,6 @@ {% else %} {% endif %} -{% else %} - {% endif %} {% if bundle_static() %} diff --git a/app/templates/index.html b/app/templates/index.html index d4544fa..c6fe19e 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -41,8 +41,6 @@ {% else %} {% endif %} - {% else %} - {% endif %} {% if not bundle_static() %} @@ -204,10 +202,6 @@ - - - -
diff --git a/app/version.py b/app/version.py index 5e990ac..6a53b0c 100644 --- a/app/version.py +++ b/app/version.py @@ -1,8 +1,8 @@ import os -optional_dev_tag = '' +optional_dev_tag = '-update-testing' if os.getenv('DEV_BUILD'): optional_dev_tag = '.dev' + os.getenv('DEV_BUILD') -__version__ = '1.1.2' + optional_dev_tag +__version__ = '1.2.0' + optional_dev_tag diff --git a/pyproject.toml b/pyproject.toml index 0422ce1..e68ec35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [tool.ruff] line-length = 100 -target-version = "py311" +target-version = "py312" lint.select = [ "E", "F", "W", # pycodestyle/pyflakes "I", # isort @@ -13,4 +13,4 @@ lint.ignore = [] [tool.black] line-length = 100 -target-version = ['py311'] +target-version = ['py312'] diff --git a/requirements.txt b/requirements.txt index b2a71b1..fae9740 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,13 +4,12 @@ brotli==1.2.0 certifi==2025.8.3 cffi==2.0.0 click==8.3.0 -cryptography==3.3.2; platform_machine == 'armv7l' -cryptography==46.0.1; platform_machine != 'armv7l' +cryptography==46.0.1 cssutils==2.11.1 defusedxml==0.7.1 -Flask==2.3.2 +Flask==3.1.2 idna==3.10 -itsdangerous==2.1.2 +itsdangerous==2.2.0 Jinja2==3.1.6 MarkupSafe==3.0.2 more-itertools==10.8.0 @@ -18,8 +17,7 @@ packaging==25.0 pluggy==1.6.0 pycodestyle==2.14.0 pycparser==2.22 -pyOpenSSL==19.1.0; platform_machine == 'armv7l' -pyOpenSSL==25.3.0; platform_machine != 'armv7l' +pyOpenSSL==25.3.0 pyparsing==3.2.5 pytest==8.3.3 python-dateutil==2.9.0.post0 @@ -32,5 +30,5 @@ h11>=0.16.0 validators==0.35.0 waitress==3.0.2 wcwidth==0.2.14 -Werkzeug==3.0.6 +Werkzeug==3.1.3 python-dotenv==1.1.1 diff --git a/test/conftest.py b/test/conftest.py index bd9017a..28225a1 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -8,7 +8,6 @@ import random demo_config = { 'near': random.choice(['Seattle', 'New York', 'San Francisco']), - 'dark': str(random.getrandbits(1)), 'nojs': str(random.getrandbits(1)), 'lang_interface': random.choice(app.config['LANGUAGES'])['value'], 'lang_search': random.choice(app.config['LANGUAGES'])['value'], diff --git a/test/test_routes.py b/test/test_routes.py index 1f64827..9cfe975 100644 --- a/test/test_routes.py +++ b/test/test_routes.py @@ -75,14 +75,14 @@ def test_config(client): # Test disabling changing config from client app.config['CONFIG_DISABLE'] = 1 - dark_mod = not demo_config['dark'] - demo_config['dark'] = dark_mod + nojs_mod = not bool(int(demo_config['nojs'])) + demo_config['nojs'] = str(int(nojs_mod)) rv = client.post(f'/{Endpoint.config}', data=demo_config) assert rv._status_code == 403 rv = client.get(f'/{Endpoint.config}') config = json.loads(rv.data) - assert config['dark'] != dark_mod + assert config['nojs'] != nojs_mod def test_opensearch(client):