58 Commits

Author SHA1 Message Date
Yves Rutschle
82b8ba547e
Merge pull request #205 from inztar/master
add Dockerfile
2021-07-31 16:28:42 +02:00
yrutschle
37d2756703 move to PCRE for conf file 2021-07-23 22:36:20 +02:00
yrutschle
da3b51e056 upgraded argtable3 to current last version to fix a parsing issue with command line options 2021-05-08 07:37:20 +02:00
yrutschle
c3d019284d made echosrv independant from common.o and with its own configuration 2021-04-24 10:31:41 +02:00
yrutschle
517e4ad5b4 Merge branch 'master' of https://github.com/yrutschle/sslh 2021-04-19 09:39:05 +02:00
yrutschle
de474e1d07 stop managing connections as array; instead, allocate connections, and fd2cnx is the only pointer to it 2021-04-14 23:26:01 +02:00
yrutschle
cb199ed3c6 remove redundant dependency 2021-04-11 09:38:36 +02:00
yrutschle
654ff0b5b0 rebuild when headers change 2021-03-28 11:39:49 +02:00
yrutschle
5b93e4ab55 abstracted collection management to its own file 2021-03-21 16:42:37 +01:00
Yves Rutschle
b72baa0622
Merge pull request #280 from ffontaine/master
Makefile: fix static linking with pcre
2021-03-16 20:32:46 +01:00
yrutschle
49c136691c refactor: move UDP code to its own file 2021-02-23 21:17:39 +01:00
yrutschle
07719f55b8 refactor echosrv to use conf2struct 2020-11-07 09:29:26 +01:00
Fabrice Fontaine
0d9e004d32 Makefile: fix static linking with pcre
Static build with pcre is broken since version 1.19b and
cb90cc97ae
because -lpcre has been replaced by -lpcreposix which will result in
the following static build failure:

/srv/storage/autobuild/run/instance-1/output-1/host/bin/mipsel-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -static -static -o echosrv echosrv.o probe.o common.o tls.o  -lpcreposix -lconfig -lcap
/srv/storage/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/8.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: /srv/storage/autobuild/run/instance-1/output-1/host/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpcreposix.a(libpcreposix_la-pcreposix.o): in function `regfree':
pcreposix.c:(.text+0x120): undefined reference to `pcre_free'

So append -lpcre after -lpcreposix

Fixes:
 - http://autobuild.buildroot.org/results/a601824fc0c205a6a940e0f9f079ce2c39840605

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-10-15 08:05:02 +02:00
yrutschle
2c93a015ea make libconfig optionnal again 2020-07-24 16:51:06 +02:00
Yves Rutschle
de8e5725c2 automatically sign release 2020-07-11 21:39:37 +02:00
Niobos
0380a4309f Change process name to indicate task of process 2019-09-05 16:40:59 +02:00
Taras Inzyk
95a6577cda add Dockerfile 2019-04-06 17:26:08 +05:00
yrutschle
530acc7c72 Moved command line parsing to conf2struct 2019-01-12 21:33:44 +01:00
yrutschle
e7ce929020 config file now read to struct with c2s; command line no longer works 2018-11-29 11:56:33 +01:00
Yves Rutschle
0fc6bc8d12 Revert "Adjust linking so that wrapper libraries are static."
This reverts commit 021eb836e4984b718480bfc6c9ce20ae4a1194bf.

That commit introduces regression, see
https://github.com/yrutschle/sslh/issues/157#issuecomment-352260802
for discussion.
2017-12-17 16:59:57 +01:00
yrutschle
2f8e635b67
Merge pull request #97 from candrews/patch-2
make sure the files using version.h depend on it being generated first
2017-12-16 19:01:28 +01:00
yrutschle
b8851d6714
Merge pull request #98 from candrews/patch-3
Build systemd-sslh-generator if USESYSTEMD is set
2017-12-16 18:59:36 +01:00
Robert de Bath
021eb836e4 Adjust linking so that wrapper libraries are static. 2017-11-23 20:51:57 +00:00
Robert de Bath
cb90cc97ae Default to using libpcre and actually use it
as libpcre has to better binary support.

Note, just linking libpcre only has no effect, the posix functions are
provided by libpcreposix.

Use "make USELIBPCRE=" to turn libpcre off and link POSIX library.
2017-11-23 20:51:57 +00:00
Yann E. MORIN
70a2ea926e Makefile: fix parallel build
version.h is included by some .o files, but it is generated. As such, it
must be a dependency of those .o files.

