mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/docker-easyconnect/docker-easyconnect.git
synced 2026-09-20 08:03:33 +08:00
Add aTrust support (#198)
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,6 +1,6 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ARG ANDROID_PATCH BUILD_ENV=local MIRROR_URL=http://ftp.cn.debian.org/debian/ EC_HOST VPN_TYPE=EC_GUI
|
||||
ARG ANDROID_PATCH MIRROR_URL=http://ftp.cn.debian.org/debian/ EC_HOST VPN_TYPE=EC_GUI
|
||||
|
||||
COPY ["./build-scripts/config-apt.sh", "./build-scripts/get-echost-names.sh", "./build-scripts/add-qemu.sh", \
|
||||
"/tmp/build-scripts/"]
|
||||
@@ -9,11 +9,17 @@ RUN . /tmp/build-scripts/config-apt.sh && \
|
||||
. /tmp/build-scripts/get-echost-names.sh && \
|
||||
. /tmp/build-scripts/add-qemu.sh && \
|
||||
apt-get update && \
|
||||
if [ "ATRUST" = "$VPN_TYPE" ]; then \
|
||||
extra_pkgs="libssl1.1 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libqt5x11extras5 \
|
||||
libqt5core5a libqt5network5 libqt5widgets5 libldap-2.4-2"; \
|
||||
else \
|
||||
extra_pkgs="libgtk2.0-0 libdbus-glib-1-2 libgconf-2-4"; \
|
||||
fi && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
libgtk2.0-0 libx11-xcb1 libxtst6 libnss3 libasound2 libdbus-glib-1-2 iptables xclip\
|
||||
libx11-xcb1 libnss3 libasound2 iptables xclip libxtst6 \
|
||||
dante-server tigervnc-standalone-server tigervnc-tools psmisc flwm x11-utils \
|
||||
busybox libssl-dev iproute2 tinyproxy-bin libxss1 libgconf-2-4 ca-certificates \
|
||||
fonts-wqy-microhei $qemu_pkgs socat && \
|
||||
busybox libssl-dev iproute2 tinyproxy-bin libxss1 ca-certificates \
|
||||
fonts-wqy-microhei socat $qemu_pkgs $extra_pkgs && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd -r socks && useradd -r -g socks socks
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ARG ANDROID_PATCH BUILD_ENV=local MIRROR_URL=http://ftp.cn.debian.org/debian/ EC_HOST VPN_TYPE=EC_GUI
|
||||
ARG ANDROID_PATCH MIRROR_URL=http://ftp.cn.debian.org/debian/ EC_HOST VPN_TYPE=EC_GUI
|
||||
|
||||
COPY ["./build-scripts/config-apt.sh", "./build-scripts/get-echost-names.sh", "./build-scripts/add-qemu.sh", \
|
||||
"/tmp/build-scripts/"]
|
||||
@@ -9,10 +9,16 @@ RUN . /tmp/build-scripts/config-apt.sh && \
|
||||
. /tmp/build-scripts/get-echost-names.sh && \
|
||||
. /tmp/build-scripts/add-qemu.sh && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests $qemu_pkgs ca-certificates \
|
||||
libgtk2.0-0 libx11-xcb1 libxtst6 libnss3 libasound2 libdbus-glib-1-2 iptables fonts-wqy-microhei \
|
||||
dante-server psmisc libxaw7 xclip busybox libssl-dev iproute2 tinyproxy-bin libxss1 libgconf-2-4 \
|
||||
socat && \
|
||||
if [ "ATRUST" = "$VPN_TYPE" ]; then \
|
||||
extra_pkgs="libssl1.1 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libqt5x11extras5 \
|
||||
libqt5core5a libqt5network5 libqt5widgets5 libldap-2.4-2"; \
|
||||
else \
|
||||
extra_pkgs="libgtk2.0-0 libdbus-glib-1-2 libgconf-2-4"; \
|
||||
fi && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests $qemu_pkgs $extra_pkgs \
|
||||
ca-certificates libx11-xcb1 libnss3 libasound2 iptables fonts-wqy-microhei \
|
||||
dante-server psmisc libxaw7 xclip busybox libssl-dev iproute2 tinyproxy-bin libxss1 \
|
||||
socat libxtst6 && \
|
||||
cd /tmp && apt-get download x11-utils && dpkg -x x11-utils_*.deb x11-utils && \
|
||||
mkdir -p /usr/local/bin && cp x11-utils/usr/bin/xmessage /usr/local/bin && rm -r x11-utils* && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
1
build-args/atrust-2.2.16-amd64.txt
Normal file
1
build-args/atrust-2.2.16-amd64.txt
Normal file
@@ -0,0 +1 @@
|
||||
--build-arg VPN_URL=https://download.sangfor.com.cn/download/product/atrust/2.2.16/uos/aTrustInstaller_amd64.zip --build-arg VPN_DEB_PATH=aTrustInstaller_amd64.deb --build-arg VPN_TYPE=ATRUST
|
||||
1
build-args/atrust-2.2.16-arm64.txt
Normal file
1
build-args/atrust-2.2.16-arm64.txt
Normal file
@@ -0,0 +1 @@
|
||||
--build-arg VPN_URL=https://download.sangfor.com.cn/download/product/atrust/2.2.16/uos/aTrustInstaller_arm64.zip --build-arg VPN_DEB_PATH=aTrustInstaller_arm64.deb --build-arg VPN_TYPE=ATRUST
|
||||
1
build-args/atrust-2.2.16-mips64le.txt
Normal file
1
build-args/atrust-2.2.16-mips64le.txt
Normal file
@@ -0,0 +1 @@
|
||||
--build-arg VPN_URL=https://download.sangfor.com.cn/download/product/atrust/2.2.16/uos/aTrustInstaller_mips64el.zip --build-arg VPN_DEB_PATH=aTrustInstaller_mips64el.deb --build-arg VPN_TYPE=ATRUST
|
||||
1
build-args/atrust-amd64.txt
Symbolic link
1
build-args/atrust-amd64.txt
Symbolic link
@@ -0,0 +1 @@
|
||||
atrust-2.2.16-amd64.txt
|
||||
1
build-args/atrust-arm64.txt
Symbolic link
1
build-args/atrust-arm64.txt
Symbolic link
@@ -0,0 +1 @@
|
||||
atrust-2.2.16-arm64.txt
|
||||
1
build-args/atrust-mips64le.txt
Symbolic link
1
build-args/atrust-mips64le.txt
Symbolic link
@@ -0,0 +1 @@
|
||||
atrust-2.2.16-mips64le.txt
|
||||
@@ -1,14 +1,12 @@
|
||||
#!/bin/sh
|
||||
. /etc/os-release &&
|
||||
if [ -n "${ANDROID_PATCH}" ]; then
|
||||
groupadd -g 3003 inet && usermod -a -G inet root && usermod -g inet -ou 0 daemon && usermod -g inet -ou 0 _apt
|
||||
fi &&
|
||||
if [ "${BUILD_ENV}" = "local" ]; then
|
||||
if [ -n "$MIRROR_URL" ]; then
|
||||
origin="$(cat /etc/apt/sources.list)"
|
||||
default_mirror=http://deb.debian.org/debian
|
||||
replaced="$(origin=$origin default_mirror=$default_mirror bash -c 'echo "${origin//$default_mirror /$MIRROR_URL }"')"
|
||||
printf %s "$replaced" > /etc/apt/sources.list
|
||||
fi
|
||||
else
|
||||
echo "Warning: The BUILD_ENV build argument has been deprecated and will be removed. Please use MIRROR_URL instead." >&2
|
||||
fi
|
||||
echo "
|
||||
deb $MIRROR_URL $VERSION_CODENAME main
|
||||
deb http://deb.debian.org/debian-security $VERSION_CODENAME-security main
|
||||
deb $MIRROR_URL bullseye main
|
||||
deb http://deb.debian.org/debian-security bullseye-security main
|
||||
" > /etc/apt/sources.list &&
|
||||
rm -rf /etc/apt/sources.list.d
|
||||
|
||||
35
docker-root/usr/bin/loginctl
Executable file
35
docker-root/usr/bin/loginctl
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
if [ ! -e /home/sangfor ]; then
|
||||
useradd sangfor --home-dir /home/sangfor --uid 1234 -m
|
||||
fi
|
||||
if [ "$*" = "--no-legend list-sessions" ]; then
|
||||
echo 10644 1234 sangfor seat0
|
||||
exit 0
|
||||
fi
|
||||
if [ "$1" = show-session ]; then
|
||||
echo "Id=10644
|
||||
User=1234
|
||||
Name=sangfor
|
||||
Timestamp=Mon 2023-03-06 14:52:44 CST
|
||||
TimestampMonotonic=1097012996679
|
||||
VTNr=7
|
||||
Seat=seat0
|
||||
Display=:1
|
||||
Remote=no
|
||||
Service=sddm
|
||||
Desktop=KDE
|
||||
Scope=session-10644.scope
|
||||
Leader=2268286
|
||||
Audit=10644
|
||||
Type=x11
|
||||
Class=user
|
||||
Active=yes
|
||||
State=active
|
||||
IdleHint=no
|
||||
IdleSinceHint=0
|
||||
IdleSinceHintMonotonic=0
|
||||
LockedHint=no"
|
||||
exit 0
|
||||
fi
|
||||
exit 1
|
||||
|
||||
@@ -59,6 +59,22 @@ case "$_VPN_TYPE" in
|
||||
}'
|
||||
fi
|
||||
;;
|
||||
ATRUST )
|
||||
echo '
|
||||
VPN_ROOT=$SANGFOR_ROOT/aTrust
|
||||
VPN_RESOURCES=$VPN_ROOT/resources
|
||||
VPN_BIN=$VPN_RESOURCES/bin
|
||||
VPN_CONF=$VPN_RESOURCES/conf
|
||||
VPN_UI=$VPN_ROOT/aTrustTray
|
||||
VPN_TUN=utun7
|
||||
FORCE_OPEN_PORTS=54631
|
||||
vpn_daemon() {
|
||||
fake-hwaddr-run $VPN_BIN/aTrustAgent --plugin plugin-daemon --plugin-cmd \| >/dev/null &
|
||||
}
|
||||
vpn_ui() {
|
||||
$VPN_UI --no-sandbox
|
||||
}'
|
||||
;;
|
||||
* )
|
||||
echo "ERROR: Unknown _VPN_TYPE: $_VPN_TYPE" >&2
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user