Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9da11e2b35 | |||
| 0b95c75005 | |||
| 62c4314beb |
+4
-2
@@ -2088,10 +2088,12 @@ class Bot
|
||||
public function adguardSync()
|
||||
{
|
||||
$pac = $this->getPacConf();
|
||||
$pac['adpswd'] = $pac['adpswd'] ?: substr(hash('md5', time()), 0, 10);
|
||||
$this->setPacConf($pac);
|
||||
$ssl = $this->nginxGetTypeCert();
|
||||
$c = yaml_parse_file($this->adguard);
|
||||
$this->stopAd();
|
||||
$c['users'][0]['password'] = $pac['adpswd'] ?: password_hash(substr(hash('md5', time()), 0, 10), PASSWORD_DEFAULT);
|
||||
$c['users'][0]['password'] = password_hash($pac['adpswd'], PASSWORD_DEFAULT);
|
||||
if (!empty($ssl) && !empty($pac['domain']) && empty($c['tls']['enabled'])) {
|
||||
$c['tls']['enabled'] = true;
|
||||
$c['tls']['server_name'] = $pac['domain'];
|
||||
@@ -5489,7 +5491,7 @@ DNS-over-HTTPS with IP:
|
||||
$text .= "DNS over HTTPS:\n<code>$ip</code>\n<code>$scheme://$domain/dns-query" . ($conf['adguardkey'] ? "/{$conf['adguardkey']}" : '') . "</code>\n\n";
|
||||
$text .= "DNS over TLS:\n<code>tls://" . ($conf['adguardkey'] ? "{$conf['adguardkey']}." : '') . "$domain</code>";
|
||||
}
|
||||
$status = $this->i18n(exec("JSON=1 dnslookup google.com ad") ? 'on' : 'off');
|
||||
$status = $this->i18n(exec("JSON=1 timeout 2 dnslookup google.com ad") ? 'on' : 'off');
|
||||
$safesearch = yaml_parse_file($this->adguard)['filtering']['safe_search']['enabled'];
|
||||
$text .= "\n\nstatus: $status\t\tsafesearch: " . $this->i18n($safesearch ? 'on' : 'off');
|
||||
$allowedClients = yaml_parse_file($this->adguard)['dns']['allowed_clients'];
|
||||
|
||||
+1
-11
@@ -10,17 +10,7 @@ apt install -y \
|
||||
iproute2 \
|
||||
xtables-addons-common \
|
||||
xtables-addons-dkms
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') \
|
||||
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt update
|
||||
apt install -y docker-ce docker-ce-cli containerd.io
|
||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||
mkdir -p $DOCKER_CONFIG/cli-plugins
|
||||
curl -SL https://github.com/docker/compose/releases/download/v2.29.6/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
|
||||
git clone https://github.com/mercurykd/vpnbot.git
|
||||
cd ./vpnbot
|
||||
echo "<?php
|
||||
|
||||
Reference in New Issue
Block a user