go-captive

(★ 27)

The world's simplest captive portal

File Explorer

  • .gitignore
  • allowed_proxy.go
  • go.mod
  • go.sum
  • LICENSE
  • portal.go
  • README.md

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

fmt

View Details ▼

Reformat a text file by joining its paragraphs and limiting the line width to a number of characters (75 by default).

fmt {{path/to/file}}

Reformat a file:

fmt {{[-w|--width]}} {{n}} {{path/to/file}}

Reformat a file producing output lines of (at most) `n` characters:

fmt {{[-s|--split-only]}} {{path/to/file}}

Reformat a file without joining lines shorter than the given width together:

🔍

hostapd

View Details ▼

Start an access point using a wireless interface.

sudo hostapd {{path/to/hostapd.conf}}

Start an access point:

sudo hostapd -B {{path/to/hostapd.conf}}

Start an access point, forking into the background:

🔍

create_ap

View Details ▼

Create an AP (Access Point) at any channel.

create_ap {{wlan0}} {{eth0}} {{access_point_ssid}}

Create an open network with no passphrase:

create_ap {{wlan0}} {{eth0}} {{access_point_ssid}} {{passphrase}}

Use a WPA + WPA2 passphrase:

create_ap -n {{wlan0}} {{access_point_ssid}} {{passphrase}}

Create an access point without Internet sharing:

🔍

iptables

View Details ▼

Configure tables, chains, and rules of the Linux kernel IPv4 firewall.
Use `ip6tables` to set rules for IPv6 traffic.
See also: `iptables-save`, `iptables-restore`.

sudo iptables {{[-vnL --line-numbers|--verbose --numeric --list --line-numbers]}}

View chains, rules, packet/byte counters, and line numbers for the filter table:

sudo iptables {{[-P|--policy]}} {{chain}} {{rule}}

Set chain policy rule:

sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip_address}} {{[-j|--jump]}} {{rule}}

Append rule to chain policy for IP:

🔍

sysctl

View Details ▼

List and change kernel runtime variables.

sysctl {{[-a|--all]}}

Show all available variables and their values:

sysctl -a

Show all available variables and their values:

sysctl {{[-w|--write]}} {{section.tunable}}={{value}}

Set a changeable kernel state variable:

// repository documentation