summaryrefslogtreecommitdiff
path: root/net-proxy/nylon/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-proxy/nylon/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-proxy/nylon/files')
-rw-r--r--net-proxy/nylon/files/nylon-1.21-libevent.patch63
-rw-r--r--net-proxy/nylon/files/nylon.conf37
-rw-r--r--net-proxy/nylon/files/nylon.init22
3 files changed, 122 insertions, 0 deletions
diff --git a/net-proxy/nylon/files/nylon-1.21-libevent.patch b/net-proxy/nylon/files/nylon-1.21-libevent.patch
new file mode 100644
index 000000000000..d7ca2a1ab0e9
--- /dev/null
+++ b/net-proxy/nylon/files/nylon-1.21-libevent.patch
@@ -0,0 +1,63 @@
+--- a/configure.in
++++ b/configure.in
+@@ -95,44 +95,10 @@
+ AC_REPLACE_FUNCS(strlcpy strlcat strsep setproctitle daemon)
+
+ dnl Checks for libevent
+-AC_MSG_CHECKING(for libevent)
+-AC_ARG_WITH(libevent,
+-[ --with-libevent=DIR use libevent in DIR],
+-[ case "$withval" in
+- yes|no)
+- AC_MSG_RESULT(no)
+- ;;
+- *)
+- AC_MSG_RESULT($withval)
+- if test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- EVENTINC="-I$withval/include"
+- EVENTLIB="-L$withval/lib -levent"
+- elif test -f $withval/event.h -a -f $withval/libevent.a; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- EVENTINC="-I$withval"
+- EVENTLIB="-L$withval -levent"
+- else
+- AC_ERROR(event.h or libevent.a not found in $withval)
+- fi
+- ;;
+- esac ],
+-[ if test -f ${prefix}/include/event.h -a -f ${prefix}/lib/libevent.a;
+-then
+- EVENTINC="-I${prefix}/include"
+- EVENTLIB="-L${prefix}/lib -levent"
+- elif test -f /usr/include/event.h; then
+- EVENTLIB="-levent"
+- else
+- AC_MSG_RESULT(no)
+- AC_ERROR(libevent not found)
+- fi
+- AC_MSG_RESULT(yes) ]
+-)
+-AC_SUBST(EVENTINC)
+-AC_SUBST(EVENTLIB)
++PKG_CHECK_MODULES(LIBEVENT,libevent,,)
++
++AC_SUBST(LIBEVENT_CFLAGS)
++AC_SUBST(LIBEVENT_LIBS)
+
+ if test "x${sysconfdir}" = 'x${prefix}/etc'; then
+ csysconfdir="${prefix}/etc"
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -5,7 +5,7 @@
+ nylon_SOURCES = nylon.c print.c cfg.c expanda.c net.c access.c atomicio.c \
+ socks4.c socks5.c mirror.c cleanup.c misc.c
+
+-AM_CFLAGS = @EVENTINC@ -Wall -g
+-LDADD = @EVENTLIB@ @LIBOBJS@
++AM_CFLAGS = @LIBEVENT_CFLAGS@
++LDADD = @LIBEVENT_LIBS@ @LIBOBJS@
+
+ EXTRA_DIST = strlcpy.c strlcat.c setproctitle.c strsep.c err.c daemon.c
diff --git a/net-proxy/nylon/files/nylon.conf b/net-proxy/nylon/files/nylon.conf
new file mode 100644
index 000000000000..80d11cc8806a
--- /dev/null
+++ b/net-proxy/nylon/files/nylon.conf
@@ -0,0 +1,37 @@
+# sample configuration
+# marius aamodt eriksen (marius@umich.edu)
+# $Id: nylon.conf,v 1.11 2002/03/27 07:39:53 beriksen Exp $
+# general settings
+[General]
+
+# number of simultaneous connections allowed
+No-Simultaneous-Conn=10
+
+# log connections and other information to syslog? 1: on, 0: off
+Log=1
+
+# be verbose on the console? 1: on, 0: off
+Verbose=0
+
+# store pid file
+#PIDfile=/var/run/nylon.pid
+
+# server settings
+[Server]
+
+# interface to listen to connections
+#Binding-Interface=fxp1
+
+# interface to bind outgoing connections to
+#Connecting-Interface=fxp0
+
+# listening port to bind to
+Port=1080
+
+# allowed is processed first, then deny
+
+# allowable connect ips/ranges
+#Allow-IP=141.0.0.0/8 127.0.0.1 10.0.0.0/24
+Allow-IP=127.0.0.1/32
+# denied connect ips/ranges
+#Deny-IP=10.0.0.0/24
diff --git a/net-proxy/nylon/files/nylon.init b/net-proxy/nylon/files/nylon.init
new file mode 100644
index 000000000000..7c58d3c9bc32
--- /dev/null
+++ b/net-proxy/nylon/files/nylon.init
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Nylon"
+ start-stop-daemon --start --quiet --pidfile /var/run/nylon.pid \
+ --startas /usr/bin/nylon
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Nylon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nylon.pid
+ eend $?
+}
+
+