Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,8 @@ This project is made possible by the following amazing open-source libraries and
## Asset Sources
- Graphical elements, icons, and sounds are derived from classic Windows operating systems for historical recreation and compatibility.
- All rights to original Windows artwork, icons, cursors, and media belong to Microsoft Corporation.

## OldWebToday
- **Source**: [oldweb-today/oldweb-today](https://github.com/oldweb-today/oldweb-today)
- **License**: AGPL-3.0
- **Use**: x86 emulation and virtual networking for Internet Explorer retro mode.
98 changes: 98 additions & 0 deletions docs/proxy-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Internet Explorer Retro Proxy Setup Guide

To use the new emulated Internet Explorer with real archived websites, you need to set up a CORS proxy. A Cloudflare Worker is the best free option for this.

## Cloudflare Worker Setup

1. **Create a Cloudflare Account**: If you don't have one, sign up for free at [cloudflare.com](https://www.cloudflare.com/).
2. **Create a Worker**:
* Log in to the [Cloudflare Dashboard](https://dash.cloudflare.com/).
* Navigate to **Workers & Pages** > **Overview**.
* Click **Create application** > **Create Worker**.
* Name it `win98-web-proxy` and click **Deploy**.
3. **Configure the Worker**:
* Click **Edit Code**.
* Replace the entire content of `worker.js` with the script provided below.
* Click **Save and Deploy**.
4. **Get your Proxy URL**:
* Your worker URL will look like `https://win98-web-proxy.yourname.workers.dev/`.
* Copy this URL.

## Using the Proxy in Win98-Web

1. Open the emulated Internet Explorer in your browser.
2. (Optional) If I implement a settings UI: Paste the URL into the "Proxy Settings" dialog.
3. Currently, the proxy is hardcoded to a default, but you can change it in `localStorage`:
* Open Browser Console (F12).
* Type: `localStorage.setItem("ie-proxy-url", "https://your-worker-url.workers.dev/proxy/")`
* Restart the Internet Explorer app.

---

## Proxy Script (`worker.js`)

```javascript
/**
* win98-web-proxy
* A simple CORS proxy for OldWebToday-style historical browsing.
*/

const CORS_HEADERS = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, HEAD, POST, OPTIONS",
"Access-Control-Allow-Headers": "*",
"Access-Control-Expose-Headers": "*",
};

export default {
async fetch(request, env, ctx) {
const url = new URL(request.url);

// Handle OPTIONS request for CORS preflight
if (request.method === "OPTIONS") {
return new Response(null, { headers: CORS_HEADERS });
}

// Expecting URL format: /proxy/http://example.com or /proxy/https://web.archive.org/...
let targetUrl = url.pathname.slice(1);
if (targetUrl.startsWith("proxy/")) {
targetUrl = targetUrl.replace("proxy/", "");
}

if (!targetUrl) {
return new Response("Win98 Web Proxy is running. Usage: /proxy/http://url-to-fetch", {
headers: { "Content-Type": "text/plain", ...CORS_HEADERS }
});
}

// Ensure protocol
if (!targetUrl.startsWith("http")) {
targetUrl = "http://" + targetUrl;
}

try {
const newRequest = new Request(targetUrl, {
method: request.method,
headers: request.headers,
body: request.body,
redirect: "follow"
});

const response = await fetch(newRequest);

// Reconstruct the response with CORS headers
const newResponse = new Response(response.body, response);
Object.keys(CORS_HEADERS).forEach(key => {
newResponse.headers.set(key, CORS_HEADERS[key]);
});

return newResponse;
} catch (err) {
return new Response("Proxy Error: " + err.message, {
status: 500,
headers: CORS_HEADERS
});
}
},
};
```
205 changes: 205 additions & 0 deletions public/assets/ie-emulator/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
[
{
"id": "nm2-mac",
"name": "NCSA Mosaic 2",
"os": "macos",
"emu": "bas",
"icon": "mosaic.png",
"opts": {
"biosPath": "$IMAGE_PREFIX/bas-2/bios/",
"imageUrl": "$IMAGE_PREFIX/bas-2/images/hd-ie-m.img$GZ",
"emuBrowserId": "br-nm2"
}
},
{
"id": "nm3-mac",
"name": "NCSA Mosaic 3",
"os": "macos",
"emu": "bas",
"icon": "mosaic.png",
"opts": {
"biosPath": "$IMAGE_PREFIX/bas-2/bios/",
"imageUrl": "$IMAGE_PREFIX/bas-2/images/hd-ns.img$GZ",
"emuBrowserId": "br-nm3"
}
},
{
"id": "ml-mac",
"name": "MacLynx 2",
"os": "macos",
"emu": "bas",
"icon": "maclynx.png",
"opts": {
"biosPath": "$IMAGE_PREFIX/bas-2/bios/",
"imageUrl": "$IMAGE_PREFIX/bas-2/images/hd-ns.img$GZ",
"emuBrowserId": "br-ml2"
}
},
{
"id": "ns3-mac",
"name": "Navigator 3",
"os": "macos",
"emu": "bas",
"icon": "ns3.png",
"features": ["shockwave 3", "java 1.0"],
"opts": {
"biosPath": "$IMAGE_PREFIX/bas-2/bios/",
"imageUrl": "$IMAGE_PREFIX/bas-2/images/hd-ns.img$GZ",
"emuBrowserId": "br-ns3"
}
},
{
"id": "ns4-mac",
"name": "Navigator 4",
"os": "macos",
"emu": "bas",
"icon": "ns4.png",
"features": ["shockwave 3"],
"opts": {
"biosPath": "$IMAGE_PREFIX/bas-2/bios/",
"imageUrl": "$IMAGE_PREFIX/bas-2/images/hd-ns.img$GZ",
"emuBrowserId": "br-ns4"
}
},
{
"id": "ie4-mac",
"name": "IE 4",
"os": "macos",
"emu": "bas",
"icon": "ie4-mac.png",
"features": ["shockwave 3", "java 1.0"],
"opts": {
"biosPath": "$IMAGE_PREFIX/bas-2/bios/",
"imageUrl": "$IMAGE_PREFIX/bas-2/images/hd-ie-m.img$GZ",
"emuBrowserId": "br-ie4"
}
},
{
"id": "ie5-full-boot",
"name": "(Slow Full Boot) IE5 + Netscape 4",
"os": "win98",
"emu": "v86",
"opts": {
"biosPath": "$IMAGE_PREFIX/v86-2/bios/",
"imageUrl": "$IMAGE_PREFIX/v86-2/images/ie5-ns4.img",
"imageSize": 419430400
},
"hidden": true
},
{
"id": "ns4-win",
"name": "Navigator 4",
"os": "win98",
"emu": "v86",
"icon": "ns4.png",
"features": ["flash 8", "java 1.1.5"],
"opts": {
"biosPath": "$IMAGE_PREFIX/v86-2/bios/",
"imageUrl": "$IMAGE_PREFIX/v86-2/images/ie5-ns4.img",
"imageSize": 419430400,
"stateUrl": "$IMAGE_PREFIX/v86-2/state/ns4.bin$GZ",
"clientMAC": [0, 34, 21, 16, 17, 18],
"clientIP": [10, 0, 2, 100]
}
},
{
"id": "ie6-full-boot",
"name": "(Slow Full Boot) IE6",
"os": "win98",
"emu": "v86",
"opts": {
"biosPath": "$IMAGE_PREFIX/v86-2/bios/",
"imageUrl": "$IMAGE_PREFIX/v86-2/images/ie6.img",
"imageSize": 419430400
},
"hidden": true
},
{
"id": "ie5",
"name": "IE 5",
"os": "win98",
"emu": "v86",
"icon": "ie5.png",
"features": ["flash 9", "java 5.0"],
"opts": {
"biosPath": "$IMAGE_PREFIX/v86-2/bios/",
"imageUrl": "$IMAGE_PREFIX/v86-2/images/ie5-ns4.img",
"imageSize": 419430400,
"stateUrl": "$IMAGE_PREFIX/v86-2/state/ie5.bin$GZ",
"clientMAC": [0, 34, 21, 16, 17, 18],
"clientIP": [10, 0, 2, 100]
}
},
{
"id": "ie6",
"name": "IE 6",
"os": "win98",
"emu": "v86",
"icon": "ie6.png",
"features": ["flash 9", "java 5.0"],
"opts": {
"biosPath": "$IMAGE_PREFIX/v86-2/bios/",
"imageUrl": "$IMAGE_PREFIX/v86-2/images/ie6.img",
"imageSize": 419430400,
"stateUrl": "$IMAGE_PREFIX/v86-2/state/ie6.bin$GZ",
"clientMAC": [0, 34, 21, 16, 17, 18],
"clientIP": [10, 0, 2, 100]
}
},
{
"id": "tc-full-boot",
"name": "(Slow Full Boot) TinyCore Image",
"os": "linux",
"emu": "v86",
"opts": {
"biosPath": "$IMAGE_PREFIX/v86-2/bios/",
"imageUrl": "$IMAGE_PREFIX/v86-2/images/tclinux.img",
"imageSize": 209715200,
"acpi": true
},
"hidden": true
},
{
"id": "ff10",
"name": "Firefox 10",
"os": "linux",
"emu": "v86",
"icon": "firefox.png",
"features": ["flash 32"],
"opts": {
"biosPath": "$IMAGE_PREFIX/v86-2/bios/",
"imageUrl": "$IMAGE_PREFIX/v86-2/images/tclinux.img",
"imageSize": 209715200,
"stateUrl": "$IMAGE_PREFIX/v86-2/state/ff10.bin$GZ",
"clientMAC": [0, 34, 21, 16, 17, 18],
"clientIP": [10, 0, 2, 100],
"acpi": true
}
},
{
"id": "op12",
"name": "Opera 12",
"os": "linux",
"emu": "v86",
"icon": "opera.png",
"features": ["flash 32"],
"opts": {
"biosPath": "$IMAGE_PREFIX/v86-2/bios/",
"imageUrl": "$IMAGE_PREFIX/v86-2/images/tclinux.img",
"imageSize": 209715200,
"stateUrl": "$IMAGE_PREFIX/v86-2/state/op12.bin$GZ",
"clientMAC": [0, 34, 21, 16, 17, 18],
"clientIP": [10, 0, 2, 100],
"acpi": true
}
},
{
"id": "ruffle",
"name": "Ruffle (Flash)",
"os": "native",
"emu": "native",
"icon": "ruffle.png",
"features": ["flash"],
"opts": {"injectScripts": ["dist/ruffle.js"]}
}
]
Loading