diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/stunnel/stunnel.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/stunnel/stunnel.inc b/config/stunnel/stunnel.inc index 6dc17ef6..6233679b 100644 --- a/config/stunnel/stunnel.inc +++ b/config/stunnel/stunnel.inc @@ -177,7 +177,7 @@ function stunnel_save($config) { if ($pkgconfig['sourceip']) { fwrite($fout, "local = " . $pkgconfig['sourceip'] . "\n"); } - fwrite($fout, "accept = " . $pkgconfig['localip'] . ":" . $pkgconfig['localport'] . "\n"); + fwrite($fout, "accept = " . ($pkgconfig['localip'] ? $pkgconfig['localip'] . ":" : "") . $pkgconfig['localport'] . "\n"); fwrite($fout, "connect = " . $pkgconfig['redirectip'] . ":" . $pkgconfig['redirectport'] . "\n"); fwrite($fout, "TIMEOUTclose = 0\n\n"); } @@ -257,7 +257,7 @@ function stunnel_install() { if ($pkgconfig['sourceip']) { fwrite($fout, "local = " . $pkgconfig['sourceip'] . "\n"); } - fwrite($fout, "accept = " . $pkgconfig['localip'] . ":" . $pkgconfig['localport'] . "\n"); + fwrite($fout, "accept = " . ($pkgconfig['localip'] ? $pkgconfig['localip'] . ":" : "") . $pkgconfig['localport'] . "\n"); fwrite($fout, "connect = " . $pkgconfig['redirectip'] . ":" . $pkgconfig['redirectport'] . "\n"); fwrite($fout, "TIMEOUTclose = 0\n\n"); } |