Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP/IP internet networking support #352

Open
levelsio opened this issue Oct 24, 2024 · 10 comments
Open

TCP/IP internet networking support #352

levelsio opened this issue Oct 24, 2024 · 10 comments

Comments

@levelsio
Copy link

It would be very cool to have real TCP/IP internet networking support.

I know JS-DOS supports IPX but I am unsure how to hack that to open websites in Netscape and chat in mIRC.

I am running it on my site at Pieter (dot) com.

Also happy to fund to add support for it. Would be very cool to have full internet support.

Thanks!

@rgex
Copy link

rgex commented Oct 24, 2024

Even with TCP/IP support It is unlikely you will be able to open any website because Netscape can't handle modern day https.
https://www.reddit.com/r/techsupport/comments/4wfyqo/cant_load_reddit_without_https_in_netscape/?rdt=37815

@hasnat
Copy link

hasnat commented Oct 24, 2024

you'd be limited with Same Origin Policy / CSRF
you can by proxing requests via your own (same domain) backend.
e.g. if php on backend, simply putting you'd be returning <?php echo file_get_contents($_GET['url'])

bad idea having no restriction public proxy

@levelsio
Copy link
Author

That's fine, I'd just like to open https://pieter.com with JS-DOS running on https://pieter.com

Right now it opens a local copy (INDEX.HTM) but would be cool to have it live (and easier to update)

Also wanna do mIRC with my own IRC server on same domain too

@caiiiycuk
Copy link
Owner

dosbox-x support network adapters, need to bring support to web

@levelsio
Copy link
Author

levelsio commented Nov 8, 2024

Some update after I did more research:

It seems possible with Em-DOSbox by compiling it with SDL_net and then running Winsock to dial up into a virtual ISP via Websockets that routes the internet with a PPP daemon. Kinda like a Websocket proxy.

Em-DOSbox is similar to JS-DOS and also runs in the browser.

I think it'd be a great addition to JS-DOS, especially since IMHO, JS-DOS is way more user friendly and easier to use than Em-DOSbox

And just the idea of being able to browse the live web in Netscape (yes in HTTP not HTTPS) which runs inside JS-DOS in a browser seems supercool (and nerdy :P)

Here's how they enable internet there:

dreamlayers/em-dosbox#32

@caiiiycuk
Copy link
Owner

caiiiycuk commented Nov 9, 2024 via email

@levelsio
Copy link
Author

levelsio commented Nov 11, 2024

I have a working prototype here now with help from @jbaicoianu:

https://x.com/levelsio/status/1855359096444334315

It dials up via Websockets into a virtual ISP that routes traffic via a PPP daemon, it works remarkably well

One thing it needs is

Module['websocket'] = { url: 'wss://' };

I'm noob but it seems like it needs this module, which I'm not sure is a Websockets module for Emscripten or DOSbox.

Anyway it seems approachable now if you'd like to add it to JS-DOS and we can test it for you if you like!

@levelsio
Copy link
Author

I'd love to fund JS-DOS development for this issue btw. It seems JS-DOS performance is way better than EM-DOSbox and seems easier to use. Getting internet with Websockets to work on it too would be great for me because I'm trying to make an authentic 1995 internet experience at pieter.com

@caiiiycuk
Copy link
Owner

I agree this is great thing to have, and of course I want to do it, but no time for now. Maybe someone else can implement this.

@AlinGheaja
Copy link

AlinGheaja commented Nov 24, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants