atlas-browser 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +1 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +26 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +16 -0
- package/CONTRIBUTING.md +63 -0
- package/LICENSE +21 -0
- package/PRIVACY.md +37 -0
- package/README.md +163 -0
- package/SECURITY.md +29 -0
- package/assets/logo.png +0 -0
- package/bin/cli.js +142 -0
- package/dist-electron/main/blocker.js +109 -0
- package/dist-electron/main/blocker.js.map +1 -0
- package/dist-electron/main/bookmark-manager.js +121 -0
- package/dist-electron/main/bookmark-manager.js.map +1 -0
- package/dist-electron/main/download-manager.js +118 -0
- package/dist-electron/main/download-manager.js.map +1 -0
- package/dist-electron/main/index.js +116 -0
- package/dist-electron/main/index.js.map +1 -0
- package/dist-electron/main/ipc-handlers.js +303 -0
- package/dist-electron/main/ipc-handlers.js.map +1 -0
- package/dist-electron/main/menu.js +229 -0
- package/dist-electron/main/menu.js.map +1 -0
- package/dist-electron/main/security-analyzer.js +71 -0
- package/dist-electron/main/security-analyzer.js.map +1 -0
- package/dist-electron/main/settings-manager.js +105 -0
- package/dist-electron/main/settings-manager.js.map +1 -0
- package/dist-electron/main/tab-manager.js +205 -0
- package/dist-electron/main/tab-manager.js.map +1 -0
- package/dist-electron/main/tor-manager.js +59 -0
- package/dist-electron/main/tor-manager.js.map +1 -0
- package/dist-electron/preload/preload.js +73 -0
- package/dist-electron/preload/preload.js.map +1 -0
- package/install.sh +120 -0
- package/package.json +67 -0
- package/src/main/blocker.ts +121 -0
- package/src/main/bookmark-manager.ts +99 -0
- package/src/main/download-manager.ts +103 -0
- package/src/main/index.ts +93 -0
- package/src/main/ipc-handlers.ts +283 -0
- package/src/main/menu.ts +192 -0
- package/src/main/security-analyzer.ts +97 -0
- package/src/main/settings-manager.ts +84 -0
- package/src/main/tab-manager.ts +249 -0
- package/src/main/tor-manager.ts +59 -0
- package/src/preload/preload.ts +85 -0
- package/src/renderer/bookmarks.html +84 -0
- package/src/renderer/browser-ui.js +427 -0
- package/src/renderer/downloads.html +94 -0
- package/src/renderer/history.html +111 -0
- package/src/renderer/index.html +152 -0
- package/src/renderer/internet-map.html +313 -0
- package/src/renderer/network-map.js +131 -0
- package/src/renderer/security-panel.js +13 -0
- package/src/renderer/settings.html +138 -0
- package/src/renderer/styles.css +688 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// Network Map - Canvas visualization of connection path
|
|
2
|
+
|
|
3
|
+
const canvas = document.getElementById('network-canvas');
|
|
4
|
+
if (canvas) {
|
|
5
|
+
const ctx = canvas.getContext('2d');
|
|
6
|
+
const W = canvas.width;
|
|
7
|
+
const H = canvas.height;
|
|
8
|
+
|
|
9
|
+
// Colors
|
|
10
|
+
const BG = '#0a0a0f';
|
|
11
|
+
const ACCENT = '#00d4ff';
|
|
12
|
+
const PURPLE = '#a855f7';
|
|
13
|
+
const GREEN = '#22c55e';
|
|
14
|
+
const MUTED = '#8888a0';
|
|
15
|
+
const TEXT = '#e2e2e8';
|
|
16
|
+
|
|
17
|
+
let animFrame = 0;
|
|
18
|
+
let torMode = false;
|
|
19
|
+
let currentDomain = 'Search Angel';
|
|
20
|
+
|
|
21
|
+
// Node positions
|
|
22
|
+
function getNodes() {
|
|
23
|
+
if (torMode) {
|
|
24
|
+
return [
|
|
25
|
+
{ x: 40, y: H / 2, label: 'You', color: GREEN, r: 12 },
|
|
26
|
+
{ x: W * 0.25, y: H * 0.3, label: 'Guard', color: PURPLE, r: 8 },
|
|
27
|
+
{ x: W * 0.5, y: H * 0.65, label: 'Relay', color: PURPLE, r: 8 },
|
|
28
|
+
{ x: W * 0.75, y: H * 0.35, label: 'Exit', color: PURPLE, r: 8 },
|
|
29
|
+
{ x: W - 40, y: H / 2, label: currentDomain, color: ACCENT, r: 12 },
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
return [
|
|
33
|
+
{ x: 40, y: H / 2, label: 'You', color: GREEN, r: 12 },
|
|
34
|
+
{ x: W / 2, y: H / 2, label: 'Encrypted', color: ACCENT, r: 6 },
|
|
35
|
+
{ x: W - 40, y: H / 2, label: currentDomain, color: ACCENT, r: 12 },
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function drawFrame() {
|
|
40
|
+
ctx.fillStyle = BG;
|
|
41
|
+
ctx.fillRect(0, 0, W, H);
|
|
42
|
+
|
|
43
|
+
const nodes = getNodes();
|
|
44
|
+
animFrame++;
|
|
45
|
+
|
|
46
|
+
// Draw connections
|
|
47
|
+
for (let i = 0; i < nodes.length - 1; i++) {
|
|
48
|
+
const a = nodes[i];
|
|
49
|
+
const b = nodes[i + 1];
|
|
50
|
+
|
|
51
|
+
// Animated dashed line
|
|
52
|
+
ctx.strokeStyle = torMode ? PURPLE + '60' : ACCENT + '40';
|
|
53
|
+
ctx.lineWidth = 2;
|
|
54
|
+
ctx.setLineDash([6, 4]);
|
|
55
|
+
ctx.lineDashOffset = -animFrame * 0.5;
|
|
56
|
+
ctx.beginPath();
|
|
57
|
+
ctx.moveTo(a.x, a.y);
|
|
58
|
+
ctx.lineTo(b.x, b.y);
|
|
59
|
+
ctx.stroke();
|
|
60
|
+
ctx.setLineDash([]);
|
|
61
|
+
|
|
62
|
+
// Data packet animation
|
|
63
|
+
const progress = ((animFrame * 2 + i * 30) % 100) / 100;
|
|
64
|
+
const px = a.x + (b.x - a.x) * progress;
|
|
65
|
+
const py = a.y + (b.y - a.y) * progress;
|
|
66
|
+
ctx.fillStyle = torMode ? PURPLE : ACCENT;
|
|
67
|
+
ctx.beginPath();
|
|
68
|
+
ctx.arc(px, py, 3, 0, Math.PI * 2);
|
|
69
|
+
ctx.fill();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Draw nodes
|
|
73
|
+
for (const node of nodes) {
|
|
74
|
+
// Glow
|
|
75
|
+
const gradient = ctx.createRadialGradient(
|
|
76
|
+
node.x, node.y, 0,
|
|
77
|
+
node.x, node.y, node.r * 2.5
|
|
78
|
+
);
|
|
79
|
+
gradient.addColorStop(0, node.color + '30');
|
|
80
|
+
gradient.addColorStop(1, 'transparent');
|
|
81
|
+
ctx.fillStyle = gradient;
|
|
82
|
+
ctx.beginPath();
|
|
83
|
+
ctx.arc(node.x, node.y, node.r * 2.5, 0, Math.PI * 2);
|
|
84
|
+
ctx.fill();
|
|
85
|
+
|
|
86
|
+
// Node circle
|
|
87
|
+
ctx.fillStyle = node.color;
|
|
88
|
+
ctx.beginPath();
|
|
89
|
+
ctx.arc(node.x, node.y, node.r, 0, Math.PI * 2);
|
|
90
|
+
ctx.fill();
|
|
91
|
+
|
|
92
|
+
// Label
|
|
93
|
+
ctx.fillStyle = TEXT;
|
|
94
|
+
ctx.font = '9px -apple-system, sans-serif';
|
|
95
|
+
ctx.textAlign = 'center';
|
|
96
|
+
const labelY = node.y > H / 2 ? node.y - node.r - 8 : node.y + node.r + 14;
|
|
97
|
+
ctx.fillText(node.label, node.x, labelY);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Title
|
|
101
|
+
ctx.fillStyle = MUTED;
|
|
102
|
+
ctx.font = '9px -apple-system, sans-serif';
|
|
103
|
+
ctx.textAlign = 'left';
|
|
104
|
+
ctx.fillText(torMode ? 'Tor Circuit (encrypted)' : 'Direct Connection (HTTPS)', 8, 14);
|
|
105
|
+
|
|
106
|
+
requestAnimationFrame(drawFrame);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
drawFrame();
|
|
110
|
+
|
|
111
|
+
// Listen for Tor toggle
|
|
112
|
+
const torBtn = document.getElementById('tor-btn');
|
|
113
|
+
if (torBtn) {
|
|
114
|
+
const origClick = torBtn.onclick;
|
|
115
|
+
torBtn.addEventListener('click', () => {
|
|
116
|
+
torMode = !torMode;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Update domain from URL changes
|
|
121
|
+
if (window.browserAPI) {
|
|
122
|
+
window.browserAPI.onUrlChanged((data) => {
|
|
123
|
+
try {
|
|
124
|
+
const url = new URL(data.url);
|
|
125
|
+
currentDomain = url.hostname.replace('www.', '').slice(0, 15);
|
|
126
|
+
} catch {
|
|
127
|
+
currentDomain = 'Web';
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Security Panel - updates sidebar with security info
|
|
2
|
+
// Most logic is in browser-ui.js, this handles periodic updates
|
|
3
|
+
|
|
4
|
+
setInterval(async () => {
|
|
5
|
+
const sidebar = document.getElementById('security-sidebar');
|
|
6
|
+
if (sidebar && !sidebar.classList.contains('hidden') && window.browserAPI) {
|
|
7
|
+
const stats = await window.browserAPI.getBlockerStats();
|
|
8
|
+
const trackersTotal = document.getElementById('trackers-total');
|
|
9
|
+
if (trackersTotal) {
|
|
10
|
+
trackersTotal.textContent = stats.totalBlocked;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}, 3000);
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Settings - Atlas Browser</title>
|
|
6
|
+
<style>
|
|
7
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
8
|
+
body { background: #0a0a0f; color: #e2e2e8; font-family: -apple-system, sans-serif; padding: 40px; max-width: 700px; margin: 0 auto; }
|
|
9
|
+
h1 { font-size: 24px; margin-bottom: 24px; }
|
|
10
|
+
.section { background: #12121a; border: 1px solid #1e1e2e; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
|
|
11
|
+
.section h2 { font-size: 14px; color: #00d4ff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
|
|
12
|
+
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #1e1e2e22; }
|
|
13
|
+
.setting-row:last-child { border-bottom: none; }
|
|
14
|
+
.setting-label { font-size: 13px; }
|
|
15
|
+
.setting-desc { font-size: 11px; color: #8888a0; margin-top: 2px; }
|
|
16
|
+
input[type="text"] { background: #0a0a0f; border: 1px solid #1e1e2e; color: #e2e2e8; padding: 6px 12px; border-radius: 6px; font-size: 12px; width: 200px; outline: none; font-family: 'SF Mono', monospace; }
|
|
17
|
+
input[type="text"]:focus { border-color: #00d4ff; }
|
|
18
|
+
.toggle { position: relative; width: 40px; height: 22px; }
|
|
19
|
+
.toggle input { opacity: 0; width: 0; height: 0; }
|
|
20
|
+
.toggle .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #1e1e2e; border-radius: 11px; transition: 0.3s; }
|
|
21
|
+
.toggle .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #8888a0; border-radius: 50%; transition: 0.3s; }
|
|
22
|
+
.toggle input:checked + .slider { background: #00d4ff33; }
|
|
23
|
+
.toggle input:checked + .slider:before { transform: translateX(18px); background: #00d4ff; }
|
|
24
|
+
.reset-btn { background: none; border: 1px solid #ef4444; color: #ef4444; padding: 8px 20px; border-radius: 8px; cursor: pointer; font-size: 12px; margin-top: 12px; }
|
|
25
|
+
.reset-btn:hover { background: rgba(239,68,68,0.1); }
|
|
26
|
+
.version { text-align: center; color: #8888a033; font-size: 11px; margin-top: 24px; font-family: 'SF Mono', monospace; }
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<h1>⚙ Settings</h1>
|
|
31
|
+
|
|
32
|
+
<div class="section">
|
|
33
|
+
<h2>General</h2>
|
|
34
|
+
<div class="setting-row">
|
|
35
|
+
<div><div class="setting-label">Homepage</div><div class="setting-desc">Page loaded on startup and Home button</div></div>
|
|
36
|
+
<input type="text" id="homepage" value="">
|
|
37
|
+
</div>
|
|
38
|
+
<div class="setting-row">
|
|
39
|
+
<div><div class="setting-label">Search Engine</div><div class="setting-desc">Used when typing in address bar</div></div>
|
|
40
|
+
<input type="text" id="searchEngine" value="Search Angel" readonly>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="section">
|
|
45
|
+
<h2>Privacy</h2>
|
|
46
|
+
<div class="setting-row">
|
|
47
|
+
<div><div class="setting-label">Clear data on exit</div><div class="setting-desc">Delete cookies, cache, and local storage when browser closes</div></div>
|
|
48
|
+
<label class="toggle"><input type="checkbox" id="clearDataOnExit"><span class="slider"></span></label>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="setting-row">
|
|
51
|
+
<div><div class="setting-label">Block trackers & ads</div><div class="setting-desc">Built-in tracker and ad blocker</div></div>
|
|
52
|
+
<label class="toggle"><input type="checkbox" id="blockTrackers"><span class="slider"></span></label>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="setting-row">
|
|
55
|
+
<div><div class="setting-label">Fingerprint protection</div><div class="setting-desc">Prevent canvas/WebGL fingerprinting</div></div>
|
|
56
|
+
<label class="toggle"><input type="checkbox" id="fingerprintProtection"><span class="slider"></span></label>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="setting-row">
|
|
59
|
+
<div><div class="setting-label">Referrer policy</div><div class="setting-desc">What sites see when you click a link</div></div>
|
|
60
|
+
<input type="text" id="referrerPolicy" value="no-referrer">
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="section">
|
|
65
|
+
<h2>Appearance</h2>
|
|
66
|
+
<div class="setting-row">
|
|
67
|
+
<div><div class="setting-label">Show bookmarks bar</div><div class="setting-desc">Display bookmarks under the address bar</div></div>
|
|
68
|
+
<label class="toggle"><input type="checkbox" id="showBookmarksBar"><span class="slider"></span></label>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="setting-row">
|
|
71
|
+
<div><div class="setting-label">Default zoom</div><div class="setting-desc">Default page zoom level</div></div>
|
|
72
|
+
<input type="text" id="defaultZoom" value="100" style="width:60px; text-align:center;">
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div class="section">
|
|
77
|
+
<h2>Tor</h2>
|
|
78
|
+
<div class="setting-row">
|
|
79
|
+
<div><div class="setting-label">Tor proxy URL</div><div class="setting-desc">SOCKS5 proxy for Tor routing</div></div>
|
|
80
|
+
<input type="text" id="torProxyUrl" value="">
|
|
81
|
+
</div>
|
|
82
|
+
<div class="setting-row">
|
|
83
|
+
<div><div class="setting-label">Auto-connect Tor on start</div><div class="setting-desc">Enable Tor automatically when browser opens</div></div>
|
|
84
|
+
<label class="toggle"><input type="checkbox" id="autoConnectTor"><span class="slider"></span></label>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div class="section">
|
|
89
|
+
<h2>About</h2>
|
|
90
|
+
<div class="setting-row">
|
|
91
|
+
<div><div class="setting-label">Atlas Browser</div><div class="setting-desc">Version 0.2.0 by Atlasiant</div></div>
|
|
92
|
+
<span style="color:#8888a0; font-family: 'SF Mono', monospace; font-size: 11px;">v0.2.0</span>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<button class="reset-btn" id="reset-btn">Reset All Settings</button>
|
|
97
|
+
<div class="version">Atlas Browser v0.2.0 | Privacy-First | Powered by Search Angel</div>
|
|
98
|
+
|
|
99
|
+
<script>
|
|
100
|
+
const api = window.browserAPI;
|
|
101
|
+
const fields = ['homepage', 'searchEngine', 'clearDataOnExit', 'blockTrackers',
|
|
102
|
+
'fingerprintProtection', 'referrerPolicy', 'showBookmarksBar', 'defaultZoom',
|
|
103
|
+
'torProxyUrl', 'autoConnectTor'];
|
|
104
|
+
|
|
105
|
+
async function load() {
|
|
106
|
+
if (!api) return;
|
|
107
|
+
const s = await api.getSettings();
|
|
108
|
+
fields.forEach(f => {
|
|
109
|
+
const el = document.getElementById(f);
|
|
110
|
+
if (!el) return;
|
|
111
|
+
if (el.type === 'checkbox') el.checked = !!s[f];
|
|
112
|
+
else el.value = s[f] || '';
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Auto-save on change
|
|
117
|
+
fields.forEach(f => {
|
|
118
|
+
const el = document.getElementById(f);
|
|
119
|
+
if (!el || el.readOnly) return;
|
|
120
|
+
const event = el.type === 'checkbox' ? 'change' : 'blur';
|
|
121
|
+
el.addEventListener(event, () => {
|
|
122
|
+
if (!api) return;
|
|
123
|
+
const val = el.type === 'checkbox' ? el.checked :
|
|
124
|
+
f === 'defaultZoom' ? parseInt(el.value) || 100 : el.value;
|
|
125
|
+
api.setSetting(f, val);
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
document.getElementById('reset-btn').addEventListener('click', async () => {
|
|
130
|
+
if (!api || !confirm('Reset all settings to defaults?')) return;
|
|
131
|
+
await api.resetSettings();
|
|
132
|
+
load();
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
load();
|
|
136
|
+
</script>
|
|
137
|
+
</body>
|
|
138
|
+
</html>
|