Merge 6a1c17b633
into 205814a2ea
This commit is contained in:
commit
5052e3695a
78
lnxrouter
78
lnxrouter
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=0.8.0-unstable2
|
||||
VERSION=0.8.0-unstable3
|
||||
PROGNAME="$(basename "$0")"
|
||||
|
||||
export LC_ALL=C
|
||||
|
@ -101,15 +101,16 @@ Options:
|
|||
(defaults to /etc/hostapd/hostapd.accept)
|
||||
--hostapd-debug <level> 1 or 2. Passes -d or -dd to hostapd
|
||||
--isolate-clients Disable wifi communication between clients
|
||||
--idle-timeout <time> Idle timeout (in seconds) to disconnect a client device
|
||||
--no-haveged Do not run haveged automatically when needed
|
||||
--hs20 Enable Hotspot 2.0
|
||||
--hs20 (ß) Enable Hotspot 2.0
|
||||
|
||||
WiFi 4 (802.11n) configs:
|
||||
WiFi 4 (802.11n) configs:
|
||||
--wifi4 Enable IEEE 802.11n (HT)
|
||||
--req-ht Require station HT (High Throughput) mode
|
||||
--ht-capab <HT caps> HT capabilities (default: [HT40+])
|
||||
|
||||
WiFi 5 (802.11ac) configs:
|
||||
WiFi 5 (802.11ac) configs:
|
||||
--wifi5 Enable IEEE 802.11ac (VHT)
|
||||
--req-vht Require station VHT (Very High Thoughtput) mode
|
||||
--vht-capab <VHT caps> VHT capabilities
|
||||
|
@ -124,8 +125,8 @@ Options:
|
|||
--vht-seg1-ch <channel> Channel index of VHT center frequency for secondary
|
||||
(second 80MHz) segment. Use with '--vht-ch-width 3'
|
||||
|
||||
WiFi 6 (802.11ax) configs:
|
||||
--wifi6 Enable IEEE 802.11ax (HE)
|
||||
WiFi 6 (802.11ax) configs:
|
||||
--wifi6 (ß) Enable IEEE 802.11ax (HE)
|
||||
--req-he Require station HE (High Efficiency) mode
|
||||
|
||||
--he-ch-width <index> Index of HE channel width:
|
||||
|
@ -137,6 +138,13 @@ Options:
|
|||
segment. Use with '--he-ch-width'
|
||||
--he-seg1-ch <channel> Channel index of HE center frequency for secondary
|
||||
(second 80MHz) segment. Use with '--he-ch-width 3'
|
||||
--he-su-bfe (beta) Enable HE Single User Beamformee support
|
||||
--he-su-bfr (beta) Enable HE Single User Beamformer support
|
||||
--he-mu-bfr (beta) Enable HE Multi User Beamformer support
|
||||
--enable-twt (beta) (ß) Enable Peer to Peer Target Wake Time support
|
||||
|
||||
(ß): Requires hostapd built with specific build flags enabled
|
||||
|
||||
|
||||
Instance managing:
|
||||
--daemon Run in background
|
||||
|
@ -209,6 +217,7 @@ define_global_variables(){
|
|||
WPA_VERSION=2
|
||||
MAC_FILTER=0
|
||||
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
|
||||
IDLETIMEOUT=300
|
||||
IEEE80211N=0
|
||||
REQUIREHT=0
|
||||
IEEE80211AC=0
|
||||
|
@ -223,6 +232,10 @@ define_global_variables(){
|
|||
HECHANNELWIDTH=0
|
||||
HESEG0CHINDEX=0
|
||||
HESEG1CHINDEX=0
|
||||
HESUBFE=0
|
||||
HESUBFR=0
|
||||
HEMUBFR=0
|
||||
HEP2PTWT=0
|
||||
DRIVER=nl80211
|
||||
NO_VIRT=0 # not use virtual interface
|
||||
COUNTRY=
|
||||
|
@ -291,8 +304,6 @@ parse_user_options(){
|
|||
SHARE_METHOD=redsocks
|
||||
shift
|
||||
;;
|
||||
|
||||
|
||||
-g)
|
||||
shift
|
||||
GATEWAY4="$1"
|
||||
|
@ -321,7 +332,6 @@ parse_user_options(){
|
|||
shift
|
||||
MAC_USE_RANDOM=1
|
||||
;;
|
||||
|
||||
--dns)
|
||||
shift
|
||||
DNS="$1"
|
||||
|
@ -371,12 +381,10 @@ parse_user_options(){
|
|||
shift
|
||||
DNS_NOCACHE=1
|
||||
;;
|
||||
|
||||
--isolate-clients)
|
||||
shift
|
||||
ISOLATE_CLIENTS=1
|
||||
;;
|
||||
|
||||
--ap)
|
||||
shift
|
||||
WIFI_IFACE="$1"
|
||||
|
@ -393,8 +401,6 @@ parse_user_options(){
|
|||
shift
|
||||
QR=1
|
||||
;;
|
||||
|
||||
|
||||
--hidden)
|
||||
shift
|
||||
HIDDEN=1
|
||||
|
@ -408,7 +414,6 @@ parse_user_options(){
|
|||
MAC_FILTER_ACCEPT="$1"
|
||||
shift
|
||||
;;
|
||||
|
||||
-c)
|
||||
shift
|
||||
CHANNEL="$1"
|
||||
|
@ -424,7 +429,11 @@ parse_user_options(){
|
|||
[[ "$WPA_VERSION" == "2+1" ]] && WPA_VERSION=1+2
|
||||
shift
|
||||
;;
|
||||
|
||||
--idle-timeout)
|
||||
shift
|
||||
IDLETIMEOUT="$1"
|
||||
shift
|
||||
;;
|
||||
--wifi4|--ieee80211n)
|
||||
shift
|
||||
IEEE80211N=1
|
||||
|
@ -489,6 +498,22 @@ parse_user_options(){
|
|||
HESEG1CHINDEX="$1"
|
||||
shift
|
||||
;;
|
||||
--he-su-bfe)
|
||||
shift
|
||||
HESUBFE=1
|
||||
;;
|
||||
--he-su-bfr)
|
||||
shift
|
||||
HESUBFR=1
|
||||
;;
|
||||
--he-mu-bfr)
|
||||
shift
|
||||
HEMUBFR=1
|
||||
;;
|
||||
--enable-twt)
|
||||
shift
|
||||
HEP2PTWT=1
|
||||
;;
|
||||
--driver)
|
||||
shift
|
||||
DRIVER="$1"
|
||||
|
@ -503,7 +528,6 @@ parse_user_options(){
|
|||
VIRT_NAME="$1"
|
||||
shift
|
||||
;;
|
||||
|
||||
--country)
|
||||
shift
|
||||
COUNTRY="$1"
|
||||
|
@ -534,7 +558,6 @@ parse_user_options(){
|
|||
shift
|
||||
USE_PSK=1
|
||||
;;
|
||||
|
||||
--daemon)
|
||||
shift
|
||||
DAEMONIZE=1
|
||||
|
@ -557,7 +580,6 @@ parse_user_options(){
|
|||
shift
|
||||
KEEP_CONFDIR=1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid parameter: $1" 1>&2
|
||||
exit 1
|
||||
|
@ -778,7 +800,7 @@ show_interface_pci_info() { # pci id / model / virtual
|
|||
[[ -n "$driver" ]] && echo "System-already-loaded driver: $driver"
|
||||
[[ -n "$device_fullname" ]] && echo "$device_fullname"
|
||||
echo ""
|
||||
# TODO usb
|
||||
# TODO Fix pci and usb devices
|
||||
}
|
||||
|
||||
alloc_new_vface_name() { # only for wifi
|
||||
|
@ -1998,6 +2020,10 @@ write_hostapd_conf() {
|
|||
echo "ieee80211ac=1" >> "$CONFDIR/hostapd.conf"
|
||||
fi
|
||||
|
||||
if [[ $IDLETIMEOUT -ne 300 ]]; then
|
||||
echo "ap_max_inactivity=${IDLETIMEOUT}" >> "$CONFDIR/hostapd.conf"
|
||||
fi
|
||||
|
||||
if [[ $REQUIREVHT -eq 1 ]]; then
|
||||
echo "require_vht=1" >> "$CONFDIR/hostapd.conf"
|
||||
fi
|
||||
|
@ -2010,7 +2036,21 @@ write_hostapd_conf() {
|
|||
echo "require_he=1" >> "$CONFDIR/hostapd.conf"
|
||||
fi
|
||||
|
||||
if [[ $HESUBFE -eq 1 ]]; then
|
||||
echo "he_su_beamformee=1" >> "$CONFDIR/hostapd.conf"
|
||||
fi
|
||||
|
||||
if [[ $HESUBFR -eq 1 ]]; then
|
||||
echo "he_su_beamformer=1" >> "$CONFDIR/hostapd.conf"
|
||||
fi
|
||||
|
||||
if [[ $HEMUBFR -eq 1 ]]; then
|
||||
echo "he_mu_beamformer=1" >> "$CONFDIR/hostapd.conf"
|
||||
fi
|
||||
|
||||
if [[ $HEP2PTWT -eq 1 ]]; then
|
||||
echo "peer_to_peer_twt=1" >> "$CONFDIR/hostapd.conf"
|
||||
fi
|
||||
|
||||
if [[ -n "$VHT_CAPAB" ]]; then
|
||||
echo "vht_capab=${VHT_CAPAB}" >> "$CONFDIR/hostapd.conf"
|
||||
|
|
Loading…
Reference in New Issue