Skip to content
 
 

Repository files navigation

captive-browser

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.

Installation

  1. Download the tar file: Go to the GitHub releases page and download the appropriate tar.gz file for your operating system and architecture.

  2. Decompress the tar file: Use the following command to decompress the tar file:

    tar -xzf captive-browser_<OS>_<ARCH>.tar.gz
  3. Move the binary to a directory in your PATH:

    sudo mv captive-browser /usr/local/bin/
  4. 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 the config_examples folder and copy it to your configuration directory:

    cp config_examples/captive-browser-linux-networkmanager.toml ~/.config/captive-browser.toml

    You can also amend the config to use Chromium instead of Chrome (see browser variable).

Replace <OS> and <ARCH> with your operating system and architecture.

macOS

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.

Linux

Linux with NetworkManager (Ubuntu)

cp config_examples/captive-browser-linux-networkmanager.toml ~/.config/captive-browser.toml

Linux with systemd-networkd

cp config_examples/captive-browser-linux-systemd-networkd.toml ~/.config/captive-browser.toml

Linux with dhcpcd

cp config_examples/captive-browser-linux-dhcpd.toml ~/.config/captive-browser.toml

Usage

Simply run captive-browser, log into the captive portal, and then quit (⌘Q / Ctrl-Q) the Chrome instance.

About

A dedicated Chrome instance to log into captive portals without messing with DNS settings.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages