Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ apps/mobile/android/
apps/mobile/ios/

# Bundled at build time (fetched, GPL — not vendored)
apps/desktop/extensions/ublock-origin/

# Ubuntu Touch click staging (assembled from the release tarball)
distribution/ubuntu-touch/install/
Expand Down
12 changes: 7 additions & 5 deletions apps/desktop/launcher/tronbrowser
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ while [ -L "$SELF" ]; do
esac
done
DIR="$(CDPATH= cd -- "$(dirname -- "$SELF")" && pwd)"
EXTBASE_SRC="$DIR/extensions" # holds ai-sidebar + ublock-origin (uBlock Origin)
EXTBASE_SRC="$DIR/extensions" # holds ai-sidebar + marksyncr

# --- Tor mode -------------------------------------------------------------
# `tron --tor [url...]` routes traffic through a local Tor daemon (SOCKS5) and
Expand Down Expand Up @@ -441,8 +441,10 @@ if [ "$TOR" != "1" ]; then
printf '%s\n' "$ENGINE" > "$ENGINE_MARK" 2>/dev/null || true
fi

# Keep Manifest V2 working so uBlock Origin (MV2) loads — recent Chromium disables
# MV2 by default. (Ungoogled keeps MV2, but force it off everywhere to be safe.)
# Keep Manifest V2 working — recent Chromium disables MV2 by default, which
# silently breaks any MV2 extension the user installed themselves. We no longer
# bundle one, but the kill switch is not ours to flip on their behalf.
# (Ungoogled keeps MV2, but force it off everywhere to be safe.)
MV2_KEEP="ExtensionManifestV2Disabled,ExtensionManifestV2Unsupported,ExtensionManifestV2DeprecationWarning,ExtensionManifestV2DeprecationUnsupported"
FLAGS="--user-data-dir=$DATA --class=TronBrowser --no-first-run --no-default-browser-check --no-pings --disable-background-networking --disable-breakpad --disable-domain-reliability --disable-sync --disable-features=Translate,OptimizationHints,InterestFeedContentSuggestions,$MV2_KEEP --load-extension=$EXT"

Expand Down Expand Up @@ -480,8 +482,8 @@ fi
#
# --enable-features / --disable-features merge rather than being replaced: they
# are comma-separated lists, and dropping ours wholesale would quietly re-enable
# the Manifest V2 kill switch (uBlock Origin stops loading) just because the
# caller wanted one unrelated feature. Rotating through "$@" to pull those two
# the Manifest V2 kill switch (every MV2 extension stops loading) just because
# the caller wanted one unrelated feature. Rotating through "$@" to pull those two
# out is the same idiom --tor is stripped with above.
#
# This runs BEFORE the Tor block on purpose. Tor's proxy flags are a guarantee,
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/launcher/tronbrowser.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
setlocal enabledelayedexpansion
rem TronBrowser launcher (Windows). Runs Ungoogled Chromium ONLY (never Chrome,
rem Edge, Brave, or regular Chromium) with TronBrowser privacy flags + bundled
rem extensions (AI sidebar + uBlock Origin). `tron <url>` passes URLs through.
rem extensions (AI sidebar + MarkSyncr). `tron <url>` passes URLs through.
rem Mirrors apps/desktop/launcher/tronbrowser (POSIX). Override the binary with
rem set "TRONBROWSER_BROWSER=C:\path\to\ungoogled-chromium\chrome.exe".
set "DIR=%~dp0"
Expand Down
29 changes: 2 additions & 27 deletions apps/desktop/scripts/build-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Assemble TronBrowser release archives (launcher shim + AI sidebar + uBlock
# Origin + chromium-web-store extensions)
# Assemble TronBrowser release archives (launcher shim + AI sidebar + MarkSyncr
# + chromium-web-store extensions)
# for a given platform. Until the native fork binary is built, this packages the
# launcher; asset names are stable so install.sh / package managers are unchanged.
#
Expand All @@ -14,25 +14,6 @@ DESKTOP="$REPO_ROOT/apps/desktop"
OUT="$REPO_ROOT/dist"
mkdir -p "$OUT"

# Fetch uBlock Origin ONCE (the per-platform stage() copies from here). Full
# uBlock Origin is MV2 — Ungoogled Chromium keeps MV2 support, so we ship the
# real thing (not uBO Lite). The release asset name carries the version, so we
# resolve the latest .chromium.zip via the GitHub API. Entirely non-fatal.
UBO_SRC=""
fetch_ublock() {
command -v python3 >/dev/null 2>&1 || { echo " ! uBlock skipped (no python3)"; return; }
local url
url="$(curl -fsSL https://api.github.com/repos/gorhill/uBlock/releases/latest 2>/dev/null \
| python3 -c 'import sys,json;d=json.load(sys.stdin);print(next((a["browser_download_url"] for a in d["assets"] if a["name"].endswith(".chromium.zip")),""))' 2>/dev/null)" || true
[ -n "$url" ] || { echo " ! uBlock resolve skipped (non-fatal)"; return; }
local z d m; z="$(mktemp)"; d="$(mktemp -d)"
if curl -fsSL "$url" -o "$z" 2>/dev/null && unzip -q -o "$z" -d "$d" 2>/dev/null; then
m="$(find "$d" -maxdepth 2 -name manifest.json | head -1)"
if [ -n "$m" ]; then UBO_SRC="$(dirname "$m")"; echo " + fetched uBlock Origin ($url)"; fi
fi
rm -f "$z" # keep $d (UBO_SRC lives inside) until the script exits
}

# Fetch MarkSyncr ONCE from the Chrome Web Store (latest published CRX). Open
# source (github.com/profullstack/marksyncr.com), MV3 bookmark sync. Non-fatal.
MKS_ID="hjcjjcpialiakkalcgadnfnoomdaegjg"
Expand Down Expand Up @@ -141,11 +122,6 @@ DESKTOP
# installs are instead handled by the AI sidebar's install-helper.js content
# script (adds a working "Add to TronBrowser" button → CRX install prompt).

# Default ad/tracker blocker: uBlock Origin (fetched once into $UBO_SRC).
if [ -n "$UBO_SRC" ] && [ -d "$UBO_SRC" ]; then
mkdir -p "$s/extensions/ublock-origin"
cp -R "$UBO_SRC/." "$s/extensions/ublock-origin/"
fi
# Bundled bookmark sync: MarkSyncr (fetched once into $MKS_SRC).
if [ -n "$MKS_SRC" ] && [ -d "$MKS_SRC" ]; then
mkdir -p "$s/extensions/marksyncr"
Expand All @@ -164,7 +140,6 @@ build_archive() { # ext-type
rm -rf "$t"
}

fetch_ublock
fetch_marksyncr

case "$PLATFORM" in
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/test/launcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('launcher flags', () => {
});

it('merges --disable-features, keeping the Manifest V2 kill switch off', () => {
// Dropping ours here would stop uBlock Origin (MV2) from loading.
// Dropping ours here would stop every MV2 extension from loading.
const { argv } = run(['--disable-features=Foo']);
const disabled = valueOf(argv, '--disable-features');
expect(disabled).toHaveLength(1);
Expand Down
1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default tseslint.config(
'**/.expo/**',
'**/node_modules/**',
'apps/desktop/chromium/**',
'apps/desktop/extensions/ublock-origin/**', // fetched at build time, GPL, not vendored
'pnpm-lock.yaml',
],
},
Expand Down
Loading