IgorTimofeev / MineOS

Home of MineOS and it's software for OpenComputers mod
Other
754 stars 188 forks source link

Is offline install possible? #575

Closed happymimimix closed 9 months ago

happymimimix commented 9 months ago

Instead of wget from your github repo, I want to let it grab files from my own device for installation. I set up a file server with chfs, and typed wget -f http://127.0.0.1/chfs/shared/Installer/BIOS.lua /tmp/bios.lua.

But this happened when I tried to do it: image

How can I solve this issue?

CoolCat467 commented 9 months ago

Not completely sure off the top of my head, but I think this is an issue with the way OpenComputers itself works. From a security standpoint, it would not be safe to allow random people on a minecraft server talk to the server computer's local network addresses. There might be a configuration option for it somewhere, but I am not sure.

This is not an issue with MineOS itself.

MrFredber commented 9 months ago

I heard that open computers has problems with Internet addresses, so they completely blocked access to sites via http. https only

PublicVoidUpdate commented 9 months ago

you could probably put the install files on a floppy.

Smok1e commented 9 months ago

Instead of wget from your github repo, I want to let it grab files from my own device for installation. I set up a file server with chfs, and typed wget -f http://127.0.0.1/chfs/shared/Installer/BIOS.lua /tmp/bios.lua.

But this happened when I tried to do it: image

How can I solve this issue?

The problem is that you are connecting to 127.0.0.1 (localhost) from opencomputers, which is not allowed by default by security reasons. If that was possible, any public server player could potentially get access to server's local network.

To get this actually work, you'll have to locate the opencomputers config file at .minecraft/config/opencomputers/settings.conf and change "deny private" in 675th line to "allow private". Then restart minecraft and you should now be able to download this file from localhost.

image

Smok1e commented 9 months ago

I heard that open computers has problems with Internet addresses, so they completely blocked access to sites via http. https only

nope, if that was the case, mineos market wont work at all

IgorTimofeev commented 9 months ago

If you need to run installer & download files hosted on your local machine, simple sources copy-pasting won't work, because pre-installation BIOS redirects you to GitHub: https://github.com/IgorTimofeev/MineOS/blob/master/Installer/BIOS.lua#L5

Then installer itself downloads all files from this repo anyway: https://github.com/IgorTimofeev/MineOS/blob/master/Installer/Main.lua#L16

You'll have to overwrite them to address of your host. Btw are you really want to fuck with it?

happymimimix commented 5 months ago

If you need to run installer & download files hosted on your local machine, simple sources copy-pasting won't work, because pre-installation BIOS redirects you to GitHub: https://github.com/IgorTimofeev/MineOS/blob/master/Installer/BIOS.lua#L5

Then installer itself downloads all files from this repo anyway: https://github.com/IgorTimofeev/MineOS/blob/master/Installer/Main.lua#L16

You'll have to overwrite them to address of your host. Btw are you really want to fuck with it?

I'll just do a simple search & replace to all the lua files and let them pull files from 127.0.0.1 instead of github. This step is easy actually.

happymimimix commented 5 months ago

Instead of wget from your github repo, I want to let it grab files from my own device for installation. I set up a file server with chfs, and typed wget -f http://127.0.0.1/chfs/shared/Installer/BIOS.lua /tmp/bios.lua. But this happened when I tried to do it: image How can I solve this issue?

The problem is that you are connecting to 127.0.0.1 (localhost) from opencomputers, which is not allowed by default by security reasons. If that was possible, any public server player could potentially get access to server's local network.

To get this actually work, you'll have to locate the opencomputers config file at .minecraft/config/opencomputers/settings.conf and change "deny private" in 675th line to "allow private". Then restart minecraft and you should now be able to download this file from localhost.

image

Thanks very much! I'll have a try editing the config when I have a chance to try that out later. For now I'm busy working on other things that are more important.