From 63cd88b5fc95ed96ba05a502f4ff5e24df53cfaf Mon Sep 17 00:00:00 2001 From: garywill Date: Wed, 4 Oct 2023 11:43:35 +0800 Subject: [PATCH] version 0.7.0b --- README.md | 40 ++++++++++++++++++++++++++++++++-------- lnxrouter | 4 ++-- 2 files changed, 34 insertions(+), 10 deletions(-) mode change 100644 => 100755 lnxrouter diff --git a/README.md b/README.md index 9ce61c0..1dda442 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ It wraps `iptables`, `dnsmasq` etc. stuff. Use in one command, restore in one co [Linux-Router News & Developer Notes 📰](https://github.com/garywill/linux-router/issues/28) | [More tools and projects 🛠️](https://garywill.github.io) | [🍻 Buy me a coffee ❤️](https://github.com/garywill/receiving/blob/master/receiving_methods.md) -> [Read this readme in web doc reader](https://garywill.github.io/proj-doc/linux-router/) ( also available in 中文, Español, Русский язык ... ) ## Features @@ -369,7 +368,7 @@ Options: Using this you can't use same wlan interface for both Internet and AP --virt-name Set name of virtual interface - -c Channel number (default: 1) + -c Specify channel (default: use current one, or 1 / 36) --country Set two-letter country code for regularity (example: US) --freq-band Set frequency band: 2.4 or 5 (default: 2.4) @@ -383,13 +382,32 @@ Options: (defaults to /etc/hostapd/hostapd.accept) --hostapd-debug 1 or 2. Passes -d or -dd to hostapd --isolate-clients Disable wifi communication between clients - - --ieee80211n Enable IEEE 802.11n (HT) - --ieee80211ac Enable IEEE 802.11ac (VHT) - --ht_capab HT capabilities (default: [HT40+]) - --vht_capab VHT capabilities - --no-haveged Do not run haveged automatically when needed + --hs20 Enable Hotspot 2.0 (Make sure your hostapd build supports it) + + WiFi 4 (802.11n) configs: + --ieee80211n Enable IEEE 802.11n (HT) + --require-ht Require station HT (High Throughput) mode + --ht-capab HT capabilities (default: [HT40+]) + + WiFi 5 (802.11ac) configs: + --ieee80211ac Enable IEEE 802.11ac (VHT) + --require-vht Require station VHT (Very High Thoughtput) mode + --vht-capab VHT capabilities + + --vht-channel-width + Index of VHT channel width: + 0 for 20MHz or 40MHz (default) + 1 for 80MHz + 2 for 160MHz + 3 for 80+80MHz (Non-contigous 160MHz) + --vht-seg0-channel + Channel index of VHT center frequency for primary + segment, use with --vht-channel-width + --vht-seg1-channel + Channel index of VHT center frequency for secondary + (second 80MHz) segment, + use with '--vht-channel-width 3' . Instance managing: --daemon Run in background @@ -401,6 +419,12 @@ Options: --stop Stop a running instance For you can use PID or subnet interface name. You can get them with '--list-running' + + Notice 1: This script assume your host's default policy won't forward + packets, so the script won't explictly ban forwarding in any + mode. In some unexpected case (eg. mistaken configurations) may + cause unwanted packets leakage between 2 networks, which you + should be aware of if you want isolated network ``` diff --git a/lnxrouter b/lnxrouter old mode 100644 new mode 100755 index 84b0cc8..18a19c6 --- a/lnxrouter +++ b/lnxrouter @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=0.6.7 +VERSION=0.7.0b PROGNAME="$(basename $0)" export LC_ALL=C @@ -1558,7 +1558,7 @@ daemonizing_check(){ check_wifi_settings() { if ! ( which iw > /dev/null 2>&1 && iw dev $WIFI_IFACE info > /dev/null 2>&1 ); then - echo "WARN: Can't use 'iw' to operate interfce '$WIFI_IFACE', trying 'iwconfig' (not as good as 'iw') ..." >&2 + echo "WARN: Can't use 'iw' to operate interfce '$WIFI_IFACE', trying 'iwconfig' (not as good as 'iw') ... (Did you spell the interface name right?)" >&2 USE_IWCONFIG=1 fi