File tree Expand file tree Collapse file tree
root/etc/s6-overlay/s6-rc.d Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 logrotate \
1616 nano \
1717 netcat-openbsd \
18+ socat \
1819 sudo && \
1920 echo "**** install openssh-server ****" && \
2021 if [ -z ${OPENSSH_RELEASE+x} ]; then \
Original file line number Diff line number Diff line change 1+ #!/usr/bin/with-contenv bash
2+ # shellcheck shell=bash
3+
4+ SOCAT_ENABLED=${SOCAT_ENABLED:-false}
5+ SOCAT_LISTEN_PORT=${SOCAT_LISTEN_PORT:-43388}
6+ SOCAT_TARGET_HOST=${SOCAT_TARGET_HOST:-localhost}
7+ SOCAT_TARGET_PORT=${SOCAT_TARGET_PORT:-43389}
8+ SOCAT_Log_Level=${SOCAT_LOG_LEVEL:--ddd}
9+
10+ if [[ "${SOCAT_ENABLED}" != "true" ]]; then
11+ echo "Socat service disabled. Set SOCAT_ENABLED=true to enable."
12+ exec sleep infinity
13+ fi
14+
15+ echo "Starting socat forwarding: LISTEN:${SOCAT_LISTEN_PORT} -> ${SOCAT_TARGET_HOST}:${SOCAT_TARGET_PORT}"
16+ exec /usr/bin/socat ${SOCAT_Log_Level} \
17+ TCP-LISTEN:${SOCAT_LISTEN_PORT},fork,reuseaddr \
18+ TCP4:${SOCAT_TARGET_HOST}:${SOCAT_TARGET_PORT}
Original file line number Diff line number Diff line change 1+ longrun
You can’t perform that action at this time.
0 commit comments