Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sslh: add transparent proxy support #12280

Merged
merged 5 commits into from May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions net/sslh/Makefile
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=sslh
PKG_VERSION:=v1.20
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://rutschle.net/tech/sslh/
Expand All @@ -26,7 +26,7 @@ define Package/sslh
CATEGORY:=Network
SUBMENU:=Routing and Redirection
TITLE:=SSL/SSH multiplexer
DEPENDS:=+libconfig +USE_UCLIBC:libpcre +USE_MUSL:libpcre
DEPENDS:=+libconfig +libcap +USE_UCLIBC:libpcre +USE_MUSL:libpcre
URL:=https://rutschle.net/tech/sslh/README.html
endef

Expand All @@ -36,6 +36,7 @@ define Package/sslh/conffiles
endef

MAKE_FLAGS += \
USELIBCAP=1 \
$(if $(CONFIG_USE_GLIBC),USELIBPCRE=,USELIBPCRE=1)

define Package/sslh/install
Expand Down
12 changes: 9 additions & 3 deletions net/sslh/files/sslh.config
Expand Up @@ -10,9 +10,12 @@ config 'sslh' 'default'
# ssh defaults to 'localhost:22'
# --ssh <sshhost>:<sshport>
option 'ssh' ''
# ssl defaults to 'localhost:443'
# --ssl <sslhost>:<sslport>
option 'ssl' ''
# http defaults to 'localhost:80'
# --http <httphost>:<httpport>
option 'http' ''
# tls defaults to 'localhost:443'
# --tls <tlshost>:<tlsport>
option 'tls' ''
# openvpn defaults to 'localhost:1194'
# --openvpn <openvpnhost>:<openvpnport>
option 'openvpn' ''
Expand All @@ -28,5 +31,8 @@ config 'sslh' 'default'
# verbose defaults to off
# -v
option 'verbose' '0'
# transparent defaults to false
# --transparent
option 'transparent' '0'
# use external config file
# option configfile '/etc/sslh.conf'
9 changes: 6 additions & 3 deletions net/sslh/files/sslh.init
Expand Up @@ -22,9 +22,9 @@ start_instance() {
# B) ssh parameter
config_get val "${section}" ssh
[ -n "${val}" ] && append args "--ssh ${val}"
# C) ssl parameter
config_get val "${section}" ssl
[ -n "${val}" ] && append args "--ssl ${val}"
# C) tls parameter
config_get val "${section}" tls
[ -n "${val}" ] && append args "--tls ${val}"
# D) openvpn parameter
config_get val "${section}" openvpn
[ -n "${val}" ] && append args "--openvpn ${val}"
Expand All @@ -47,6 +47,9 @@ start_instance() {
# J) http parameter
config_get val "${section}" http
[ -n "${val}" ] && append args "--http ${val}"
# K) transparent parameter
config_get_bool val "${section}" transparent 0
[ "${val}" -ne 0 ] && append args "--transparent"

# Defaults were removed for --user and --pidfile options
# in sslh 1.11; Define them here instead.
Expand Down