MCPcopy Create free account
hub / github.com/FiloSottile/captive-browser

github.com/FiloSottile/captive-browser @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
9 symbols 19 edges 4 files 0 documented · 0% updated 3y ago★ 48212 open issues

Browse by type

Functions 7 Types & classes 2
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.

Read more on my blog.

Installation

You'll need Chrome and Go 1.9 or newer.

go get -u github.com/FiloSottile/captive-browser

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 ones below. You might have to modify the network interface.

macOS

cp $(go env GOPATH)/src/github.com/FiloSottile/captive-browser/captive-browser-mac-chrome.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.

Ubuntu

cp $(go env GOPATH)/src/github.com/FiloSottile/captive-browser/captive-browser-ubuntu-chrome.toml ~/.config/captive-browser.toml

Arch / systemd-networkd

go get -u github.com/FiloSottile/captive-browser/cmd/systemd-networkd-dns
cp $(go env GOPATH)/src/github.com/FiloSottile/captive-browser/captive-browser-arch-chrome.toml ~/.config/captive-browser.toml

Arch / dhcpcd

cp $(go env GOPATH)/src/github.com/FiloSottile/captive-browser/captive-browser-dhcpcd-chromium.toml ~/.config/captive-browser.toml

Usage

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

If the binary is not found, try $(go env GOPATH)/bin/captive-browser.

To configure the browser, open a non-Incognito window (⌘N / Ctrl-N).

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 6
Struct 2
Method 1

Languages

Go100%

Modules by API surface

main.go5 symbols
cmd/systemd-networkd-dns/main.go2 symbols
bind_device_other.go1 symbols
bind_device_linux.go1 symbols

For agents

$ claude mcp add captive-browser \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page