mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-10 02:21:15 +02:00
add shadowsocks
This commit is contained in:
43
net/shadowsocks/Makefile
Normal file
43
net/shadowsocks/Makefile
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
PORTNAME= shadowsocks
|
||||||
|
DISTNAME= shadowsocks-libev
|
||||||
|
DISTVERSIONPREFIX= v
|
||||||
|
DISTVERSION= 3.3.5
|
||||||
|
CATEGORIES= net
|
||||||
|
|
||||||
|
MAINTAINER= xiaoding+freebsd@xiaoding.org
|
||||||
|
COMMENT= Lightweight tunnel proxy which can help you get through firewalls
|
||||||
|
WWW= https://github.com/shadowsocks/shadowsocks-libev
|
||||||
|
|
||||||
|
|
||||||
|
LIB_DEPENDS= libev.so:devel/libev \
|
||||||
|
libmbedcrypto.so:security/mbedtls \
|
||||||
|
libpcre.so:text/libpcre \
|
||||||
|
libsodium.so:crypto/libsodium \
|
||||||
|
libcares.so:net/libcares
|
||||||
|
|
||||||
|
USES= autoreconf compiler:c11 gmake pathfix
|
||||||
|
GNU_CONFIGURE= yes
|
||||||
|
CONFIGURE_ARGS= --enable-shared
|
||||||
|
USE_GITHUB= yes
|
||||||
|
GH_ACCOUNT= shadowsocks
|
||||||
|
GH_TUPLE= shadowsocks:libbloom:437e1ad:libbloom/libbloom \
|
||||||
|
shadowsocks:libcork:074e074:libcork/libcork \
|
||||||
|
shadowsocks:ipset:3ea7fe3:libipset/libipset
|
||||||
|
INSTALL_TARGET= install-strip
|
||||||
|
USE_LDCONFIG= yes
|
||||||
|
|
||||||
|
#OPTIONS_DEFINE= BASH DOCS ZSH
|
||||||
|
#OPTIONS_SUB= yes
|
||||||
|
|
||||||
|
#DOCS_BUILD_DEPENDS= asciidoc:textproc/asciidoc \
|
||||||
|
# xmlto:textproc/xmlto
|
||||||
|
CONFIGURE_ARGS+= --disable-documentation
|
||||||
|
|
||||||
|
USE_RC_SUBR= shadowsocks
|
||||||
|
|
||||||
|
post-install:
|
||||||
|
${MKDIR} ${STAGEDIR}${ETCDIR}
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/debian/config.json ${STAGEDIR}${ETCDIR}/config.json.sample
|
||||||
|
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
||||||
9
net/shadowsocks/distinfo
Normal file
9
net/shadowsocks/distinfo
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
TIMESTAMP = 1600518565
|
||||||
|
SHA256 (shadowsocks-shadowsocks-libev-v3.3.5_GH0.tar.gz) = cca6f46d9ac51c290cd50b8c26286a347bfd189d686340f32e8b264b630a166a
|
||||||
|
SIZE (shadowsocks-shadowsocks-libev-v3.3.5_GH0.tar.gz) = 303368
|
||||||
|
SHA256 (shadowsocks-libbloom-437e1ad_GH0.tar.gz) = bc10f87b9f06711e2d2783dc53b04dceca7eed952fe0a89a35794952afa495d5
|
||||||
|
SIZE (shadowsocks-libbloom-437e1ad_GH0.tar.gz) = 1208176
|
||||||
|
SHA256 (shadowsocks-libcork-074e074_GH0.tar.gz) = 6bb33c93dcbb7fbbeb7d82994e769bb05cdd168d8ebf5c0e1921bd22327fe54e
|
||||||
|
SIZE (shadowsocks-libcork-074e074_GH0.tar.gz) = 186531
|
||||||
|
SHA256 (shadowsocks-ipset-3ea7fe3_GH0.tar.gz) = e7b487c21a5352a3c9faef3256ed1a539f7ee46f38bf57922340c125c720da61
|
||||||
|
SIZE (shadowsocks-ipset-3ea7fe3_GH0.tar.gz) = 64895
|
||||||
22
net/shadowsocks/files/patch-libcork_src_libcork_posix_env.c
Normal file
22
net/shadowsocks/files/patch-libcork_src_libcork_posix_env.c
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
--- libcork/src/libcork/posix/env.c.orig 2019-07-24 14:01:14 UTC
|
||||||
|
+++ libcork/src/libcork/posix/env.c
|
||||||
|
@@ -194,12 +194,19 @@ cork_env_set_vars(void *user_data, struct cork_hash_ta
|
||||||
|
*
|
||||||
|
* [1] http://www.gnu.org/software/gnulib/manual/html_node/clearenv.html
|
||||||
|
*/
|
||||||
|
+
|
||||||
|
+#if (defined(__FreeBSD__) && (__FreeBSD__ < 14))
|
||||||
|
+/* Since FreeBSD 14.0-CURRENT, the clearenv(3) function was added to stdlib.
|
||||||
|
+ * See https://reviews.freebsd.org/R10:597b02675751e48dd04777f1e91fee382bf3a966
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
clearenv(void)
|
||||||
|
{
|
||||||
|
*environ = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
/* Otherwise assume that we have clearenv available. */
|
||||||
|
#endif
|
||||||
31
net/shadowsocks/files/shadowsocks.in
Normal file
31
net/shadowsocks/files/shadowsocks.in
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# PROVIDE: shadowsocks-libev
|
||||||
|
# REQUIRE: LOGIN cleanvar
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
|
||||||
|
# Add the following lines to /etc/rc.conf to enable shadowsocks-libev:
|
||||||
|
# shadowsocks_libev_enable (bool): Set to "NO" by default.
|
||||||
|
# Set to "YES" to enable shadowsocks-libev.
|
||||||
|
# shadowsocks_libev_config (path): Shadowsocks config file.
|
||||||
|
# Defaults to "%%PREFIX%%/etc/shadowsocks-libev/config.json"
|
||||||
|
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name="shadowsocks_libev"
|
||||||
|
rcvar=shadowsocks_libev_enable
|
||||||
|
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
|
||||||
|
: ${shadowsocks_libev_enable:="NO"}
|
||||||
|
: ${shadowsocks_libev_config="%%PREFIX%%/etc/shadowsocks-libev/config.json"}
|
||||||
|
|
||||||
|
command="%%PREFIX%%/bin/ss-server"
|
||||||
|
pidfile="/var/run/shadowsocks-libev.pid"
|
||||||
|
required_files="${shadowsocks_libev_config}"
|
||||||
|
|
||||||
|
command_args="-f $pidfile -c $shadowsocks_libev_config"
|
||||||
|
|
||||||
|
run_rc_command "$1"
|
||||||
5
net/shadowsocks/pkg-descr
Normal file
5
net/shadowsocks/pkg-descr
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Shadowsocks is a lightweight tunnel proxy which can help you get through
|
||||||
|
firewalls.
|
||||||
|
|
||||||
|
Shadowsocks-libev is a C implentment based on libev. It targets mainly on
|
||||||
|
embedded devices and low end boxes.
|
||||||
9
net/shadowsocks/pkg-plist
Normal file
9
net/shadowsocks/pkg-plist
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
bin/ss-local
|
||||||
|
bin/ss-manager
|
||||||
|
bin/ss-server
|
||||||
|
bin/ss-tunnel
|
||||||
|
include/shadowsocks.h
|
||||||
|
lib/libshadowsocks-libev.la
|
||||||
|
lib/libshadowsocks-libev.so
|
||||||
|
lib/libshadowsocks-libev.so.2
|
||||||
|
lib/pkgconfig/shadowsocks-libev.pc
|
||||||
Reference in New Issue
Block a user