A more secure, dedicated, Chrome-based captive portal browser that automatically bypasses custom DNS servers.
captive-browser detects the DHCP DNS server and runs a SOCKS5 proxy that resolves hostnames through it. Then it starts a Chrome instance in Incognito mode with a separate data directory and waits for it to exit.
This is a fork from captive-browser which was not updated to work with the latest go versions.
-
Download the tar file: Go to the GitHub releases page and download the appropriate
tar.gzfile for your operating system and architecture. -
Decompress the tar file: Use the following command to decompress the tar file:
tar -xzf captive-browser_<OS>_<ARCH>.tar.gz
-
Move the binary to a directory in your PATH:
sudo mv captive-browser /usr/local/bin/
-
Copy the configuration file: You have to install a config file in
$XDG_CONFIG_HOME/captive-browser.toml(if set) or~/.config/captive-browser.toml. You can probably use one of the stock config file from theconfig_examplesfolder and copy it to your configuration directory:cp config_examples/captive-browser-linux-networkmanager.toml ~/.config/captive-browser.tomlYou can also amend the config to use Chromium instead of Chrome (see
browservariable).
Replace <OS> and <ARCH> with your operating system and architecture.
cp config_examples/captive-browser-mac.toml ~/.config/captive-browser.toml
To disable the insecure system captive browser see here. If that doesn't work, disable SIP (remember to re-enable it), and rename /System/Library/CoreServices/Captive Network Assistant.app.
cp config_examples/captive-browser-linux-networkmanager.toml ~/.config/captive-browser.toml
cp config_examples/captive-browser-linux-systemd-networkd.toml ~/.config/captive-browser.toml
cp config_examples/captive-browser-linux-dhcpd.toml ~/.config/captive-browser.toml
Simply run captive-browser, log into the captive portal, and then quit (⌘Q / Ctrl-Q) the Chrome instance.