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 need Go installed on your system.
# Clone the repository and install dependencies
go mod download
# Run with the default provider (Starbucks Japan)
go run .
# Run with an alternative provider
go run . -provider=309Note: You don't need to manually install Chrome or Chromium. The go-rod library automatically downloads a headless Chromium binary at runtime if one isn't found.
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().