summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-04-20 19:42:34 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-04-20 19:42:34 +0300
commit75ab5f751588bf8de41bf907089f4e8977463d3c (patch)
tree20349cf21db7a9a3956d428bfc5209bf5ef07976
parente38615c9c64e592cbea31f04bea726f5745648f7 (diff)
lws: routing fixes
-rw-r--r--localwebsite/classes/E3372.php9
-rw-r--r--localwebsite/classes/MyOpenWrtUtils.php2
-rw-r--r--misc/openwrt/setup-routing.sh8
3 files changed, 10 insertions, 9 deletions
diff --git a/localwebsite/classes/E3372.php b/localwebsite/classes/E3372.php
index 4c2f27a..a3ce80c 100644
--- a/localwebsite/classes/E3372.php
+++ b/localwebsite/classes/E3372.php
@@ -93,11 +93,10 @@ class E3372
const ERROR_WRONG_SESSION = 125002;
const ERROR_WRONG_SESSION_TOKEN = 125003;
-
- private $host;
- private $headers = [];
- private $authorized = false;
- private $useLegacyTokenAuth = false;
+ private string $host;
+ private array $headers = [];
+ private bool $authorized = false;
+ private bool $useLegacyTokenAuth = false;
public function __construct(string $host, bool $legacy_token_auth = false) {
$this->host = $host;
diff --git a/localwebsite/classes/MyOpenWrtUtils.php b/localwebsite/classes/MyOpenWrtUtils.php
index ea467db..6bdfec2 100644
--- a/localwebsite/classes/MyOpenWrtUtils.php
+++ b/localwebsite/classes/MyOpenWrtUtils.php
@@ -96,8 +96,6 @@ class MyOpenWrtUtils {
$url .= $arguments;
}
- // debugLog($url);
-
return $url;
}
diff --git a/misc/openwrt/setup-routing.sh b/misc/openwrt/setup-routing.sh
index 97af514..b384541 100644
--- a/misc/openwrt/setup-routing.sh
+++ b/misc/openwrt/setup-routing.sh
@@ -15,11 +15,15 @@ case "$1" in
;;
ipset-add)
- ipset add "$2" "$3"
+ addr="$3"
+ addr="${addr/_/\/}"
+ ipset add "$2" "$addr"
;;
ipset-del)
- ipset del "$2" "$3"
+ addr="$3"
+ addr="${addr/_/\/}"s
+ ipset del "$2" "$addr"
;;
# ipset_list)