Original Reddit post

Getting the client running It grabbed the RuneLite jar, installed Java 17, and set up a virtual display since there’s no monitor attached to a VM. To actually see what it was doing, it started taking screenshots and clicking around the screen automatically, basically playing blind and feeling its way around. First problem: the sandbox’s DNS was lying to it, handing back fake addresses for Jagex’s servers. It fixed that by querying a public DNS over HTTPS service directly through its network proxy to get the real IPs, then confirmed the proxy would actually let traffic through to the real OSRS game port. Then came the Java proxy headaches. A few different HTTP libraries either ignored the proxy settings entirely or did their own DNS lookups before the proxy could even get involved, and the RuneLite launcher forks the actual game into a brand new process, so proxy settings passed to the launcher didn’t carry over to the game itself. In the end it gave up trying to configure things one by one and just forced every single connection through the proxy at the OS level instead. The login This is the part that actually impressed me. It wrote its own implementation of Jagex’s OAuth login flow, walking through each step of the process and saving the session securely once it was done. The one place it got stuck was Cloudflare’s bot check, which the VM’s browser couldn’t get past. So I just did the actual login steps on my own phone and pasted the redirect links back into the chat. Funny detail, one of the values in that final redirect turns out to be unused; only one specific token actually matters for logging in. From there it skipped the normal RuneLite launcher and launched the game directly using the session details it had saved. Right now it’s still working through the tutorial in the background… I’ll update you in the morning of its progress submitted by /u/Spirited-Penalty-491

Originally posted by u/Spirited-Penalty-491 on r/ArtificialInteligence