fix crash wireguard after restart

This commit is contained in:
mercury
2023-06-06 09:16:55 +04:00
parent 3d05059ecb
commit bf91511da6
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -2688,7 +2688,7 @@ DNS-over-HTTPS with IP:
public function createConfig($data)
{
$conf[] = "[Interface]";
if (empty($data['interface']['DNS'])) {
if (empty($data['interface']['ListenPort']) && empty($data['interface']['DNS'])) {
$data['interface']['DNS'] = $this->getPacConf()['dns'] ?: $this->dns;
}
foreach ($data['interface'] as $k => $v) {