From d81f383aa1ef95f628e856aa658dbd3a74701b6d Mon Sep 17 00:00:00 2001 From: SkyperTHC Date: Thu, 21 Sep 2023 23:12:29 +0100 Subject: [PATCH] p3 --- ChangeLog | 6 ++++++ Makefile | 7 ++++--- {sfbin => config/etc}/loginmsg-all.sh-example | 1 + {sfbin => config/etc}/loginmsg-new.sh-example | 1 + config/etc/logoutmsg-all.sh-example | 6 ++++++ config/etc/redis/redis.conf | 0 contrib/cronjob | 3 ++- guest/Dockerfile | 4 +++- host/fs-root/bin/docker_sshd.sh | 3 ++- host/fs-root/bin/segfaultsh | 6 ++++-- 10 files changed, 29 insertions(+), 8 deletions(-) rename {sfbin => config/etc}/loginmsg-all.sh-example (90%) rename {sfbin => config/etc}/loginmsg-new.sh-example (88%) create mode 100755 config/etc/logoutmsg-all.sh-example mode change 100755 => 100644 config/etc/redis/redis.conf diff --git a/ChangeLog b/ChangeLog index d49dc94..e6fb89c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +0.4.9p3 - 2023-09-20 + * Helix (hx) + +0.4.9p2 - 2023-09-18 + * xpra-x11 is back. + 0.4.9p1 - 2023-09-18 * ssh -R fix in serverloop.c * a2enmod for php8.2 (thanks matthew) diff --git a/Makefile b/Makefile index 4f405a3..fe40254 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VER := 0.4.9p1 +VER := 0.4.9p3 all: make -C router @@ -134,6 +134,9 @@ FILES_CONFIG += "segfault-$(VER)/config/etc/sf/sf.conf" FILES_CONFIG += "segfault-$(VER)/config/etc/redis/redis.conf" FILES_CONFIG += "segfault-$(VER)/config/etc/sf/WARNING---SHARED-BETWEEN-ALL-SERVERS---README.txt" FILES_CONFIG += "segfault-$(VER)/config/etc/resolv.conf" +FILES_CONFIG += "segfault-$(VER)/config/etc/loginmsg-new.sh-example" +FILES_CONFIG += "segfault-$(VER)/config/etc/loginmsg-all.sh-example" +FILES_CONFIG += "segfault-$(VER)/config/etc/logoutmsg-all.sh-example" FILES_ROOT += "segfault-$(VER)/Makefile" FILES_ROOT += "segfault-$(VER)/ChangeLog" @@ -146,8 +149,6 @@ FILES_ROOT += "segfault-$(VER)/sfbin/funcs_redis.sh" FILES_ROOT += "segfault-$(VER)/sfbin/funcs_admin.sh" FILES_ROOT += "segfault-$(VER)/sfbin/funcs_net.sh" FILES_ROOT += "segfault-$(VER)/sfbin/sf" -FILES_ROOT += "segfault-$(VER)/sfbin/loginmsg-new.sh-example" -FILES_ROOT += "segfault-$(VER)/sfbin/loginmsg-all.sh-example" FILES_CLEANER += "segfault-$(VER)/tools/cg/Dockerfile" FILES_CLEANER += "segfault-$(VER)/tools/cg/go.mod" diff --git a/sfbin/loginmsg-all.sh-example b/config/etc/loginmsg-all.sh-example similarity index 90% rename from sfbin/loginmsg-all.sh-example rename to config/etc/loginmsg-all.sh-example index 8c7764e..75c2236 100755 --- a/sfbin/loginmsg-all.sh-example +++ b/config/etc/loginmsg-all.sh-example @@ -1,5 +1,6 @@ #! /bin/bash +# Location: config/etc # Rename this file to loginmsg-all.sh and it will get sourced during login process for _all_ users. echo -en "Hello $SF_HOSTNAME. This server is currently not available. Please come back another time." diff --git a/sfbin/loginmsg-new.sh-example b/config/etc/loginmsg-new.sh-example similarity index 88% rename from sfbin/loginmsg-new.sh-example rename to config/etc/loginmsg-new.sh-example index 7f488e6..f3e833a 100755 --- a/sfbin/loginmsg-new.sh-example +++ b/config/etc/loginmsg-new.sh-example @@ -1,5 +1,6 @@ #! /bin/bash +# Location: config/etc # Rename this file to loginmsg-new.sh and it will get sourced during login process for new root servers. echo -en "Creating new servers is currently not avaialble." diff --git a/config/etc/logoutmsg-all.sh-example b/config/etc/logoutmsg-all.sh-example new file mode 100755 index 0000000..e790de6 --- /dev/null +++ b/config/etc/logoutmsg-all.sh-example @@ -0,0 +1,6 @@ +#! /bin/bash + +# Location: config/etc +# Rename this file to logoutmsg-all.sh and it will get sourced during logout before RTFM/GOODBYE +echo -e "SPONSOR : ${CY}${CUL}${CN} <-- We host there." + diff --git a/config/etc/redis/redis.conf b/config/etc/redis/redis.conf old mode 100755 new mode 100644 diff --git a/contrib/cronjob b/contrib/cronjob index e03df31..5c4e1d4 100755 --- a/contrib/cronjob +++ b/contrib/cronjob @@ -1,6 +1,8 @@ #! /usr/bin/env bash # Run regular maintenance jobs in host's crontab after 'sf up' has been started +# PHY: crontab -l | grep -v cronjob | echo "15 0 * * sun /sf/sfbin/cronjob all >/dev/shm/sf/run/logs/cronjob.out" | crontab - + SF_MV_EXIT_FN="/sf/data/share/relay-exit-nodes-mullvad.txt" SF_MV_RELAY_FN="/sf/data/share/proxies.txt" @@ -14,7 +16,6 @@ mk_mullvad_relays() { local IFS local str - local fn local arr local ip local ips diff --git a/guest/Dockerfile b/guest/Dockerfile index c16cfb1..8cdc5e5 100644 --- a/guest/Dockerfile +++ b/guest/Dockerfile @@ -432,7 +432,7 @@ RUN /pkg-install.sh GUI bash -c '{ : \ && wget -O "/usr/share/keyrings/xpra.asc" https://xpra.org/xpra-2023.asc \ && wget -O "/etc/apt/sources.list.d/xpra.sources" https://raw.githubusercontent.com/Xpra-org/xpra/master/packaging/repos/bookworm/xpra.sources \ && apt-get update \ - && pkg=("xpra" "xpra-html5") \ + && pkg=("xpra" "xpra-x11" "xpra-html5") \ && apt-get install -y --no-install-recommends "${pkg[@]}" \ && rm -f /var/lib/apt/lists/xpra*; }' ### x86_64 only @@ -544,6 +544,7 @@ RUN /pkg-install.sh DEVEL pip install --break-system-packages \ mmh3 `# FavFreak` \ pyTelegramBotAPI \ tgcrypto \ + uploadserver \ wsgidav RUN /pkg-install.sh LARGE pipx install gdown \ && /pkg-install.sh LARGE pipx install udocker @@ -769,6 +770,7 @@ RUN /pkg-install.sh HACK bash -c '{ wget -O "/usr/bin/favfreak.py" https://raw. && wget -O /usr/share/wordlists/meg/openredirects "https://raw.githubusercontent.com/tomnomnom/meg/master/lists/openredirects" \ && wget -O /usr/share/wordlists/meg/configfiles "https://raw.githubusercontent.com/tomnomnom/meg/master/lists/configfiles" \ && wget -O /usr/share/wordlists/meg/crlfinjection "https://raw.githubusercontent.com/tomnomnom/meg/master/lists/crlfinjection"; }' +RUN /pkg-install.sh DEV ghbin helix-editor/helix '-%arch%-linux.tar.xz' hx RUN sed 's/deb-src.*//' -i /etc/apt/sources.list \ && apt-get autoremove -y \ && apt-get update diff --git a/host/fs-root/bin/docker_sshd.sh b/host/fs-root/bin/docker_sshd.sh index 62b5fcc..5e3bc38 100755 --- a/host/fs-root/bin/docker_sshd.sh +++ b/host/fs-root/bin/docker_sshd.sh @@ -174,9 +174,10 @@ done # LXCFS creates different directories depending on the version. [[ -d /var/lib/lxcfs/proc ]] && { unset str - for fn in $(cd /var/lib/lxcfs; find proc -type f 2>/dev/null; find sys -type f 2>/dev/null); do + for fn in $(cd /var/lib/lxcfs; find proc -type f 2>/dev/null); do str+="'-v' '/var/lib/lxcfs/${fn}:/$fn:ro' " done + [[ -d /var/lib/lxcfs/sys/devices/system/cpu ]] && str+="'-v' '/var/lib/lxcfs/sys/devices/system/cpu:/sys/devices/system/cpu:ro'" LXCFS_STR=$str } diff --git a/host/fs-root/bin/segfaultsh b/host/fs-root/bin/segfaultsh index 282e4de..f09ba47 100755 --- a/host/fs-root/bin/segfaultsh +++ b/host/fs-root/bin/segfaultsh @@ -455,6 +455,8 @@ ${CDY}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ } + sysmsg "/config/host/etc/logoutmsg-all.sh" + echo -e "\ RTFM : ${CB}${CUL}https://www.thc.org/segfault/faq${CN} GOODBYE : ${CW}Join us on Telegram - https://t.me/thcorg${CN}" @@ -1078,7 +1080,7 @@ export LID [[ -z $SF_SEED ]] && ERREXIT 244 "SF_SEED= is not set." # Show system messages -sysmsg "/sf/bin/loginmsg-all.sh" +sysmsg "/config/host/etc/loginmsg-all.sh" # Call init_vars() after LID is set init_vars @@ -1117,7 +1119,7 @@ if [[ -d "${SF_USER_DB_DIR}" ]]; then touch "${HNLID_FILE}" else print_disclaimer - sysmsg "/sf/bin/loginmsg-new.sh" + sysmsg "/config/host/etc/loginmsg-new.sh" # ###################################################################### # 70 long # Got 54 space