From 6a7af1c30fb9fa428bc373b1502bde144fdec766 Mon Sep 17 00:00:00 2001 From: mercury Date: Tue, 5 Mar 2024 00:14:36 +0400 Subject: [PATCH] fix import wg1 --- app/bot.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/bot.php b/app/bot.php index cb3a206..4eeb296 100644 --- a/app/bot.php +++ b/app/bot.php @@ -1061,6 +1061,9 @@ class Bot if ($this->getPacConf()['amnezia'] != $json['pac']['amnezia']) { $switch_amnezia = 1; } + if ($this->getPacConf()['wg1_amnezia'] != $json['pac']['wg1_amnezia']) { + $switch_wg1amnezia = 1; + } $this->setPacConf($json['pac']); $out[] = 'update naiveproxy'; $this->update($this->input['chat'], $this->input['message_id'], implode("\n", $out)); @@ -1082,7 +1085,7 @@ class Bot $this->update($this->input['chat'], $this->input['message_id'], implode("\n", $out)); $this->wg = 1; $this->saveClients($json['wg1']['clients']); - $this->restartWG($this->createConfig($json['wg1']['server']), $switch_amnezia); + $this->restartWG($this->createConfig($json['wg1']['server']), $switch_wg1amnezia); $this->iptablesWG(); } // ad