mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
sslh: Add support for external config file
This allows users to use an external config file if required (for example matching packets based on SNI hostname or REGEX patterns). Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> Signed-off-by: Mircea Horea IONICĂ <mionica@gmail.com>
This commit is contained in:
committed by
Jonathan McCrohan
parent
16ac0e8205
commit
727cb7e6e7
@@ -28,3 +28,5 @@ config 'sslh' 'default'
|
||||
# verbose defaults to off
|
||||
# -v
|
||||
option 'verbose' '0'
|
||||
# use external config file
|
||||
# option configfile '/etc/sslh.conf'
|
||||
|
||||
@@ -26,12 +26,12 @@ start_instance() {
|
||||
config_get val "${section}" ssl
|
||||
[ -n "${val}" ] && append args "--ssl ${val}"
|
||||
# D) openvpn parameter
|
||||
config_get val "${section}" openvpn
|
||||
[ -n "${val}" ] && append args "--openvpn ${val}"
|
||||
config_get val "${section}" openvpn
|
||||
[ -n "${val}" ] && append args "--openvpn ${val}"
|
||||
# E) tinc parameter
|
||||
config_get val "${section}" tinc
|
||||
[ -n "${val}" ] && append args "--tinc ${val}"
|
||||
# F) xmpp parameter
|
||||
config_get val "${section}" tinc
|
||||
[ -n "${val}" ] && append args "--tinc ${val}"
|
||||
# F) xmpp parameter
|
||||
config_get val "${section}" xmpp
|
||||
[ -n "${val}" ] && append args "--xmpp ${val}"
|
||||
# G) timeout (before a connection is considered to be SSH)
|
||||
@@ -41,6 +41,9 @@ start_instance() {
|
||||
local verbosed
|
||||
config_get_bool verbosed "${section}" verbose 0
|
||||
[ "${verbosed}" -ne 0 ] && append args "-v"
|
||||
# I) sslh config file (cmd line args override file settings)
|
||||
config_get val "${section}" configfile
|
||||
[ -n "${val}" ] && append args "-F${val}"
|
||||
|
||||
# Defaults were removed for --user and --pidfile options
|
||||
# in sslh 1.11; Define them here instead.
|
||||
|
||||
Reference in New Issue
Block a user