Rather than filter exactly which .o file needs it, just add a generic
dependency for all .o files on version.h.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2017-02-23 22:49:31 +01:00
Craig Andrews
a4d2a53a47 Build systemd-sslh-generator if USESYSTEMD is set 2016-06-24 20:30:15 -04:00
Craig Andrews
efba558967 make sure the files using version.h depend on it being generated first 2016-06-24 20:11:13 -04:00
James Hogarth
b3f48d9876 Add systemd capabilities to sslh, rebased on current master 2016-01-29 16:20:54 +00:00
Yves Rutschle
e511534b57 Make USELIBPCRE not the default 2016-01-22 17:09:02 +01:00
John Regan
ab3324be47 Enable PCRE as RegEx Library 2015-08-13 14:28:17 -04:00
moparisthebest
b988540105 Add SNI hostname based probe 2015-07-12 23:10:53 -04:00
Yves Rutschle
3aefaf3004 Added Makefile option to build without libpcre 2015-07-09 15:31:42 +02:00
Kylie McClain
eb3d3be3ab Makefile: use more variables for install directories 2015-06-22 01:51:36 -04:00
Alex Dunn
3bad96865d Makefile: fix install for Mac OS 2015-05-14 23:14:40 -07:00
Yves Rutschle
88af6ebaee Updated configuration info and startup scripts to use the configuration file rather than command line parameters 2015-01-01 18:59:05 +01:00
Ruben van Staveren
42425a8373 Have USELIBWRAP redefineable 2014-07-22 20:05:25 +02:00
Yves Rutschle
53550ff21e fix errors in previous commit... 2014-02-24 17:52:58 +01:00
Yves Rutschle
9beacc63f9 use directory version when compiling from a tarball without git 2014-02-23 10:41:47 +01:00
Sebastian Schmidt
009faa64b7 Implement libcap support
Use libcap for saving CAP_NET_ADMIN (if --transparent is given) over a
setuid(). We don’t need CAP_NET_BIND_SERVICE as the listening sockets
are established before dropping root.
2013-10-20 21:16:56 +02:00
Ondřej Kuzník
d14dcdee5c Fix build issues when version.h doesn't exist yet 2013-09-28 20:44:08 +02:00
Yves Rutschle
5952ca4aaf Make version.h before any other object 2013-09-17 11:01:05 +02:00
Mike Frysinger
8252ecf307 Makefile: fix CPPFLAGS handling
This code doesn't respect CPPFLAGS at all.  Fix that and move the
existing -D flags to the right variable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-17 00:18:15 -04:00
Mike Frysinger
4fafb3d376 Makefile: fix LDFLAGS handling
We need these flags to come before all the objects, not after.
Otherwise, flags that impact handling of input objects do not
show up in time.

This also matches standard build system behavior (e.g. autotools).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-17 00:17:23 -04:00
Jason Cooper
7008a1ede4 cscope: add cscope tagging support
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-09-16 22:02:29 +02:00
Jason Cooper
820e31bfc0 Makefile: add distclean target, remove tags file
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-09-16 22:01:47 +02:00
Jason Cooper
f36eb7be39 version.h: dynamically create version number based on git
When building the source from a checked out tag, eg v1.15, VERSION will
equal v1.15.  However, when building from anything other than a tagged
version, you get 'v1.15-4-g50432d5-dirty' meaning I was 4 patches in
front of v1.15, particularly '50432d5' was my current HEAD, and I had
uncommited changes, '-dirty'.

Very useful for folks submitting bug reports on versions they compiled
themselves.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-09-16 21:56:45 +02:00
Christopher Meng
bde20dbaa5 Fix for RPM
- RPM doesn't support root, so for the chroot environment we must define a destdir of RPM %{buildroot}.

- Preserve the timestamp.
2013-08-10 15:06:49 +08:00
Yves Rutschle
c02e2d7aee v1.15 release 2013-07-27 16:25:04 +02:00
Yves Rutschle
f842e2e081 v1.14: 21DEC2012
Corrected OpenVPN probe to support pre-shared secret
	mode (OpenVPN port-sharing code is... wrong). Thanks
	to Kai Ellinger for help in investigating and
	testing.

	Added an actual TLS/SSL probe.

	Added configurable --on-timeout protocol
	specification.

	Added a --anyprot protocol probe (equivalent to what
	--ssl was).

	Makefile respects the user's compiler and CFLAG
	choices (falling back to the current values if
	undefined), as well as LDFLAGS.
	(Michael Palimaka)

	Added "After" and "KillMode" to systemd.sslh.service
	(Thomas Weischuh).

	Added LSB tags to etc.init.d.sslh
	(Thomas Varis).
2013-07-10 23:19:33 +02:00
Yves Rutschle
5cd1fa1875 v1.13: 18MAY2012
Write PID file before dropping privileges.

	Added --background, which overrides 'foreground'
	configuration file setting.

	Added example systemd service file from Archlinux in
	scripts/
	https://projects.archlinux.org/svntogit/community.git/tree/trunk/sslh.service?h=packages/sslh
	(Sbastien Luttringer)
2013-07-10 23:16:50 +02:00