Skip to content

Commit

Permalink
🔖 0.3.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed May 11, 2024
1 parent 0c09efc commit 66c81b8
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 88 deletions.
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
اپ متن‌باز Oblivion به‌عنوان یکی‌از امن‌ترین و مطمئن‌ترین VPNها، در روزهای پراختلال اخیر نقش مهمی برای دسترسی آزاد
کاربران ایرانی به اینترنت ایفا کرده.

- اپ‌های Oblivion و Oblivion Deskop و همینطور هسته Warp-Plus متن‌باز هستن و سورسشون در گیت‌هاب قرار گرفته، ضمن اینکه
بیلد پروژه‌ها به‌صورت خودکار توسط گیت‌هاب اکشن انجام می‌شن.
- وارپ به‌وسیله رمزنگاری مقدار بیشتری از ترافیک خروجی از دستگاهتون، اجازه نمیده هیچ‌کس در کار شما سرک بکشه.
- اپ‌های Oblivion و Oblivion Deskop و همینطور هسته Warp-Plus متن‌باز هستن و سورسشون در گیت‌هاب قرار گرفته، ضمن اینکه
بیلد پروژه‌ها به‌صورت خودکار توسط گیت‌هاب اکشن انجام می‌شن.
- وارپ به‌وسیله رمزنگاری مقدار بیشتری از ترافیک خروجی از دستگاهتون، اجازه نمیده هیچ‌کس در کار شما سرک بکشه.

