Compare commits
No commits in common. "44961459291a005aaeb96a38e8ea8a8f2e05b248" and "1e4033e1f18b7541269d0514d3cb7425c9f1e98a" have entirely different histories.
4496145929
...
1e4033e1f1
@ -145,7 +145,7 @@ Enhance your privacy by using secure DNS servers:
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
**Created by [DeBros](https://debros.io)** | **Version 2.0.2**
|
**Created by [DeBros](https://debros.io)** | **Version 2.0.1**
|
||||||
|
|
||||||
[](https://debros.io/donate)
|
[](https://debros.io/donate)
|
||||||
|
|
||||||
|
|||||||
@ -279,7 +279,7 @@
|
|||||||
See <a href="https://github.com/DeBrosOfficial/anyone-extension/blob/main/LICENSE" target="_blank">LICENSE</a> for details.
|
See <a href="https://github.com/DeBrosOfficial/anyone-extension/blob/main/LICENSE" target="_blank">LICENSE</a> for details.
|
||||||
</div>
|
</div>
|
||||||
<div class="version-info">
|
<div class="version-info">
|
||||||
<div>Created by DeBros | Version 2.0.2</div>
|
<div>Created by DeBros | Version 2.0.1</div>
|
||||||
<div class="open-source">
|
<div class="open-source">
|
||||||
<a href="https://git.debros.io/DeBros/anyone-extension" target="_blank">View Source Code</a>
|
<a href="https://git.debros.io/DeBros/anyone-extension" target="_blank">View Source Code</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -26,10 +26,7 @@ chrome.runtime.onInstalled.addListener(async (details) => {
|
|||||||
[CONFIG.STORAGE_KEYS.PROXY_ENABLED]: false,
|
[CONFIG.STORAGE_KEYS.PROXY_ENABLED]: false,
|
||||||
[CONFIG.STORAGE_KEYS.AUTO_CONNECT]: CONFIG.DEFAULTS.AUTO_CONNECT,
|
[CONFIG.STORAGE_KEYS.AUTO_CONNECT]: CONFIG.DEFAULTS.AUTO_CONNECT,
|
||||||
[CONFIG.STORAGE_KEYS.WEBRTC_PROTECTION]: CONFIG.DEFAULTS.WEBRTC_PROTECTION,
|
[CONFIG.STORAGE_KEYS.WEBRTC_PROTECTION]: CONFIG.DEFAULTS.WEBRTC_PROTECTION,
|
||||||
[CONFIG.STORAGE_KEYS.KILL_SWITCH]: CONFIG.DEFAULTS.KILL_SWITCH,
|
[CONFIG.STORAGE_KEYS.BYPASS_LOCAL]: CONFIG.DEFAULTS.BYPASS_LOCAL
|
||||||
[CONFIG.STORAGE_KEYS.BYPASS_LOCAL]: CONFIG.DEFAULTS.BYPASS_LOCAL,
|
|
||||||
[CONFIG.STORAGE_KEYS.PROXY_SOURCE]: CONFIG.DEFAULTS.PROXY_SOURCE,
|
|
||||||
[CONFIG.STORAGE_KEYS.UPDATE_INTERVAL]: CONFIG.DEFAULTS.UPDATE_INTERVAL
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Auto-fetch proxies on first install
|
// Auto-fetch proxies on first install
|
||||||
@ -405,11 +402,6 @@ async function handleSaveSettings(settings) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update proxy list auto-update alarm if changed
|
|
||||||
if (settings.updateInterval !== undefined) {
|
|
||||||
await setupProxyUpdateAlarm(settings.updateInterval);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if custom proxy connection settings changed (IP, port, credentials)
|
// Check if custom proxy connection settings changed (IP, port, credentials)
|
||||||
const customProxyConnectionChanged =
|
const customProxyConnectionChanged =
|
||||||
settings.proxyIP !== undefined ||
|
settings.proxyIP !== undefined ||
|
||||||
@ -690,53 +682,6 @@ async function initializePrivacySettings() {
|
|||||||
// Initialize privacy settings
|
// Initialize privacy settings
|
||||||
initializePrivacySettings();
|
initializePrivacySettings();
|
||||||
|
|
||||||
// ============================================
|
|
||||||
// Proxy List Auto-Update
|
|
||||||
// ============================================
|
|
||||||
|
|
||||||
const PROXY_UPDATE_ALARM = 'proxyListUpdate';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup or clear the proxy list auto-update alarm
|
|
||||||
* @param {number} intervalHours - Update interval in hours (0 = manual/disabled)
|
|
||||||
*/
|
|
||||||
async function setupProxyUpdateAlarm(intervalHours) {
|
|
||||||
// Clear existing alarm
|
|
||||||
await chrome.alarms.clear(PROXY_UPDATE_ALARM);
|
|
||||||
|
|
||||||
if (intervalHours > 0) {
|
|
||||||
// Create periodic alarm
|
|
||||||
chrome.alarms.create(PROXY_UPDATE_ALARM, {
|
|
||||||
periodInMinutes: intervalHours * 60
|
|
||||||
});
|
|
||||||
Utils.log('info', `Proxy auto-update alarm set for every ${intervalHours} hour(s)`);
|
|
||||||
} else {
|
|
||||||
Utils.log('info', 'Proxy auto-update disabled (manual only)');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle alarm events
|
|
||||||
chrome.alarms.onAlarm.addListener(async (alarm) => {
|
|
||||||
if (alarm.name === PROXY_UPDATE_ALARM) {
|
|
||||||
Utils.log('info', 'Auto-update alarm triggered, fetching proxy list...');
|
|
||||||
try {
|
|
||||||
const source = await Storage.getValue(CONFIG.STORAGE_KEYS.PROXY_SOURCE, CONFIG.DEFAULTS.PROXY_SOURCE);
|
|
||||||
await handleFetchProxies(source);
|
|
||||||
Utils.log('info', 'Proxy list auto-updated successfully');
|
|
||||||
} catch (error) {
|
|
||||||
Utils.log('error', 'Failed to auto-update proxy list', error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Restore alarm on startup
|
|
||||||
async function initializeProxyUpdateAlarm() {
|
|
||||||
const interval = await Storage.getValue(CONFIG.STORAGE_KEYS.UPDATE_INTERVAL, CONFIG.DEFAULTS.UPDATE_INTERVAL);
|
|
||||||
await setupProxyUpdateAlarm(interval);
|
|
||||||
}
|
|
||||||
|
|
||||||
initializeProxyUpdateAlarm();
|
|
||||||
|
|
||||||
// ============================================
|
// ============================================
|
||||||
// Proxy Authentication Handler
|
// Proxy Authentication Handler
|
||||||
// ============================================
|
// ============================================
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
const CONFIG = {
|
const CONFIG = {
|
||||||
// Version
|
// Version
|
||||||
VERSION: '2.0.2',
|
VERSION: '2.0.1',
|
||||||
|
|
||||||
// Connection Modes
|
// Connection Modes
|
||||||
MODES: {
|
MODES: {
|
||||||
@ -16,7 +16,6 @@ const CONFIG = {
|
|||||||
PROXY_TIMEOUT: 5000,
|
PROXY_TIMEOUT: 5000,
|
||||||
AUTO_CONNECT: false,
|
AUTO_CONNECT: false,
|
||||||
WEBRTC_PROTECTION: false,
|
WEBRTC_PROTECTION: false,
|
||||||
KILL_SWITCH: false,
|
|
||||||
BYPASS_LOCAL: true,
|
BYPASS_LOCAL: true,
|
||||||
PROXY_SOURCE: 'arweave',
|
PROXY_SOURCE: 'arweave',
|
||||||
UPDATE_INTERVAL: 0 // manual only
|
UPDATE_INTERVAL: 0 // manual only
|
||||||
@ -71,8 +70,7 @@ const CONFIG = {
|
|||||||
WEBRTC_PROTECTION: 'webrtcProtection',
|
WEBRTC_PROTECTION: 'webrtcProtection',
|
||||||
KILL_SWITCH: 'killSwitch',
|
KILL_SWITCH: 'killSwitch',
|
||||||
BYPASS_LOCAL: 'bypassLocal',
|
BYPASS_LOCAL: 'bypassLocal',
|
||||||
LAST_UPDATE: 'lastProxyUpdate',
|
LAST_UPDATE: 'lastProxyUpdate'
|
||||||
UPDATE_INTERVAL: 'updateInterval'
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "ANyONe Extension",
|
"name": "ANyONe Extension",
|
||||||
"version": "2.0.2",
|
"version": "2.0.1",
|
||||||
"description": "Privacy-focused Socks5 proxy management",
|
"description": "Privacy-focused Socks5 proxy management",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"proxy",
|
"proxy",
|
||||||
@ -10,8 +10,7 @@
|
|||||||
"scripting",
|
"scripting",
|
||||||
"privacy",
|
"privacy",
|
||||||
"webRequest",
|
"webRequest",
|
||||||
"webRequestAuthProvider",
|
"webRequestAuthProvider"
|
||||||
"alarms"
|
|
||||||
],
|
],
|
||||||
"host_permissions": ["<all_urls>"],
|
"host_permissions": ["<all_urls>"],
|
||||||
"background": {
|
"background": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user