Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Add comment support #389

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions create_ap
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,9 @@ read_config() {
local opt_name opt_val line

while read line; do
# Skip comments and blank lines
[[ -z "${line}" || "${line:0:1}" == "#" ]] && continue

# Read switches and their values
opt_name="${line%%=*}"
opt_val="${line#*=}"
Expand Down
90 changes: 72 additions & 18 deletions create_ap.conf
Original file line number Diff line number Diff line change
@@ -1,28 +1,82 @@
CHANNEL=default
# Configuration file for create_ap (https://github.com/oblique/create_ap)

########## Access Point Information ##########

# Name of access point
SSID=MyAccessPoint
# Pre-shared key or passphrase of access point (see USE_PSK option)
PASSPHRASE=12345678
# Type of key in PASSPHRASE
# - Set to "0" if the content of PASSPHRASE is an 8..63 character long ASCII
# passphrase (i.e. what you type when you connect)
# - Set to "1" if the content of PASSPHRASE is a 256-bit secret in hex format
# (64 hex digits)
USE_PSK=0
# Set whether the access point should hide its SSID or not
HIDDEN=0

########## Sharing Options ##########

# The network interface where create_ap creates access point
WIFI_IFACE=wlan0
# The network interface to be shared
INTERNET_IFACE=eth0
# Method to share the network
# Available options: "nat", "bridge"
SHARE_METHOD=nat
# IP address of the gateway in NAT mode (the subnet is /24)
GATEWAY=10.0.0.1
# Set whether the connected clients can see each other or not
ISOLATE_CLIENTS=0

########## Wireless Options ##########

# The channel number on which the access point is served
# Set to "default" will set channel to 1 in 2.4Ghz band and 36 in 5GHz band
CHANNEL=default
# Wireless frequency (band)
# Available options: "2.4", "5"
FREQ_BAND=2.4
# Country code (ISO/IEC 3166-1) to set regulatory domain
COUNTRY=
# WPA version
# Available options: "1", "2", "1+2" (or "3")
WPA_VERSION=2
ETC_HOSTS=0
# Whether IEEE 802.11n (HT) is enabled
IEEE80211N=0
# Whether IEEE 802.11ac (VHT) is enabled
IEEE80211AC=0
# HT / VHT capabilities
# For all possible options please look at
# https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
HT_CAPAB=[HT40+]
VHT_CAPAB=

########## Network Options ##########

# DNS server to be pushed by DHCP server
# Set to "gateway" to use the gateway itself
DHCP_DNS=gateway
# Set to 1 to disable DNS
NO_DNS=0
# Set to 1 to disable dnsmasq completely (DHCP and DNS)
NO_DNSMASQ=0
HIDDEN=0
# Whether dnsmasq should use DNS servers provided in /etc/hosts or not
ETC_HOSTS=0
# Set to 1 to enable MAC address based authentication
MAC_FILTER=0
# Acceptance list for MAC address based authentication
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
ISOLATE_CLIENTS=0
SHARE_METHOD=nat
IEEE80211N=0
IEEE80211AC=0
HT_CAPAB=[HT40+]
VHT_CAPAB=
DRIVER=nl80211
NO_VIRT=0
COUNTRY=
FREQ_BAND=2.4
# New MAC address for the access point, leave it blank to keep it as-is
NEW_MACADDR=

########## Miscellaneous ##########

# Specify the driver to use
DRIVER=nl80211
# Set whether create_ap should run in the background
DAEMONIZE=0
# Set to 1 to disable virtual interface creation
NO_VIRT=0
# Set to 1 to disable haveged random number generation
NO_HAVEGED=0
WIFI_IFACE=wlan0
INTERNET_IFACE=eth0
SSID=MyAccessPoint
PASSPHRASE=12345678
USE_PSK=0