![virustotal.jpg](screenshot/virustotal.jpg)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"url": "https://github.com/bepass-org/oblivion-desktop/issues",
"email": "[email protected]"
},
"version": "0.2.52-beta",
"version": "0.3.0-beta",
"license": "Restrictive",
"main": "./src/main/main.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oblivion-desktop",
"description": "unofficial desktop version of oblivion",
"version": "0.2.52-beta",
"version": "0.3.0-beta",
"homepage": "https://github.com/bepass-org/oblivion-desktop#readme",
"license": "Restrictive",
"author": "ircfspace+kiomarzsss <[email protected]> (https://ircf.space/)",
Expand Down
2 changes: 1 addition & 1 deletion src/defaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ export const languages: { value: string; label: string }[] = [
{ value: 'en', label: 'English' },
{ value: 'cn', label: 'Chinese' },
{ value: 'ru', label: 'Russian' }
];
];
2 changes: 1 addition & 1 deletion src/locale/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
"desc": "该程序是 Windows、Linux 和 Mac 的 Oblivion 应用的非官方但可靠版本。\nOblivion Desktop 程序的用户界面是根据由 Youssef Ghobadi 开发的原始版本的用户界面进行建模的。它是为了免费访问互联网而编写的,不允许更改名称或商业使用。",
"slogan": "互联网,为所有人或无人!"
}
}
}
2 changes: 1 addition & 1 deletion src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
"desc": "This program is an unofficial, but reliable version of the Oblivion app for Windows, Linux, and Mac.\nThe Oblivion Desktop program is modeled after the user interface of the original version developed by Youssef Ghobadi. It was written, it was prepared for the purpose of free access to the Internet, and any name change or commercial use of it is not allowed.",
"slogan": "Internet, for all or none!"
}
}
}
2 changes: 1 addition & 1 deletion src/locale/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
"desc": "Эта программа является неофициальной, но надежной версией приложения Oblivion для Windows, Linux и Mac.\nПрограмма Oblivion Desktop создана по образу и подобию пользовательского интерфейса оригинальной версии, разработанной Юсефом Гобади. Она была написана с целью обеспечить свободный доступ в Интернет, и любое изменение имени или коммерческое использование запрещено.",
"slogan": "Интернет, для всех или никого!"
}
}
}
14 changes: 12 additions & 2 deletions src/main/lib/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,18 @@ export const enableProxy = async (ipcEvent?: IpcMainEvent) => {
} else if (process.platform === 'darwin') {
return new Promise<void>(async (resolve, reject) => {
try {
await macOSProxySettings(['-setwebproxy', 'Wi-Fi', hostIP.toString(), port.toString()]);
await macOSProxySettings(['-setsecurewebproxy', 'Wi-Fi', hostIP.toString(), port.toString()]);
await macOSProxySettings([
'-setwebproxy',
'Wi-Fi',
hostIP.toString(),
port.toString()
]);
await macOSProxySettings([
'-setsecurewebproxy',
'Wi-Fi',
hostIP.toString(),
port.toString()
]);
resolve();
} catch (error) {
reject(error);
Expand Down
52 changes: 26 additions & 26 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,33 +224,33 @@ if (!gotTheLock) {
},
// TODO
/*{ label: '', type: 'separator' },
{
label: 'حالت پروکسی',
submenu: [
{ label: 'متصل است', type: 'radio' },
{ label: 'عدم اتصال', type: 'radio' }
]
},
{ label: '', type: 'separator' },
{
label: 'Proxy Mode',
submenu: [
{
label: 'Set System Proxy',
type: 'normal',
click: async () => {
await enableProxy();
}
},
{
label: 'Disable',
type: 'normal',
click: async () => {
await disableProxy();
{
label: 'حالت پروکسی',
submenu: [
{ label: 'متصل است', type: 'radio' },
{ label: 'عدم اتصال', type: 'radio' }
]
},
{ label: '', type: 'separator' },
{
label: 'Proxy Mode',
submenu: [
{
label: 'Set System Proxy',
type: 'normal',
click: async () => {
await enableProxy();
}
},
{
label: 'Disable',
type: 'normal',
click: async () => {
await disableProxy();
}
}
}
]
},*/
]
},*/
{ label: '', type: 'separator' },
{
label: 'Exit',
Expand Down
1 change: 0 additions & 1 deletion src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { loadLang, loadTheme } from './lib/loaders';
import { quitOnCtrlW } from './lib/utils';

export default function App() {

useEffect(() => {
openDevtoolsOnCtrlShiftI();
loadTheme();
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/components/Modal/License.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export default function LicenseModal({
<div className='miniLine' />
</div>
<h3>{title}</h3>
<p className='withMargin'>
{appLang?.modal?.license_desc}
</p>
<p className='withMargin'>{appLang?.modal?.license_desc}</p>
<div className='clearfix' />
<input
value={licenseInput}
Expand Down
26 changes: 12 additions & 14 deletions src/renderer/components/Modal/Restore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import { ipcRenderer } from '../../lib/utils';
import { getLang, loadLang } from '../../lib/loaders';

export default function RestoreModal({
title,
isOpen,
onClose,
setTheme,
setIpData,
setSystemTray,
setPort,
setAutoSetProxy,
setShareVPN,
setLang
}: {
title,
isOpen,
onClose,
setTheme,
setIpData,
setSystemTray,
setPort,
setAutoSetProxy,
setShareVPN,
setLang
}: {
title: string;
isOpen: boolean;
onClose: any;
Expand Down Expand Up @@ -72,9 +72,7 @@ export default function RestoreModal({
<div className='miniLine' />
</div>
<h3>{title}</h3>
<p>
{appLang?.modal?.restore_desc}
</p>
<p>{appLang?.modal?.restore_desc}</p>
<div className='clearfix' />
<div className={classNames('btn', 'btn-cancel')} onClick={onClose}>
{appLang?.modal?.cancel}
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import { ipcRenderer } from './lib/utils';

const container = document.getElementById('root') as HTMLElement;
const root = createRoot(container);
root.render(
<App />
);
root.render(<App />);

// calling IPC exposed from preload script
ipcRenderer.on('ipc-example', (arg) => {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/lib/loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const loadLang = () => {
settings.get('lang').then((value) => {
let langData = {};
let langDir = 'ltr';
const key = (typeof value !== 'undefined' ? value : defaultSettings.lang);
const key = typeof value !== 'undefined' ? value : defaultSettings.lang;
if (key === 'fa') {
langData = fa;
langDir = 'rtl';
Expand All @@ -37,4 +37,4 @@ export const getLang = () => {
const lang = localStorage.getItem('OBLIVION_LANG');
if (!lang || typeof lang === 'undefined') return {};
return JSON.parse(String(lang));
};
};
8 changes: 4 additions & 4 deletions src/renderer/lib/toasts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export const checkInternetToast = () => {
};

export const settingsHaveChangedToast = ({
isConnected,
isLoading
}: {
isConnected,
isLoading
}: {
isConnected: boolean;
isLoading: boolean;
}) => {
Expand All @@ -70,4 +70,4 @@ export const loadingToast = () => {
duration: Infinity,
style: defaultToastStyle
});
};
};
7 changes: 3 additions & 4 deletions src/renderer/pages/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ export default function About() {
<Nav title={appLang?.about?.title} />
<div className={classNames('myApp', 'normalPage')}>
<div className='container'>
<p style={{ whiteSpace: 'pre-wrap' }}>
{appLang?.about?.desc}
</p>
<p style={{ whiteSpace: 'pre-wrap' }}>{appLang?.about?.desc}</p>
<p>
<b>{appLang?.about?.slogan}</b>
</p>
Expand Down Expand Up @@ -54,7 +52,8 @@ export default function About() {
<img
className='starBadge'
src='https://img.shields.io/github/stars/bepass-org/oblivion-desktop?style=flat&label=Stars&color=tomato'
alt='stars' />
alt='stars'
/>
</a>
</p>
<div className='clearfix' />
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/pages/Debug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export default function Debug() {
</i>
</div>
<p className={classNames(log === '' ? 'dirRight' : 'dirLeft', 'logText')}>
{log === ''
? appLang?.log?.desc
: log}
{log === '' ? appLang?.log?.desc : log}
</p>
</div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions src/renderer/pages/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ let hasNewUpdate = false;

export default function Index() {
const appLang = getLang();
const { isConnected, setIsConnected, isLoading, setIsLoading, statusText, setStatusText } = useStore();
const { isConnected, setIsConnected, isLoading, setIsLoading, statusText, setStatusText } =
useStore();
const [ipInfo, setIpInfo] = useState<{
countryCode: string | boolean;
ip: string;
Expand Down Expand Up @@ -126,7 +127,6 @@ export default function Index() {
window.removeEventListener('online', () => setOnline(true));
window.removeEventListener('offline', () => setOnline(false));
};

}, []);

useEffect(() => {
Expand Down Expand Up @@ -336,7 +336,9 @@ export default function Index() {
>
<i className={'material-icons'}>&#xe923;</i>
<span>{appLang?.home?.drawer_update}</span>
<div className='label label-warning label-xs'>{appLang?.home?.drawer_update_label}</div>
<div className='label label-warning label-xs'>
{appLang?.home?.drawer_update_label}
</div>
</a>
</li>
<li className='divider' />
Expand Down
20 changes: 8 additions & 12 deletions src/renderer/pages/Options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export default function Options() {
const langRef = useRef<any>(null);

useEffect(() => {
setTimeout(function() {
setTimeout(function () {
if (langRef && targetId === 'languages') {
langRef?.current?.scrollIntoView();
langRef?.current?.classList?.add('highlight');
setTimeout(function() {
setTimeout(function () {
langRef?.current?.classList?.remove('highlight');
}, 3000);
}
Expand Down Expand Up @@ -65,7 +65,6 @@ export default function Options() {
settings.get('shareVPN').then((value) => {
setShareVPN(typeof value === 'undefined' ? defaultSettings.shareVPN : value);
});

}, []);

if (
Expand Down Expand Up @@ -116,10 +115,10 @@ export default function Options() {
isOpen={showRestoreModal}
onClose={() => {
setShowRestoreModal(false);
setTimeout(function() {
setTimeout(function () {
loadLang();
}, 750);
setTimeout(function() {
setTimeout(function () {
setAppLang(getLang());
}, 1500);
}}
Expand All @@ -132,7 +131,7 @@ export default function Options() {
setAutoSetProxy(!autoSetProxy);
settings.set('autoSetProxy', !autoSetProxy);
settingsHaveChangedToast({ ...{ isConnected, isLoading } });
setTimeout(function() {
setTimeout(function () {
if (autoSetProxy) {
setIpData(false);
settings.set('ipData', false);
Expand Down Expand Up @@ -226,21 +225,18 @@ export default function Options() {
{appLang?.settings?.dark_mode_desc}
</div>
</div>
<div
className={'item'}
ref={langRef}
>
<div className={'item'} ref={langRef}>
<label className='key'>{appLang?.settings?.lang}</label>
<div className='value'>
<select
onChange={(e) => {
setLang(e.target.value);
settings.set('lang', e.target.value);
loadingToast();
setTimeout(function() {
setTimeout(function () {
loadLang();
}, 750);
setTimeout(function() {
setTimeout(function () {
setAppLang(getLang());
toast.dismiss('LOADING');
}, 1500);
Expand Down
8 changes: 6 additions & 2 deletions src/renderer/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,19 @@ export default function Settings() {
disabled={method !== 'psiphon'}
value={location}
>
<option value=''>{appLang?.settings?.method_psiphon_location_auto}</option>
<option value=''>
{appLang?.settings?.method_psiphon_location_auto}
</option>
{countries.map((country: { value: string; label: string }) => (
<option key={country.value} value={country.value}>
{country.label}
</option>
))}
</select>
</div>
<div className='info'>{appLang?.settings?.method_psiphon_location_desc}</div>
<div className='info'>
{appLang?.settings?.method_psiphon_location_desc}
</div>
</div>
</div>
<div className='moreSettings'>
Expand Down

0 comments on commit 66c81b8

Please sign in to comment.