Skip to content
Open
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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Next Gen
# Next Gen Dev

the next generation of template

Expand All @@ -24,6 +24,9 @@ the next generation of template
- [ ] Release VirusTotal scan results for security verification.
- [ ] Auto update
- [ ] Https for mcp
- [ ] wallpapers app and system
- [ ] System app
- [ ] Uninstall system external app

The issue is that Turborepo expects a specific structure. Here's the correct setup:

Expand Down Expand Up @@ -179,3 +182,4 @@ npm link turbo-generators
<https://github.com/olliethedev/ui-builder>
<https://github.com/AndyMik90/Auto-Claude/>
<https://github.com/ShareX/ShareX>
<https://github.com/lbjlaq/Antigravity-Manager>
16 changes: 11 additions & 5 deletions apps/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nde/next-gen-tools",
"name": "next-gen-dev",
"version": "1.0.1",
"description": "Electron app with floating DevTools",
"description": "Next Gen Developer Tools",
"main": "./out/main/index.js",
"author": "Next Dev Team <info@next-dev.team>",
"homepage": "https://github.com/next-dev-team/next-gen#readme",
Expand Down Expand Up @@ -91,8 +91,8 @@
"zustand": "^5.0.9"
},
"build": {
"appId": "com.float-devtools-app.app",
"productName": "next-gen-tools",
"appId": "com.next-gen-dev.app",
"productName": "Next Gen Dev",
"publish": [
{
"provider": "github",
Expand All @@ -101,7 +101,8 @@
}
],
"directories": {
"output": "dist"
"output": "dist",
"buildResources": "resources"
},
"files": [
"out/**/*",
Expand Down Expand Up @@ -150,6 +151,11 @@
],
"artifactName": "${productName}-${version}-${arch}.${ext}",
"signAndEditExecutable": false
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": true
}
}
}
49 changes: 49 additions & 0 deletions apps/ui/resources/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 34 additions & 22 deletions apps/ui/src/main/anti-detection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,18 @@ async function setupSessionAntiDetection(ses, profile) {
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8";
}

// Add SEC headers for Chromium browsers
if (userAgent && userAgent.includes("Chrome")) {
headers["Sec-CH-UA"] = generateSecChUa(profile);
headers["Sec-CH-UA-Mobile"] = profile.category === "mobile" ? "?1" : "?0";
headers["Sec-CH-UA-Platform"] = getPlatformHint(profile);
headers["Sec-Fetch-Dest"] = headers["Sec-Fetch-Dest"] || "document";
headers["Sec-Fetch-Mode"] = headers["Sec-Fetch-Mode"] || "navigate";
headers["Sec-Fetch-Site"] = headers["Sec-Fetch-Site"] || "none";
headers["Sec-Fetch-User"] = "?1";
const profileWithUserAgent = { ...profile, userAgent };
if (!headers["Sec-CH-UA"]) {
headers["Sec-CH-UA"] = generateSecChUa(profileWithUserAgent);
}
if (!headers["Sec-CH-UA-Mobile"]) {
headers["Sec-CH-UA-Mobile"] =
profile?.category === "mobile" ? "?1" : "?0";
}
if (!headers["Sec-CH-UA-Platform"]) {
headers["Sec-CH-UA-Platform"] = getPlatformHint(profileWithUserAgent);
}
}

// Remove Electron-specific headers
Expand Down Expand Up @@ -245,31 +248,38 @@ async function setupSessionAntiDetection(ses, profile) {
* Generate Sec-CH-UA header value
*/
function generateSecChUa(profile) {
if (profile.userAgent.includes("Chrome")) {
const match = profile.userAgent.match(/Chrome\/(\d+)/);
const userAgent =
typeof profile?.userAgent === "string" ? profile.userAgent : "";

if (userAgent.includes("Edg")) {
const match = userAgent.match(/Edg\/(\d+)/);
const version = match ? match[1] : "122";
return `"Chromium";v="${version}", "Google Chrome";v="${version}", "Not(A:Brand";v="24"`;
return `"Chromium";v="${version}", "Microsoft Edge";v="${version}", "Not(A:Brand";v="24"`;
}
if (profile.userAgent.includes("Edg")) {
const match = profile.userAgent.match(/Edg\/(\d+)/);

if (userAgent.includes("Chrome")) {
const match = userAgent.match(/Chrome\/(\d+)/);
const version = match ? match[1] : "122";
return `"Chromium";v="${version}", "Microsoft Edge";v="${version}", "Not(A:Brand";v="24"`;
return `"Chromium";v="${version}", "Google Chrome";v="${version}", "Not(A:Brand";v="24"`;
}

return `"Chromium";v="122", "Not(A:Brand";v="24"`;
}

/**
* Get platform hint from profile
*/
function getPlatformHint(profile) {
if (profile.platform.includes("Win")) return '"Windows"';
if (profile.platform.includes("Mac")) return '"macOS"';
if (profile.platform.includes("Linux")) return '"Linux"';
if (profile.platform.includes("iPhone")) return '"iOS"';
if (
profile.platform.includes("armv") ||
profile.userAgent.includes("Android")
)
const platform =
typeof profile?.platform === "string" ? profile.platform : "";
const userAgent =
typeof profile?.userAgent === "string" ? profile.userAgent : "";

if (platform.includes("Win")) return '"Windows"';
if (platform.includes("Mac")) return '"macOS"';
if (platform.includes("Linux")) return '"Linux"';
if (platform.includes("iPhone")) return '"iOS"';
if (platform.includes("armv") || userAgent.includes("Android"))
return '"Android"';
return '"Unknown"';
}
Expand Down Expand Up @@ -464,4 +474,6 @@ module.exports = {
getAllProfiles,
getProfile,
getRandomProfile,
generateSecChUa,
getPlatformHint,
};
Loading