summaryrefslogtreecommitdiff
path: root/net/sniproxy
diff options
context:
space:
mode:
authorwiedi <wiedi@pkgsrc.org>2014-06-13 00:13:13 +0000
committerwiedi <wiedi@pkgsrc.org>2014-06-13 00:13:13 +0000
commit9b6e5bf08567f0a0b3b1dc7bc7e35bd8aec88c2b (patch)
tree496abf9897e27e4e6b367249ed6b872aa53b480d /net/sniproxy
parent606f94eb8e77aa40c3776d823b3185640e88c547 (diff)
downloadpkgsrc-9b6e5bf08567f0a0b3b1dc7bc7e35bd8aec88c2b.tar.gz
Import sniproxy-0.3.4 as net/sniproxy
Proxies incoming HTTP and TLS connections based on the hostname contained in the initial request. This enables HTTPS name-based virtual hosting to separate backend servers without installing the private key on the proxy machine.
Diffstat (limited to 'net/sniproxy')
-rw-r--r--net/sniproxy/DESCR4
-rw-r--r--net/sniproxy/Makefile38
-rw-r--r--net/sniproxy/PLIST3
-rw-r--r--net/sniproxy/distinfo7
-rw-r--r--net/sniproxy/files/smf/manifest.xml27
-rw-r--r--net/sniproxy/patches/patch-src_buffer.c15
-rw-r--r--net/sniproxy/patches/patch-src_connection.c15
7 files changed, 109 insertions, 0 deletions
diff --git a/net/sniproxy/DESCR b/net/sniproxy/DESCR
new file mode 100644
index 00000000000..c71f6ff69a7
--- /dev/null
+++ b/net/sniproxy/DESCR
@@ -0,0 +1,4 @@
+Proxies incoming HTTP and TLS connections based on the hostname
+contained in the initial request. This enables HTTPS name-based virtual
+hosting to separate backend servers without installing the private key
+on the proxy machine.
diff --git a/net/sniproxy/Makefile b/net/sniproxy/Makefile
new file mode 100644
index 00000000000..d19f99a984e
--- /dev/null
+++ b/net/sniproxy/Makefile
@@ -0,0 +1,38 @@
+# $NetBSD: Makefile,v 1.1 2014/06/13 00:13:13 wiedi Exp $
+
+DISTNAME= 0.3.4
+PKGNAME= sniproxy-${DISTNAME}
+CATEGORIES= net
+MASTER_SITES= https://github.com/dlundquist/sniproxy/archive/
+
+MAINTAINER= wiedi@frubar.net
+HOMEPAGE= https://github.com/dlundquist/sniproxy/
+COMMENT= Proxy that routes based on TLS server name extension
+LICENSE= 2-clause-bsd
+
+WRKSRC= ${WRKDIR}/sniproxy-${DISTNAME}
+
+USE_LANGUAGES= c99
+USE_TOOLS+= autoconf aclocal automake
+GNU_CONFIGURE= YES
+USE_LIBTOOL= YES
+
+BUILD_DEPENDS+= gettext-m4-[0-9]*:../../devel/gettext-m4
+
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
+CONF_FILES= ${EGDIR}/sniproxy.conf ${PKG_SYSCONFDIR}/sniproxy.conf
+
+CPPFLAGS.SunOS+= -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
+LDFLAGS.SunOS+= -lsocket -lnsl
+
+pre-configure:
+ cd ${WRKSRC} && ./autogen.sh
+
+post-install:
+ ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/sniproxy.conf ${DESTDIR}${EGDIR}
+
+.include "../../devel/libev/buildlink3.mk"
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../net/udns/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/sniproxy/PLIST b/net/sniproxy/PLIST
new file mode 100644
index 00000000000..4dc57ec3679
--- /dev/null
+++ b/net/sniproxy/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2014/06/13 00:13:13 wiedi Exp $
+sbin/sniproxy
+share/examples/sniproxy/sniproxy.conf
diff --git a/net/sniproxy/distinfo b/net/sniproxy/distinfo
new file mode 100644
index 00000000000..62dc5fc00d8
--- /dev/null
+++ b/net/sniproxy/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2014/06/13 00:13:13 wiedi Exp $
+
+SHA1 (0.3.4.tar.gz) = 73bbe48508c08f150de0276ad68bfa7c63618efb
+RMD160 (0.3.4.tar.gz) = c28a22d889ec360c2676260ff30400cee2e8fdb7
+Size (0.3.4.tar.gz) = 57908 bytes
+SHA1 (patch-src_buffer.c) = f79173875680d57f21b723a0ada3676ae36cbb20
+SHA1 (patch-src_connection.c) = 35beaa910b6f2e95cfbe75c878b96631afc976e8
diff --git a/net/sniproxy/files/smf/manifest.xml b/net/sniproxy/files/smf/manifest.xml
new file mode 100644
index 00000000000..a741b015c26
--- /dev/null
+++ b/net/sniproxy/files/smf/manifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='@SMF_NAME@'>
+<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+ <create_default_instance enabled="false"/>
+ <dependency name='fs-root' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/root' />
+ </dependency>
+ <dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/network/service'/>
+ </dependency>
+
+ <exec_method name='start' type='method' exec='@PREFIX@/sbin/sniproxy -c %{config_file}' timeout_seconds='20'/>
+ <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
+
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/sniproxy.conf" />
+ </property_group>
+
+ <stability value='Unstable'/>
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>HTTPS SNI Proxy</loctext>
+ </common_name>
+ </template>
+</service>
+</service_bundle>
diff --git a/net/sniproxy/patches/patch-src_buffer.c b/net/sniproxy/patches/patch-src_buffer.c
new file mode 100644
index 00000000000..ca65f171970
--- /dev/null
+++ b/net/sniproxy/patches/patch-src_buffer.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_buffer.c,v 1.1 2014/06/13 00:13:13 wiedi Exp $
+
+NetBSD doesn't have alloca.h
+--- src/buffer.c.orig 2014-05-18 21:52:06.000000000 +0000
++++ src/buffer.c
+@@ -32,7 +32,9 @@
+ #include <time.h>
+ #include <errno.h>
+ #include <unistd.h>
++#if !defined(__NetBSD__)
+ #include <alloca.h>
++#endif
+ #include <assert.h>
+ #include "buffer.h"
+ #include "logger.h"
diff --git a/net/sniproxy/patches/patch-src_connection.c b/net/sniproxy/patches/patch-src_connection.c
new file mode 100644
index 00000000000..e6d7a3306b4
--- /dev/null
+++ b/net/sniproxy/patches/patch-src_connection.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_connection.c,v 1.1 2014/06/13 00:13:13 wiedi Exp $
+
+NetBSD doesn't have alloca.h
+--- src/connection.c.orig 2014-05-18 21:52:06.000000000 +0000
++++ src/connection.c
+@@ -39,7 +39,9 @@
+ #include <arpa/inet.h>
+ #include <ev.h>
+ #include <assert.h>
++#if !defined(__NetBSD__)
+ #include <alloca.h>
++#endif
+ #include "connection.h"
+ #include "resolv.h"
+ #include "address.h"