Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Commit

Permalink
Push 1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fwldom committed Jun 11, 2024
1 parent 826bff2 commit 3e6de08
Show file tree
Hide file tree
Showing 303 changed files with 50,385 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
out
dist
.vscode
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Fwldom
Copyright (c) 2024 fwldom

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Freedom-Guard-Electron
Warp + Psiphon + Gool + Scan
4 changes: 4 additions & 0 deletions addRequire.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { createRequire } from "module";
const require = createRequire(import.meta.url);

global.require = require;
Binary file added assets/DnsJumper.exe
Binary file not shown.
Binary file added assets/DnsJumper.ini
Binary file not shown.
Binary file added assets/HiddifyCli.exe
Binary file not shown.
Binary file added assets/clash.db
Binary file not shown.
Empty file added assets/css/setting.css
Empty file.
16,392 changes: 16,392 additions & 0 deletions assets/current-config.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions assets/js/setting.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
document.addEventListener("DOMContentLoaded", () => {
document.getElementById("").onclick = () => {};
document.getElementById("").onclick = () => {};
});
Binary file added assets/libcore.dll
Binary file not shown.
20,295 changes: 20,295 additions & 0 deletions assets/mix.json

Large diffs are not rendered by default.

Binary file added assets/warp-plus.exe
Binary file not shown.
Binary file added assets/wintun.dll
Binary file not shown.
1 change: 1 addition & 0 deletions boxicons.min.css

Large diffs are not rendered by default.

Binary file added fonts/boxicons.eot
Binary file not shown.
1,660 changes: 1,660 additions & 0 deletions fonts/boxicons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fonts/boxicons.ttf
Binary file not shown.
Binary file added fonts/boxicons.woff
Binary file not shown.
Binary file added fonts/boxicons.woff2
Binary file not shown.
Binary file added freedom-vibe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ico.ico
Binary file not shown.
Binary file added ico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
153 changes: 153 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8" />
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'" />
<title>Freedom Guard</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="assets/css/setting.css" />
<link href="boxicons.min.css" rel="stylesheet" />
</head>

<body>
<h2 id="Status" title="false"></h2>
<button id="ChangeStatus" class="bx-tada-hover"><i class="bx bx-power-off"></i></button>
<button class="menu-show" id="menu-show"><i class="bx bx-menu-alt-left"></i></button>
<button class="setting-show" id="setting-show"><i class=" bx bxs-cog"></i></button>
<div class="options">
<p>Gool</p>
<label class="switch">
<input type="checkbox" id="Gool" />
<span class="slider"></span>
</label>
<p>Scan</p>
<label class="switch">
<input type="checkbox" id="Scan" />
<span class="slider"></span>
</label>
</div>
<div class="box-select-country" id="box-select-country">
</div>
<div class="options-select-cfon">
<p>Psiphon Country</p>
<i class="bx bxs-chevron-down bx-tada-hover"></i>
<div class="box-select-country-mini" id="box-select-country-mini">
<div id="flagOfCfon">
<img src="svgs/ir.svg" id="imgOfCfon" width="50px">
<div id="textOfCfon">psiphon disable</div>
<i class="bx bx-chevron-right"></i>
</div>
</div>
</div>
<div id="setting">
<button id="close-setting">
<i class='bx bx-arrow-back'></i>
</button>
<button id="about"><i class='bx bxs-info-circle'></i></button>
<b>IP Version </b>
<div id="ip-version">
<select name="" id="selector-ip-version">
<option value="IPV4">IP Version 4</option>
<option value="IPV6">IP Version 6</option>
</select>
</div>
<b>Endpoint</b>
<div id="end-point" class="form-control">
<input placeholder="IP : 192.x.x.x" class="input input-alt" type="text" id="end-point-address">
<span class="input-border input-border-alt"></span>
</div>
<b>Bind Address</b>
<div id="bind-address" class="form-control">
<input type="text" class="input input-alt" placeholder="127.0.0.1:8086" id="bind-address-text">
<span class="input-border input-border-alt"></span>
</div>
<b>Warp Key</b>
<div id="warp-key" class="form-control">
<input type="text" class="input input-alt" placeholder="key : xxxxxxxxxxxxx" id="warp-key-text">
<span class="input-border input-border-alt"></span>
</div>
<b>DNS</b>
<div id="dns-warp" class="form-control">
<input type="text" class="input input-alt" placeholder="dns : 8.8.8.8" id="dns-warp-text">
<span class="input-border input-border-alt"></span>
</div>
<b>Scanner rtt limit</b>
<div id="scan-rtt" class="form-control">
<input type="text" class="input input-alt" placeholder="default 1s" id="scan-rtt-text">
<span class="input-border input-border-alt"></span>
</div>
<b>Verbose</b>
<div id="verbose">
<input type="checkbox" id="verbose-status">
</div>
<b>Cache Directory</b>
<div id="cache" class="form-control">
<input type="text" class="input input-alt" placeholder="Directory : ./../" id="cache-dir">
<span class="input-border input-border-alt"></span>
</div>
<b>Wireguard Config Directory</b>
<div id="wgconfig" class="form-control">
<input type="text" class="input input-alt" placeholder="Path file" id="wgconfig-dir">
<span class="input-border input-border-alt"></span>
</div>
<b>Config Directory</b>
<div id="config" class="form-control">
<input type="text" class="input input-alt" placeholder="Path file Config" id="config-dir">
<span class="input-border input-border-alt"></span>
</div>
<b>Reserved</b>
<div id="reserved">
<input type="checkbox" id="reserved-status">
</div>
</div>
<div id="menu">
<div id="menu-dns">Set DNS</div>
<div id="menu-freedom-vibe">Freedom Vibe</div>
<div id="menu-freedom-get">Freedom Get</div>
<div id="menu-exit">Exit Menu</div>
</div>
<div id="freedom-vibe">
<div id="logo-vibe">
<img width="105px" height="105px" src="freedom-vibe.png" alt="">
</div>
<div id="vibe-profile">

