Skip to content

Commit 39ebd54

Browse files
committed
chore: promote Pro tier in first-launch banner, drop header badge
1 parent 9c3ed2d commit 39ebd54

3 files changed

Lines changed: 45 additions & 15 deletions

File tree

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
<a href="https://hub.docker.com/r/cloakhq/cloakbrowser"><img src="https://img.shields.io/docker/pulls/cloakhq/cloakbrowser?label=docker&logo=docker&logoColor=white" alt="Docker Pulls"></a>
1515
</p>
1616

17-
<p align="center">
18-
<a href="https://ko-fi.com/cloakhq"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support on Ko-fi"></a>
19-
</p>
20-
2117
<br>
2218

2319
<h3 align="center">Stealth Chromium that passes every bot detection test.</h3>

cloakbrowser/download.py

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,36 @@ class BinaryVerificationError(RuntimeError):
6262
# Auto-update check interval (1 hour)
6363
UPDATE_CHECK_INTERVAL = 3600
6464

65+
# Pro Chromium major shown in the free-tier welcome banner. Bump at each Pro
66+
# major release (there is no local constant to derive it from — the live Pro
67+
# version comes from the network, which we don't call just to print a banner).
68+
PRO_MAJOR = "148"
6569

66-
def _show_welcome() -> None:
67-
"""Show welcome message on first launch. Uses a marker file to show only once."""
70+
71+
def _show_welcome(pro: bool = False) -> None:
72+
"""Show welcome message on first launch. Uses a marker file to show only once.
73+
74+
The Pro-upsell line is shown to free-tier users only; Pro users get a plain
75+
banner (no "running free tier" message, which would be false for them).
76+
"""
6877
marker = get_cache_dir() / ".welcome_shown"
6978
if marker.exists():
7079
return
7180
sys.stderr.write("\n")
7281
sys.stderr.write(" CloakBrowser — stealth Chromium for automation\n")
7382
sys.stderr.write(" https://github.com/CloakHQ/CloakBrowser\n")
7483
sys.stderr.write("\n")
75-
sys.stderr.write(" Donate? https://ko-fi.com/cloakhq\n")
84+
if pro:
85+
sys.stderr.write(
86+
f" CloakBrowser Pro active (v{PRO_MAJOR}) — latest binary, newest patches.\n"
87+
)
88+
else:
89+
free_major = CHROMIUM_VERSION.split(".")[0]
90+
sys.stderr.write(
91+
f" Running free tier (v{free_major}). "
92+
f"Pro = latest binary (v{PRO_MAJOR}) + newest anti-bot patches.\n"
93+
)
94+
sys.stderr.write(" Stay ahead of detection → https://cloakbrowser.dev\n")
7695
sys.stderr.write(" Star us if CloakBrowser helps your project!\n")
7796
sys.stderr.write("\n")
7897
try:
@@ -232,7 +251,7 @@ def _ensure_pro_binary(license_key: str) -> str:
232251

233252
if binary_path.exists() and _is_executable(binary_path):
234253
logger.debug("Pro binary found in cache: %s (version %s)", binary_path, effective)
235-
_show_welcome()
254+
_show_welcome(pro=True)
236255
_maybe_trigger_pro_update_check(license_key)
237256
return str(binary_path)
238257

@@ -243,7 +262,7 @@ def _ensure_pro_binary(license_key: str) -> str:
243262
binary_path = get_binary_path(version, pro=True)
244263
if binary_path.exists() and _is_executable(binary_path):
245264
logger.debug("Pro binary found in cache: %s (version %s)", binary_path, version)
246-
_show_welcome()
265+
_show_welcome(pro=True)
247266
return str(binary_path)
248267

249268
logger.info("Downloading Pro Chromium %s for %s...", version, get_platform_tag())
@@ -264,7 +283,7 @@ def _ensure_pro_binary(license_key: str) -> str:
264283
except OSError:
265284
pass
266285

267-
_show_welcome()
286+
_show_welcome(pro=True)
268287
return str(binary_path)
269288

270289

js/src/download.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ import { resolveLicenseKey, validateLicense, getProLatestVersion } from "./licen
3838

3939
const DOWNLOAD_TIMEOUT_MS = 600_000; // 10 minutes
4040
const UPDATE_CHECK_INTERVAL_MS = 3_600_000; // 1 hour
41+
// Pro Chromium major shown in the welcome banner. Bump at each Pro major release
42+
// (no local constant to derive it from — the live Pro version comes from the
43+
// network, which we don't call just to print a banner). Mirrors download.py.
44+
const PRO_MAJOR = "148";
4145

4246
/**
4347
* A downloaded binary could not be authenticated (bad/missing signature,
@@ -205,15 +209,26 @@ export async function checkForUpdate(): Promise<string | null> {
205209
// Welcome message (shown once per install)
206210
// ---------------------------------------------------------------------------
207211

208-
function showWelcome(): void {
212+
function showWelcome(pro = false): void {
209213
const marker = path.join(getCacheDir(), ".welcome_shown");
210214
if (fs.existsSync(marker)) return;
211215
console.error();
212216
console.error(" CloakBrowser — stealth Chromium for automation");
213217
console.error(" https://github.com/CloakHQ/CloakBrowser");
214218
console.error();
215219
console.error(" Issues? https://github.com/CloakHQ/CloakBrowser/issues");
216-
console.error(" Donate? https://ko-fi.com/cloakhq");
220+
if (pro) {
221+
console.error(
222+
` CloakBrowser Pro active (v${PRO_MAJOR}) — latest binary, newest patches.`,
223+
);
224+
} else {
225+
const freeMajor = CHROMIUM_VERSION.split(".")[0];
226+
console.error(
227+
` Running free tier (v${freeMajor}). ` +
228+
`Pro = latest binary (v${PRO_MAJOR}) + newest anti-bot patches.`,
229+
);
230+
console.error(" Stay ahead of detection → https://cloakbrowser.dev");
231+
}
217232
console.error(" Star us if CloakBrowser helps your project!");
218233
console.error();
219234
try {
@@ -590,7 +605,7 @@ async function ensureProBinary(licenseKey: string): Promise<string> {
590605
const effectivePath = getBinaryPath(effective, true);
591606

592607
if (fs.existsSync(effectivePath) && isExecutable(effectivePath)) {
593-
showWelcome();
608+
showWelcome(true);
594609
maybeTriggerProUpdateCheck(licenseKey);
595610
return effectivePath;
596611
}
@@ -602,7 +617,7 @@ async function ensureProBinary(licenseKey: string): Promise<string> {
602617

603618
const versionPath = getBinaryPath(version, true);
604619
if (fs.existsSync(versionPath) && isExecutable(versionPath)) {
605-
showWelcome();
620+
showWelcome(true);
606621
return versionPath;
607622
}
608623

@@ -628,7 +643,7 @@ async function ensureProBinary(licenseKey: string): Promise<string> {
628643
// Non-fatal
629644
}
630645

631-
showWelcome();
646+
showWelcome(true);
632647
return downloadedPath;
633648
}
634649

0 commit comments

Comments
 (0)