golt

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

README

⚔️ golt

golt is a CLI-based third-party game launcher for OldSchool Runescape.

Why?

The official recommendation points to several community projects, most of which involve running the launcher in Wine or a similar environment. However, I really wanted a native solution, or one that didn't require installing a 1.5GB compatibility layer solely for launcher functionality.

While there is a project that served as the inspiration for this one, and functions seamlessly on Linux, there were some boxes that it didn't tick for me:

  • Its installation size is ~460MB
  • Lack of support for overriding the client launch command/environment
  • It's a bit of a pain to compile

In comparison, the linux-amd64 build for golt is a single 6.8MB binary.

Installation

Either download the latest binary from the Releases page (or build it yourself), and add it to a directory on your PATH.

Then, create a desktop entry for the application:

[Desktop Entry]
Type=Application
Name=golt
Exec=golt %U
StartupNotify=true
Terminal=true
MimeType=x-scheme-handler/jagex;

Then, register it to be the default handler for the jagex:<...> scheme:

xdg-mime default golt.desktop x-scheme-handler/jagex

Finally, set up an iptable entry to redirect localhost:80 to localhost:8080:

sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8080
Why?

The login flow is currently done in the browser:

  • The OAuth login redirects to a page which invokes a scheme handler
  • The game login step redirects to http://localhost

These redirect URLs are validated server side, so cannot be modified on the client side.

As for the iptable entry, most Linux distros don't allow binding to port 80, so golt binds to port 8080 instead.

Configuration

Environment Variable Default Description
GOLT_GAME_PATH RuneLite.AppImage Either a binary on PATH, or an absolute path to the client to launch.
This value is passed to exec.Command(docs)
GOLT_BIND_PORT 8080 Local port to which golt will bind to to receive the OAuth response callback.
If this is not 80, you must set up an iptable entry to redirect inbound traffic from port 80 to this port.

Disclaimer

This project is not affiliated with or endorsed by Jagex Ltd. It is an independent project created for educational and testing purposes. Please use responsibly and adhere to Jagex's terms of service.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL