Compare commits

..

5 Commits

Author SHA1 Message Date
mercury 6631ea5cc2 update version 2024-05-04 13:00:06 +04:00
mercury 09d49fd0fb remove duplicate image 2024-05-04 12:36:32 +04:00
mercury 6766a56440 warp on alpine 2024-05-04 12:31:39 +04:00
mercury 4fb039ffc4 fix choice default template sing-box update 2 2024-05-01 18:35:45 +04:00
mercury 0b7ae110fc fix choice default template sing-box update 2024-05-01 18:24:22 +04:00
6 changed files with 35 additions and 19 deletions
+8 -7
View File
@@ -4126,6 +4126,7 @@ DNS-over-HTTPS with IP:
public function subscription()
{
$type = $_GET['t'] == 's' ? 'v2ray' : 'sing';
$pac = $this->getPacConf();
$domain = $pac['domain'] ?: $this->ip;
$xr = $this->getXray();
@@ -4138,7 +4139,7 @@ DNS-over-HTTPS with IP:
if (empty($v['off'])) {
$flag = false;
}
$template = base64_decode($_GET['t'] == 's' ? $v['v2raytemplate'] : $v['singtemplate']);
$template = base64_decode($v["{$type}template"]);
$uid = $v['id'];
break;
}
@@ -4181,19 +4182,19 @@ DNS-over-HTTPS with IP:
exit;
}
}
switch (true) {
case !empty($template) && $template == 'origin':
case empty($template) && empty($pac['default' . ($_GET['t'] == 's' ? 'v2ray' : 'sing') . 'template']):
case empty($template) && !empty($pac['default' . ($_GET['t'] == 's' ? 'v2ray' : 'sing') . 'template']) && empty($pac[($_GET['t'] == 's' ? 'v2ray' : 'sing') . 'templates'][$pac['default' . ($_GET['t'] == 's' ? 'v2ray' : 'sing') . 'template']]):
$c = json_decode(file_get_contents('/config/' . ($_GET['t'] == 's' ? 'v2ray' : 'sing') . '.json'), true);
case empty($template) && empty($pac["default{$type}template"]):
case empty($template) && empty($pac["{$type}templates"][base64_decode($pac["default{$type}template"])]):
case !empty($template) && empty($pac["{$type}templates"][$template]):
$c = json_decode(file_get_contents("/config/{$type}.json"), true);
break;
case !empty($template):
$c = $pac[$_GET['t'] == 's' ? 'v2raytemplates' : 'singtemplates'][$template];
$c = $pac["{$type}templates"][$template];
break;
default:
$c = $pac[$_GET['t'] == 's' ? 'v2raytemplates' : 'singtemplates'][base64_decode($pac['default' . ($_GET['t'] == 's' ? 'v2ray' : 'sing') . 'template'])];
$c = $pac["{$type}templates"][base64_decode($pac["default{$type}template"])];
break;
}
+8 -5
View File
@@ -19,7 +19,7 @@ volumes:
services:
up:
image: mercurykd/vpnbot-up:1.1
image: mercurykd/vpnbot-ng:1.1
build:
context: dockerfile
dockerfile: nginx.dockerfile
@@ -493,7 +493,7 @@ services:
ipv4_address: 10.10.0.12
logging: *default-logging
wp:
image: mercurykd/vpnbot-wp:1.1
image: mercurykd/vpnbot-wp:1.2
build:
dockerfile: dockerfile/warp.dockerfile
args:
@@ -503,7 +503,7 @@ services:
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ./config/.profile:/root/.bashrc:ro
- ./config/.profile:/root/.ashrc:ro
- ./ssh:/ssh
- ./config/sshd_config:/etc/ssh/sshd_config
- ./config:/config
@@ -514,8 +514,11 @@ services:
depends_on:
php:
condition: service_healthy
environment:
TZ: ${TZ}
env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s
command: ["/bin/sh", "/start_wp.sh"]
networks:
+13 -3
View File
@@ -1,6 +1,16 @@
FROM ubuntu:22.04
RUN apt update && apt install -y curl gpg socat jq lsb-release openssh-server \
FROM ubuntu:22.04 AS build
RUN apt update && apt install -y curl gpg lsb-release \
&& curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/cloudflare-client.list \
&& apt update && apt install -y cloudflare-warp \
&& apt update && apt install -y cloudflare-warp
FROM alpine:3.17
ARG GLIBC_VERSION=2.34-r0
COPY --from=build /usr/bin/warp-cli /usr/bin/warp-svc /usr/local/bin/
RUN apk add --no-cache dbus-libs wget socat openssh-server jq curl \
&& mkdir /tmp/glibc-pkgs \
&& for PKG in glibc-$GLIBC_VERSION.apk glibc-bin-$GLIBC_VERSION.apk; do wget -q --directory-prefix /tmp/glibc-pkgs https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/$PKG; done \
&& apk add --no-cache --allow-untrusted --force-overwrite /tmp/glibc-pkgs/* \
&& rm -rf /tmp/glibc-pkgs \
&& /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib \
&& mkdir /root/.ssh
+1 -1
View File
@@ -31,7 +31,7 @@ up: # консоль сервиса
ad: # консоль сервиса
docker compose exec ad /bin/sh
wp: # консоль сервиса
docker compose exec wp bash
docker compose exec wp /bin/sh
proxy: # консоль сервиса
docker compose exec proxy /bin/sh
tg: # консоль сервиса
+2 -3
View File
@@ -1,7 +1,6 @@
cat /ssh/key.pub > /root/.ssh/authorized_keys
echo 'HostKeyAlgorithms +ssh-rsa' >> /etc/ssh/sshd_config
echo 'PubkeyAcceptedKeyTypes +ssh-rsa' >> /etc/ssh/sshd_config
service ssh start
ssh-keygen -A
exec /usr/sbin/sshd -D -e "$@" &
warp-svc > /dev/null &
sleep 3
warp-cli --accept-tos registration new
+3
View File
@@ -1,3 +1,6 @@
04.05.2024 v1.37.1
- warp на образе alpine (thx @zmeyzloy)
- фикс выбора шаблона singbox
22.04.2024 v1.35
- очистка старых образов
19.04.2024 v1.34