mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-08-29 14:10:53 +02:00
feat: allow user select system for which to generate fingerprint
This commit is contained in:
@@ -352,6 +352,7 @@ interface GenerateConfigOptions {
|
||||
blockWebgl?: boolean;
|
||||
executablePath?: string;
|
||||
fingerprint?: string;
|
||||
os?: "windows" | "macos" | "linux";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -433,6 +434,11 @@ export async function generateCamoufoxConfig(
|
||||
|
||||
launchOpts.allowAddonNewTab = true;
|
||||
|
||||
// Add OS option for fingerprint generation
|
||||
if (options.os) {
|
||||
launchOpts.os = options.os;
|
||||
}
|
||||
|
||||
// Generate the configuration using launchOptions
|
||||
const generatedOptions = await launchOptions(launchOpts);
|
||||
|
||||
|
||||
@@ -34,6 +34,10 @@ program
|
||||
.option("--fingerprint <json>", "fingerprint JSON string")
|
||||
.option("--headless", "run in headless mode")
|
||||
.option("--custom-config <json>", "custom config JSON string")
|
||||
.option(
|
||||
"--os <os>",
|
||||
"operating system for fingerprint: windows, macos, linux",
|
||||
)
|
||||
|
||||
.description("manage Camoufox browser instances")
|
||||
.action(
|
||||
@@ -284,6 +288,10 @@ program
|
||||
typeof options.fingerprint === "string"
|
||||
? options.fingerprint
|
||||
: undefined,
|
||||
os:
|
||||
typeof options.os === "string"
|
||||
? (options.os as "windows" | "macos" | "linux")
|
||||
: undefined,
|
||||
});
|
||||
console.log(config);
|
||||
process.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user