This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathtestprox.html
More file actions
620 lines (531 loc) · 22.1 KB
/
Copy pathtestprox.html
File metadata and controls
620 lines (531 loc) · 22.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1346.lol - Web Proxy Terminal</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
background: #000;
color: #00ff00;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.terminal-window {
width: 90%;
max-width: 800px;
height: 500px;
background: #1a1a1a;
border-radius: 8px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.terminal-header {
background: #2d2d2d;
height: 30px;
display: flex;
align-items: center;
padding: 0 15px;
border-bottom: 1px solid #333;
}
.traffic-lights {
display: flex;
gap: 8px;
}
.light {
width: 12px;
height: 12px;
border-radius: 50%;
}
.red { background: #ff5f57; }
.yellow { background: #ffbd2e; }
.green { background: #28ca42; }
.window-title {
flex: 1;
text-align: center;
color: #999;
font-size: 13px;
}
.terminal-body {
padding: 20px;
height: calc(100% - 30px);
overflow-y: auto;
background: #000;
}
.terminal-line {
margin-bottom: 8px;
font-size: 14px;
line-height: 1.4;
}
.prompt {
display: flex;
align-items: center;
margin-top: 20px;
}
.prompt-symbol {
color: #00ff00;
margin-right: 8px;
}
.input-container {
flex: 1;
position: relative;
}
#command-input {
background: transparent;
border: none;
color: #00ff00;
font-family: inherit;
font-size: 14px;
outline: none;
width: 100%;
}
.cursor {
display: inline-block;
width: 8px;
height: 16px;
background: #00ff00;
animation: blink 1s infinite;
margin-left: 2px;
}
@keyframes blink {
0%, 50% { opacity: 1; }
51%, 100% { opacity: 0; }
}
.help-text {
color: #888;
font-size: 12px;
margin-top: 20px;
}
.error {
color: #ff4444;
}
.success {
color: #44ff44;
}
.info {
color: #4444ff;
}
.hidden {
display: none;
}
.proxy-frame {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
background: white;
z-index: 1000;
}
.proxy-controls {
position: fixed;
top: 10px;
right: 10px;
z-index: 1001;
background: rgba(0, 0, 0, 0.8);
padding: 10px;
border-radius: 5px;
}
.proxy-controls button {
background: #ff4444;
color: white;
border: none;
padding: 5px 10px;
border-radius: 3px;
cursor: pointer;
font-family: inherit;
}
</style>
</head>
<body>
<div class="terminal-window" id="terminal">
<div class="terminal-header">
<div class="traffic-lights">
<div class="light red"></div>
<div class="light yellow"></div>
<div class="light green"></div>
</div>
<div class="window-title">1346.lol</div>
</div>
<div class="terminal-body">
<div class="terminal-line">Initializing all services...</div>
<div class="terminal-line">Type 'help' for all commands.</div>
<div class="terminal-line">Press 'ctrl + l' to show/hide terminal.</div>
<div class="terminal-line">Ready for search term or command.</div>
<div class="prompt">
<span class="prompt-symbol">➜ ~</span>
<div class="input-container">
<input type="text" id="command-input" placeholder="enter query" autocomplete="off">
<span class="cursor"></span>
</div>
</div>
<div class="help-text">
<div>Available commands:</div>
<div>• help - Show this help message</div>
<div>• clear - Clear terminal</div>
<div>• proxy [url] - Access website through proxy</div>
<div>• exit - Close proxy view</div>
<div>• about - About this service</div>
</div>
</div>
</div>
<script>
const input = document.getElementById('command-input');
const terminalBody = document.querySelector('.terminal-body');
const terminal = document.getElementById('terminal');
let commandHistory = [];
let historyIndex = -1;
let currentBaseUrl = '';
// Focus input on load
window.addEventListener('load', () => {
input.focus();
});
// Keep input focused
document.addEventListener('click', () => {
input.focus();
});
// Handle keyboard shortcuts
document.addEventListener('keydown', (e) => {
if (e.ctrlKey && e.key === 'l') {
e.preventDefault();
toggleTerminal();
}
if (e.key === 'ArrowUp') {
e.preventDefault();
navigateHistory(-1);
}
if (e.key === 'ArrowDown') {
e.preventDefault();
navigateHistory(1);
}
});
// Handle command input
input.addEventListener('keydown', (e) => {
if (e.key === 'Enter') {
const command = input.value.trim();
if (command) {
executeCommand(command);
commandHistory.unshift(command);
historyIndex = -1;
}
input.value = '';
}
});
function navigateHistory(direction) {
if (commandHistory.length === 0) return;
historyIndex += direction;
if (historyIndex < -1) historyIndex = -1;
if (historyIndex >= commandHistory.length) historyIndex = commandHistory.length - 1;
if (historyIndex === -1) {
input.value = '';
} else {
input.value = commandHistory[historyIndex];
}
}
function addTerminalLine(text, className = '') {
const line = document.createElement('div');
line.className = `terminal-line ${className}`;
line.textContent = text;
const prompt = document.querySelector('.prompt');
terminalBody.insertBefore(line, prompt);
terminalBody.scrollTop = terminalBody.scrollHeight;
}
function executeCommand(command) {
// Show the command that was entered
addTerminalLine(`➜ ~ ${command}`);
const parts = command.split(' ');
const cmd = parts[0].toLowerCase();
const args = parts.slice(1);
switch (cmd) {
case 'help':
showHelp();
break;
case 'clear':
clearTerminal();
break;
case 'proxy':
if (args.length > 0) {
proxyUrl(args.join(' '));
} else {
addTerminalLine('Usage: proxy [url]', 'error');
addTerminalLine('Example: proxy google.com', 'info');
}
break;
case 'exit':
closeProxy();
break;
case 'about':
showAbout();
break;
default:
if (command.includes('.') && !command.includes(' ')) {
// Assume it's a URL
proxyUrl(command);
} else {
addTerminalLine(`Command not found: ${cmd}`, 'error');
addTerminalLine('Type "help" for available commands.', 'info');
}
}
}
function showHelp() {
addTerminalLine('Available commands:', 'success');
addTerminalLine(' help - Show this help message');
addTerminalLine(' clear - Clear terminal');
addTerminalLine(' proxy [url] - Access website through proxy');
addTerminalLine(' exit - Close proxy view');
addTerminalLine(' about - About this service');
addTerminalLine('');
addTerminalLine('You can also enter URLs directly (e.g., google.com)', 'info');
}
function clearTerminal() {
const lines = terminalBody.querySelectorAll('.terminal-line:not(.help-text *)');
lines.forEach(line => {
if (!line.closest('.help-text')) {
line.remove();
}
});
}
function proxyUrl(url) {
// Add protocol if missing
if (!url.startsWith('http://') && !url.startsWith('https://')) {
url = 'https://' + url;
}
try {
new URL(url); // Validate URL
addTerminalLine(`Connecting to ${url}...`, 'info');
addTerminalLine('Loading proxy view...', 'success');
// Create proxy iframe
setTimeout(() => {
createProxyView(url);
}, 1000);
} catch (e) {
addTerminalLine('Invalid URL format', 'error');
addTerminalLine('Example: proxy google.com', 'info');
}
}
function createProxyView(url) {
addTerminalLine(`Establishing proxy connection to ${url}...`, 'info');
const proxyFrame = document.createElement('iframe');
proxyFrame.className = 'proxy-frame';
const proxyServices = [
// Working CORS proxies that handle modern websites
`https://cors.bridged.cc/${url}`,
`https://yacdn.org/proxy/${url}`,
`https://api.codetabs.com/v1/proxy?quest=${encodeURIComponent(url)}`,
`https://crossorigin.me/${url}`,
// Alternative approaches
`https://translate.google.com/translate?sl=auto&tl=en&u=${encodeURIComponent(url)}`,
`https://proxy.cors.sh/${url}`,
// Direct access as final fallback
url
];
let currentProxyIndex = 0;
async function tryProxyWithFetch(proxyUrl, isDirectUrl = false) {
try {
addTerminalLine(`Testing proxy service ${currentProxyIndex + 1}...`, 'info');
if (isDirectUrl) {
// For direct URLs, just load in iframe
proxyFrame.src = proxyUrl;
return true;
}
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout
const response = await fetch(proxyUrl, {
signal: controller.signal,
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
}
});
clearTimeout(timeoutId);
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
if (proxyUrl.includes('translate.google.com') || proxyUrl.includes('cors.bridged.cc')) {
proxyFrame.src = proxyUrl;
return true;
}
const content = await response.text();
if (!content || content.length < 100) {
throw new Error('Empty or invalid response');
}
const baseUrl = new URL(url);
const rewrittenContent = content
.replace(/href="\/([^"]*?)"/g, `href="${baseUrl.origin}/$1"`)
.replace(/src="\/([^"]*?)"/g, `src="${baseUrl.origin}/$1"`)
.replace(/action="\/([^"]*?)"/g, `action="${baseUrl.origin}/$1"`)
.replace(/url$$\/([^)]*?)$$/g, `url(${baseUrl.origin}/$1)`);
// Inject content into iframe
proxyFrame.srcdoc = rewrittenContent;
proxyFrame.onload = () => {
try {
const iframeDoc = proxyFrame.contentDocument || proxyFrame.contentWindow.document;
// Intercept all clicks and forms
iframeDoc.addEventListener('click', (e) => {
const link = e.target.closest('a');
if (link && link.href) {
e.preventDefault();
const newUrl = link.href;
addTerminalLine(`Navigating to: ${newUrl}`, 'info');
createProxyView(newUrl);
}
});
// Intercept form submissions
iframeDoc.addEventListener('submit', (e) => {
e.preventDefault();
const form = e.target;
const formData = new FormData(form);
const actionUrl = form.action || url;
addTerminalLine(`Form submitted to: ${actionUrl}`, 'info');
// Handle form submission through proxy
});
} catch (err) {
console.log('[v0] Cross-origin iframe access blocked:', err);
}
};
return true;
} catch (error) {
console.log('[v0] Proxy fetch failed:', error);
addTerminalLine(`Service ${currentProxyIndex + 1} failed: ${error.message}`, 'error');
return false;
}
}
async function tryNextProxy() {
if (currentProxyIndex >= proxyServices.length) {
addTerminalLine('All proxy services failed or are blocked.', 'error');
addTerminalLine('Your network may be blocking proxy services.', 'error');
addTerminalLine('Try the Direct button to open in a new window.', 'info');
closeProxy();
return;
}
const proxyUrl = proxyServices[currentProxyIndex];
const isDirectUrl = currentProxyIndex === proxyServices.length - 1;
addTerminalLine(`Trying proxy service ${currentProxyIndex + 1}/${proxyServices.length}...`, 'info');
const success = await tryProxyWithFetch(proxyUrl, isDirectUrl);
if (success) {
addTerminalLine('Proxy connection established successfully.', 'success');
// Update method indicator
const methodDiv = proxyControls.querySelector('div:last-child');
if (methodDiv) {
const methods = ['CORS Bridged', 'YaCDN Proxy', 'CodeTabs', 'CrossOrigin.me', 'Google Translate', 'CORS.sh', 'Direct'];
methodDiv.textContent = `Method: ${methods[currentProxyIndex]}`;
}
} else {
currentProxyIndex++;
setTimeout(tryNextProxy, 2000); // Increased delay between attempts
}
}
const proxyControls = document.createElement('div');
proxyControls.className = 'proxy-controls';
proxyControls.innerHTML = `
<button onclick="closeProxy()" style="background: #ff4444;">✕ Close Proxy</button>
<button onclick="refreshProxy('${url}')" style="background: #4444ff; margin-left: 10px;">🔄 Refresh</button>
<button onclick="openDirect('${url}')" style="background: #44ff44; margin-left: 10px;">🔗 Direct</button>
<button onclick="tryAdvancedProxy('${url}')" style="background: #ff8800; margin-left: 10px;">⚡ Advanced</button>
<div style="color: #00ff00; font-size: 12px; margin-top: 5px;">
Proxying: ${url}
</div>
<div style="color: #888; font-size: 10px;">
Method: Loading...
</div>
`;
// Hide terminal and show proxy
terminal.classList.add('hidden');
document.body.appendChild(proxyFrame);
document.body.appendChild(proxyControls);
// Start trying proxies
tryNextProxy();
}
function openDirect(url) {
addTerminalLine('Opening direct access...', 'info');
window.open(url, '_blank', 'width=1200,height=800,scrollbars=yes,resizable=yes');
}
window.addEventListener('message', function(event) {
if (event.data && event.data.type === 'navigate') {
addTerminalLine(`Internal navigation to: ${event.data.url}`, 'info');
const proxyFrame = document.querySelector('.proxy-frame');
if (proxyFrame && currentBaseUrl) {
proxyFrame.src = currentBaseUrl + event.data.url;
}
}
});
function refreshProxy(url) {
closeProxy();
setTimeout(() => {
proxyUrl(url);
}, 500);
}
function closeProxy() {
const proxyFrame = document.querySelector('.proxy-frame');
const proxyControls = document.querySelector('.proxy-controls');
if (proxyFrame) {
proxyFrame.remove();
}
if (proxyControls) {
proxyControls.remove();
}
terminal.classList.remove('hidden');
addTerminalLine('Proxy connection terminated.', 'success');
addTerminalLine('Returned to terminal interface.', 'info');
input.focus();
}
function toggleTerminal() {
terminal.classList.toggle('hidden');
if (!terminal.classList.contains('hidden')) {
input.focus();
}
}
function showAbout() {
addTerminalLine('1346.lol Web Proxy Terminal', 'success');
addTerminalLine('Version 2.0.0');
addTerminalLine('');
addTerminalLine('A functional terminal-style web proxy interface.');
addTerminalLine('Enter URLs to browse websites through our proxy service.');
addTerminalLine('');
addTerminalLine('Features:', 'info');
addTerminalLine('• Full website proxying with CORS bypass');
addTerminalLine('• Terminal-style command interface');
addTerminalLine('• Command history navigation');
addTerminalLine('• Keyboard shortcuts (Ctrl+L)');
}
// Simulate typing effect on load
window.addEventListener('load', () => {
setTimeout(() => {
input.focus();
}, 500);
});
function tryAdvancedProxy(url) {
addTerminalLine('Attempting advanced proxy techniques...', 'info');
closeProxy();
// Use multiple advanced techniques
const advancedMethods = [
// Use different user agents and headers
`https://api.allorigins.win/get?url=${encodeURIComponent(url)}`,
// Try mobile versions which are often less restricted
`https://api.allorigins.win/raw?url=${encodeURIComponent(url.replace('www.', 'm.'))}`,
// Use archive.today for recent snapshots
`https://archive.today/newest/${url}`,
// Try different subdomains
`https://api.allorigins.win/raw?url=${encodeURIComponent(url.replace('https://', 'https://www.'))}`
];
setTimeout(() => {
const randomMethod = advancedMethods[Math.floor(Math.random() * advancedMethods.length)];
createProxyView(randomMethod);
}, 1000);
}
function tryBypass(url) {
addTerminalLine('Attempting bypass methods...', 'info');
tryAdvancedProxy(url);
}
</script>
</body>
</html>