go-captive
The world's simplest captive portal
File Explorer
- dependabot.yml
- FUNDING.yml
- .gitignore
- allowed_proxy.go
- go.mod
- go.sum
- LICENSE
- portal.go
- README.md
# Use via CDN
jsDelivrjsDelivr 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 ▼
fmt
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 ▼
hostapd
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_ap
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 ▼
iptables
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 ▼
sysctl
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:
