Skip to content
This repository was archived by the owner on May 25, 2024. It is now read-only.

Commit 950fc90

Browse files
authored
Merge pull request #5 from toomyem/main
Added BINDFAMILY option.
2 parents 3960a73 + 329f502 commit 950fc90

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

readme-vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ opt_param_env_vars:
3838
- { env_var: "MAXLINES", env_value: "32", desc: "The length of each line is randomized. This controls the maximum length of each line. Shorter lines may keep clients on for longer if they give up after a certain number of bytes." }
3939
- { env_var: "MAXCLIENTS", env_value: "4096", desc: "Maximum number of connections to accept at a time. Connections beyond this are not immediately rejected, but will wait in the queue." }
4040
- { env_var: "LOGFILE", env_value: "false", desc: "By default, the app logs to container log. If this is set to `true`, the log will be output to file under `/config/logs/endlessh` (`/config` needs to be mapped)." }
41+
- { env_var: "BINDFAMILY", env_value: "", desc: "By default, the app binds to IPv4 and IPv6 addresses. Set it to `4` or `6` to bind to IPv4 only or IPv6 only, respectively. Leave blank to bind to both." }
4142
opt_param_usage_include_vols: true
4243
opt_param_volumes:
4344
- { vol_path: "/config", vol_host_path: "/path/to/appdata", desc: "Required if `LOGFILE` is set to `true`." }
@@ -53,4 +54,5 @@ app_setup_block: |
5354
5455
# changelog
5556
changelogs:
57+
- { date: "08.06.21:", desc: "Add BINDFAMILY option." }
5658
- { date: "16.04.21:", desc: "Initial Release." }

root/etc/services.d/endlessh/run

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
export \
44
MSDELAY=${MSDELAY:-10000} \
55
MAXLINE=${MAXLINE:-32} \
6-
MAXCLIENTS=${MAXCLIENTS:-4096}
6+
MAXCLIENTS=${MAXCLIENTS:-4096} \
7+
BINDFAMILY=$(test v4 = v${BINDFAMILY} -o v6 = v${BINDFAMILY} && echo -${BINDFAMILY})
78

89
exec 2>&1 \
910
s6-setuidgid abc \
@@ -12,4 +13,5 @@ exec 2>&1 \
1213
-d ${MSDELAY} \
1314
-l ${MAXLINE} \
1415
-m ${MAXCLIENTS} \
15-
-p 2222
16+
-p 2222 \
17+
${BINDFAMILY}

0 commit comments

Comments
 (0)