Kagongjok is a background script that automatically logs you back into captive portal Wi-Fi networks when your session times out. It pings an external server to check connectivity and uses a headless browser to complete the login portal flow when the internet goes down.
You can easily install the latest pre-compiled release by running:
curl -sSfL https://raw.githubusercontent.com/minddrop/kagongjok/main/install.sh | shIf you already have Go installed, the easiest way is:
go install github.com/minddrop/kagongjok@latestIf you prefer to clone the repository and build it yourself:
# Clone the repository and build
git clone https://github.com/minddrop/kagongjok
cd kagongjok
go build -o kagongjok .You can download the pre-compiled binary (.zip for Windows, .tar.gz for macOS/Linux) directly from the Releases page.
If you installed via the quick install script or built the binary:
# Run with the default provider (Starbucks Japan)
kagongjok
# Run with an alternative provider
kagongjok 309If you prefer to run it using Go directly without installing:
go run . 309Depending on how you installed Kagongjok, use the matching uninstallation command:
If you installed via Option 1 (Quick Install script):
sudo rm /usr/local/bin/kagongjokIf you installed via Option 2 (go install):
rm $(go env GOPATH)/bin/kagongjokIf you downloaded the binary or built it from source manually, simply delete the kagongjok executable file.
starbucks(at_STARBUCKS_Wi2, used at Starbucks in Japan)309(Cafe 309)
The core logic is split between healthcheck and provider. To add a new Wi-Fi network:
- Create a new provider file in
internal/provider/(e.g.,mynetwork.go). - Implement the
Providerinterface:type Provider interface { Name() string Login(ctx context.Context, page *rod.Page) error }
- Use the
pageobject to automate the captive portal's login flow usinggo-rod. - Register your provider in
internal/provider/provider.goinsideGetProvider().