Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
9134b6ea
Commit
9134b6ea
authored
Jan 23, 2018
by
Herve Couplet
Browse files
if local-address is present, bind to that ip instead of 0.0.0.0
parent
4a380ad7
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
9134b6ea
...
...
@@ -1984,9 +1984,15 @@ _startserver() {
_NC="$_NC -6"
fi
SOCAT_OPTIONS=TCP-LISTEN:$Le_HTTPPort,crlf,reuseaddr,fork
#Adding bind to local-address
if [ "$_local_address" ]; then
$SOCAT_OPTIONS="$SOCAT_OPTIONS,bind=${_local_address}"
fi
_debug "_NC" "$_NC"
#todo listen address
$_NC TCP-LISTEN:$Le_HTTPPort,crlf,reuseaddr,fork SYSTEM:"sleep 0.5; echo HTTP/1.1 200 OK; echo ; echo $content; echo;" &
$_NC $SOCAT_OPTIONS SYSTEM:"sleep 0.5; echo HTTP/1.1 200 OK; echo ; echo $content; echo;" &
serverproc="$!"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment