-
-
Notifications
You must be signed in to change notification settings - Fork 50
Description
MacOS by default only whitelists the 127.0.0.1 loopback address. This is a problem as we use loopback addresses in the range of 127.x.x.2 for the proxy tool, with one IP corresponding to one game world.
Without whitelisting these addresses, the clients will be unable to communicate with the proxy tool after being patched, rendering the entire process non-functional.
In order to remedy this problem, we need to write a script that can whitelist all the loopback addresses from world 301 up to around 600 - effectively every world that exists in Old School RuneScape. Because this process is only done once (until a reboot occurs), we need to secure all the existing worlds and give some headroom for new worlds that might be added as well.
The problem with whitelisting these loopback addresses is that they require sudo privileges - this is likely not something the proxy tool will have. The current best plan forward is to do these steps:
- Launch the HTTP server when the proxy tool boots up.
- If the operating system is MacOS, attempt to ping the HTTP server on. If the ping is successful, do nothing - the addresses have been whitelisted. If it isn't successful, go to step 3.
- Launch a modal window asking the user for the
sudopassword, with an explanation for why this is necessary. - Once the
sudopassword has been acquired, run the script withsudoprivileges, whitelisting all the loopback addresses that we'll need. - Restart the HTTP server - it is unclear whether this is necessary, but it probably is.
The command to whitelist a loopback address is sudo ifconfig lo0 alias 127.x.x.2.