Compare commits

..

1 Commits

Author SHA1 Message Date
mercury 5e72452a8d improve template sign 2024-04-11 22:38:03 +04:00
2 changed files with 6 additions and 3 deletions
+4 -3
View File
@@ -3767,7 +3767,8 @@ DNS-over-HTTPS with IP:
public function userXr($i, $fs = 0, $fv = 0)
{
$c = $this->getXray();
$domain = $this->getPacConf()['domain'] ?: $this->ip;
$pac = $this->getPacConf() ?: $this->ip;
$domain = $pac['domain'] ?: $this->ip;
$scheme = empty($this->nginxGetTypeCert()) ? 'http' : 'https';
$hash = substr(md5($this->key), 0, 8);
$v2ray = "$scheme://{$domain}/pac?h=$hash&t=s&b=1&s={$c['inbounds'][0]['settings']['clients'][$i]['id']}";
@@ -3796,10 +3797,10 @@ DNS-over-HTTPS with IP:
'callback_data' => "/switchXr $i",
],
];
$template = $c['inbounds'][0]['settings']['clients'][$i]['template'] ? base64_decode($c['inbounds'][0]['settings']['clients'][$i]['template']) : 'default';
$template = $c['inbounds'][0]['settings']['clients'][$i]['template'] ? base64_decode($c['inbounds'][0]['settings']['clients'][$i]['template']) : 'default(' . ($pac['defaulttemplate'] ? base64_decode($pac['defaulttemplate']) : 'origin') . ')';
$data[] = [
[
'text' => $this->i18n('template') . ": $template",
'text' => $this->i18n('template singbox') . ": $template",
'callback_data' => "/templateUser $i",
],
];
+2
View File
@@ -1,3 +1,5 @@
11.04.2024 v1.25
- подпись дефолтного шаблона в разделе пользователя xtls
11.04.2024 v1.24
- обновлен раздел PAC, добавлена возможность добавить домены из https://community.antifilter.download/
11.04.2024 v1.23