</div>
<p id="status-vibe">Auto</p>
<div id="changeStatus-vibe">
<i class='bx bx-power-off'></i>
</div>
<p id="status-vibe-conn">Disconnected</p>
<button id="close-vibe"><i class='bx bx-arrow-back'></i></button>
<button id="enter-custom-config"><i class='bx bx-plus'></i></button>
<div id="freedom-vibe-custom-config">
<input type="text" id="custom-config-vibe" placeholder="Enter Config">
<button id="submit-config-custom-vibe" style="font-size: 18px;"><i class='bx bxs-save'></i></button>
<button id="reset-config-custom-vibe">reset config auto</button>
<button id="close-custom-config"><i class='bx bx-exit-fullscreen'></i></button>
</div>
</div>
<div id="dns-set">
<button id="close-dns"><i class='bx bx-exit-fullscreen'></i></button>
<input type="text" id="dns1-text" placeholder="IP DNS : 1.1.1.1">
<input type="text" id="dns2-text" placeholder="IP DNS : 8.8.8.8">
<button id="submit-dns"><i class='bx bxs-save'></i></button>
</div>
<div id="freedom-get">

</div>
<div id="about-app">
<button id="close-about"><i class='bx bx-exit-fullscreen'></i></button>
<p> Developed By Fwldom 👩‍💻</p>
<p>👇 Acknowledgements 👇</p>
<p> <a href="https://github.com/hiddify/hiddify-core/">hiddify-core</a> from Hiddify</p>
<p> <a href="https://github.com/bepass-org/warp-plus">warp-plus</a> from bepass-org</p>
<p> <a href="https://www.sordum.org/7952/dns-jumper-v2-3/">Dns Jumper</a> from sordum</p>
<p> <a href="https://github.com/fwldom/Freedom-GET">Freedom Get</a> from fwldom</p>
</div>
</body>
<script src="./renderer.js"></script>

</html>
49 changes: 49 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const { app, BrowserWindow, ipcMain } = require('electron');
const path = require('path');
const fs = require('fs');

function createWindow() {
var mainWindow = new BrowserWindow({
width: 400,
height: 680,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
nodeIntegration: true,
contextIsolation: false
},
autoHideMenuBar: true
});
mainWindow.loadFile('index.html');
}

app.on('ready', createWindow);

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});

app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
ipcMain.handle('write-json', async (event, filePath, data) => {
return new Promise((resolve, reject) => {
fs.writeFile(filePath, JSON.stringify(data, null, 2), (err) => {
if (err) reject(err);
else resolve('File written successfully');
});
});
});

// Handle read JSON file
ipcMain.handle('read-json', async (event, filePath) => {
return new Promise((resolve, reject) => {
fs.readFile(filePath, 'utf-8', (err, data) => {
if (err) reject(err);
else resolve(JSON.parse(data));
});
});
});
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "freedom-guard-electron",
"productName": "Freedom-Guard-Electron",
"description": "Warp + Psiphon",
"keywords": [],
"main": "./main.js",
"version": "1.2.5",
"author": "fwldom",
"scripts": {
"start": "electron .",
"build": "electron-builder"
},
"build": {
"electronVersion": "31.0.0-beta.6",
"extraResources": [
{
"from": "assets/",
"to": "assets/",
"filter": [
"**/*"
]
},
{
"from": "assets/warp-plus.exe",
"to": "assets/warp-plus.exe"
},
{
"from": "assets/wintun.dll",
"to": "assets/wintun.dll"
},
{
"from": "node_modules/boxicons/css/boxicons.min.css",
"to": "node_modules/boxicons/css/boxicons.min.css"
},
{
"from": "svgs/",
"to": "svgs/",
"filter": [
"**/*"
]
}
],
"productName": "Freedom Guard",
"appId": "guard.freedom.com",
"directories": {
"output": "dist"
},
"win": {
"icon": "ico.ico",
"target": "nsis"
},
"files": [
"assets/**/*",
"node_modules/boxicons/css/boxicons.min.css",
"node_modules/**/*",
"package.json",
"main.js",
"rederer.js",
"preload.js",
"*.js",
"*.html",
"*.css",
"fonts/*.*",
"svgs/*.*",
"*.png",
"*.ico"
]
}
}
15 changes: 15 additions & 0 deletions preload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { contextBridge, ipcRenderer } = require('electron');
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}

for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
})
contextBridge.exposeInMainWorld('electronAPI', {
writeJSON: (filePath, data) => ipcRenderer.invoke('write-json', filePath, data),
readJSON: (filePath) => ipcRenderer.invoke('read-json', filePath),
});
Loading

0 comments on commit 3e6de08

Please sign in to comment.