Skip to content

Commit e79e991

Browse files
committed
(socks-proxy) fixed healthcheck external dependancy
1 parent 3148970 commit e79e991

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/socks-proxy/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ FROM debian:trixie-slim AS runtime
2424

2525
RUN <<EOR
2626
apt-get update
27-
DEBIAN_FRONTEND="noninteractive" apt-get install -y curl
27+
DEBIAN_FRONTEND="noninteractive" apt-get install -y netcat-traditional
2828
rm -rf /var/lib/apt/lists/*
2929
EOR
3030

@@ -33,5 +33,5 @@ COPY --chmod=0755 entrypoint.sh /entrypoint.sh
3333

3434
ENTRYPOINT ["/entrypoint.sh"]
3535
HEALTHCHECK --interval=1m --timeout=3s --start-interval=5s \
36-
CMD curl -fsSx socks5h://$(cat /healthcreds)@localhost:${PROXY_INTERNAL_PORT:-1080} https://ip.me
36+
CMD nc -zv localhost ${PROXY_INTERNAL_PORT:-1080}
3737
CMD ["/usr/local/sbin/sockd"]

src/socks-proxy/entrypoint.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ if [ -z "${PROXY_USERS:-}" ]; then
77
exit 1
88
fi
99

10-
if id "healthcheck" &>/dev/null; then
11-
echo "Healthcheck user already exists, resetting password"
12-
else
13-
useradd -M -s /usr/sbin/nologin "healthcheck"
14-
fi
15-
HEALTHCHECK_PASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)
16-
echo "healthcheck:${HEALTHCHECK_PASSWORD}" | tee /healthcreds | chpasswd
17-
1810
# Create unix users for each entry of PROXY_USERS
1911
IFS=',' read -ra USERS <<< "$PROXY_USERS"
2012
for entry in "${USERS[@]}"; do

0 commit comments

Comments
 (0)