ignitetnt
Version:
IGNITE OS — Advanced proxy-enabled gaming platform with comprehensive filter bypass system
135 lines (119 loc) • 4.97 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#100a09" />
<title>Ignite OS | Now Playing</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=DM+Sans:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="./config/main.css?v=2" />
<script src="./config/main.js" type="module"></script>
</head>
<body class="player-body">
<header class="player-bar">
<a class="brand" href="./" aria-label="Return to Ignite OS arcade">
<svg class="brand-mark" viewBox="0 0 32 40" aria-hidden="true">
<path d="M19.1 1.5c1 7.5-5 9.1-3.3 15.2 1-2 2.5-3.3 4.3-4.2 5.2 4.1 8.2 8.5 8.2 13.4C28.3 33.1 22.9 39 15.9 39S3.5 33.8 3.5 26.2c0-5.2 3-10 8-14.7-.3 5.5 1 7.6 2.8 8.5C12.7 10.3 20.3 9.2 19.1 1.5Z" />
</svg>
<span class="brand-name">IGNITE <strong>OS</strong></span>
</a>
<span class="player-status">NOW PLAYING</span>
<a class="back-link" href="./">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M19 12H5m7 7-7-7 7-7"></path>
</svg>
BACK TO ARCADE
</a>
</header>
<main class="player-stage">
<iframe id="gameFrame" title="Game player" allowfullscreen></iframe>
</main>
<script>
// Import proxy utilities
import('./config/proxy-utils.js').then(() => {
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const encodedGame = urlParams.get("g") || urlParams.get("gameurl");
if (!encodedGame) {
window.location.href = "./";
} else {
let gameUrl;
// Try to decode the game URL
if (window.proxyEncoder) {
gameUrl = window.proxyEncoder.xorDecode(encodedGame);
}
// Fallback to simple base64 decode for legacy URLs
if (!gameUrl) {
try {
gameUrl = atob(encodedGame);
} catch (e) {
try {
gameUrl = `https://gms.parcoil.com/${decodeURIComponent(encodedGame)}`;
} catch (e2) {
console.error('Failed to decode game URL:', e2);
window.location.href = "./";
return;
}
}
}
// Ensure URL is properly formatted
if (!gameUrl.startsWith('http')) {
gameUrl = `https://gms.parcoil.com/${gameUrl}`;
}
console.log('Loading game:', gameUrl);
// Create proxy URL for the game
const proxyEndpoints = [
'https://proxy1.ignite-os.workers.dev',
'https://proxy2.ignite-os.vercel.app/api/proxy',
'https://proxy3.ignite-os.netlify.app/.netlify/functions/proxy'
];
let finalUrl = gameUrl;
// Try to use a working proxy
if (proxyEndpoints.length > 0 && window.proxyEncoder) {
const encoded = window.proxyEncoder.xorEncode(gameUrl);
finalUrl = `${proxyEndpoints[0]}?target=${encoded}&origin=${encodeURIComponent(location.origin)}`;
}
// Load the game
const gameFrame = document.getElementById("gameFrame");
gameFrame.src = finalUrl;
// Add error handling
gameFrame.onerror = function() {
console.error('Game failed to load, trying direct URL');
this.src = gameUrl;
};
// Add load event
gameFrame.onload = function() {
console.log('Game loaded successfully');
// Inject additional proxy script into the iframe if same-origin
try {
this.contentWindow.postMessage({
type: 'PROXY_CONFIG',
endpoints: proxyEndpoints,
encoder: window.proxyEncoder
}, '*');
} catch (e) {
// Cross-origin, can't inject
}
};
}
}).catch(error => {
console.error('Failed to load proxy utilities:', error);
// Fallback to legacy behavior
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const gameUrl = urlParams.get("gameurl");
if (!gameUrl) {
window.location.href = "./";
} else {
const embedUrl = `https://gms.parcoil.com/${gameUrl}`;
document.getElementById("gameFrame").src = embedUrl;
}
});
</script>
</body>
</html>