mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.16k stars 68 forks source link

TCP to the outside world supposed to be supported? #107

Closed onpaws closed 1 year ago

onpaws commented 1 year ago

This project is amazing, great work! I particularly appreciate the drag and drop to upload feature, very intuitive and a nice touch.

TL,DR

When using https://macos9.app, are apps that open raw TCP sockets to the outside world (e.g. Netscape) supposed to work?

Back story

I recently learned that the SSA offers a tool called anypia, source and I got curious to try it out. (anypiamacprojOSX/read me.txt included below) Because the Mac app is vintage and doesn't work on modern macOS°, I thought I'd see if I could compile + run it using https://macos9.app.

I got as far as dragging in the source files (.sitx), and opening Netscape, but then I remembered browsers (to my knowledge) don't support opening raw sockets from JS/frontend code. So this error seems like it should be unsurprising:

I noticed TCP/IP control panel shows 169.254.x.x addresses (I guess it matches 3927 i.e. what happens when no DHCP server response.)

So I was surprised by this comment which seems to suggest TCP may actually work, but doesn't mention actually opening sockets. Should apps Hotline/Netscape/etc be able to make outgoing TCP connections?

Thank you again for your great work, been a fun trip down nostalgia lane :)

read me.txt ``` // Read Me.txt This is a straight conversion to OS X (and OS 9) of the social security benefit calculator at http://www.ssa.gov/OACT/ANYPIA/source.html There is no warranty. Use at your own risk. This compiles with Metrowerks Codewarrior 9.3. To compile it, you'll need to download oactobjs.sea from http://www.ssa.gov/OACT/ANYPIA/source.html, unpack it, and put the resulting oactobjs folder next to the anypiamacprojOSX folder (the folder that contains this file). My work on this program is hereby placed in the public domain. David Phillip Oster April 25, 2005 ```

° I'm on Ventura 13.2.1/Intel

onpaws commented 1 year ago

TIL that another project appears to have already WASMified the C I was looking to compile. Seems I found a way to avoid having to mess with proprietary old 90s compilers 😅

Still, I remain curious about the "TCP to the outside world" question. AIUI historically browsers have disallowed it for security reasons, but it looks like in more recent days new things may be changing? Seems like the "AppleTalk zone" image must involve passing traffic around? I guess its some API that's not raw TCP, but happy to be wrong.

mihaip commented 1 year ago

TCP is not currently supported. What I did add was AppleTalk support so that you could have a "LAN" where other emulator instances could see each other (e.g. for multiplayer games). This blog post has more details: https://blog.persistent.info/2022/07/infinite-mac-networking.html

I've left #45 open as a feature request, closing this as a duplicate of it.

onpaws commented 1 year ago

Thank you for the detailed blog post about this. In particular this commit I find a really interesting read. Thank you for open sourcing your work on this 🙏