update singbox
This commit is contained in:
+19
-12
@@ -517,14 +517,18 @@ class Bot
|
||||
{
|
||||
$c = $c ?: $this->getXray();
|
||||
$p = $this->getPacConf();
|
||||
$cl = array_filter($p['xrusers'], fn ($e) => empty($e['off']) && (empty($e['time']) || $e['time'] >= time()));
|
||||
if (!empty($p['xrusers'])) {
|
||||
$cl = array_filter($p['xrusers'], fn ($e) => empty($e['off']) && (empty($e['time']) || $e['time'] >= time()));
|
||||
}
|
||||
switch ($p['xtlsmode']) {
|
||||
case 'shadow':
|
||||
foreach ($cl as $v) {
|
||||
$t[] = [
|
||||
"name" => $v['name'],
|
||||
"password" => $v['uuid'],
|
||||
];
|
||||
if (!empty($cl)) {
|
||||
foreach ($cl as $v) {
|
||||
$t[] = [
|
||||
"name" => $v['name'],
|
||||
"password" => $v['uuid'],
|
||||
];
|
||||
}
|
||||
}
|
||||
$c['inbounds'] = [
|
||||
[
|
||||
@@ -564,12 +568,14 @@ class Bot
|
||||
break;
|
||||
|
||||
default:
|
||||
foreach ($cl as $v) {
|
||||
$t[] = [
|
||||
"uuid" => $v['uuid'],
|
||||
"flow" => 'xtls-rprx-vision',
|
||||
"name" => $v['name'],
|
||||
];
|
||||
if (!empty($cl)) {
|
||||
foreach ($cl as $v) {
|
||||
$t[] = [
|
||||
"uuid" => $v['uuid'],
|
||||
"flow" => 'xtls-rprx-vision',
|
||||
"name" => $v['name'],
|
||||
];
|
||||
}
|
||||
}
|
||||
$c['inbounds'] = [
|
||||
[
|
||||
@@ -4012,6 +4018,7 @@ DNS-over-HTTPS with IP:
|
||||
$pac = $this->getPacConf();
|
||||
if (!$this->ssh('pgrep sing-box', 'si') || empty($pac['xray']['private'])) {
|
||||
$this->generateSecretXray();
|
||||
$pac = $this->getPacConf();
|
||||
}
|
||||
$text[] = "Menu -> " . $this->i18n('xray');
|
||||
$text[] = "\nfake domain: <code>{$pac['xray']['domain']}</code>";
|
||||
|
||||
+1
-1
@@ -391,7 +391,7 @@ services:
|
||||
ipv4_address: 10.10.0.8
|
||||
logging: *default-logging
|
||||
si:
|
||||
image: mercurykd/vpnbot-sb:1.1
|
||||
image: mercurykd/vpnbot-sb:1.2
|
||||
build:
|
||||
dockerfile: dockerfile/singbox.dockerfile
|
||||
args:
|
||||
|
||||
@@ -2,8 +2,8 @@ ARG image
|
||||
FROM $image
|
||||
RUN apk add openssh openssl jq \
|
||||
&& mkdir /root/.ssh \
|
||||
&& wget https://github.com/SagerNet/sing-box/releases/download/v1.8.13/sing-box-1.8.13-linux-amd64.tar.gz \
|
||||
&& tar -xf sing-box-1.8.13-linux-amd64.tar.gz \
|
||||
&& mv sing-box-1.8.13-linux-amd64/sing-box /usr/bin \
|
||||
&& rm sing-box-1.8.13-linux-amd64.tar.gz \
|
||||
&& rm -rf /sing-box-1.8.13-linux-amd64
|
||||
&& wget https://github.com/SagerNet/sing-box/releases/download/v1.9.3/sing-box-1.9.3-linux-amd64.tar.gz \
|
||||
&& tar -xf sing-box-1.9.3-linux-amd64.tar.gz \
|
||||
&& mv sing-box-1.9.3-linux-amd64/sing-box /usr/bin \
|
||||
&& rm sing-box-1.9.3-linux-amd64.tar.gz \
|
||||
&& rm -rf /sing-box-1.9.3-linux-amd64
|
||||
|
||||
Reference in New Issue
Block a user