summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD50
-rw-r--r--ipv6.patch11
-rw-r--r--shadowsocks-libev-redir@.service12
-rw-r--r--shadowsocks-libev-server@.service12
-rw-r--r--shadowsocks-libev-tunnel@.service12
-rw-r--r--shadowsocks-libev.install10
-rw-r--r--shadowsocks-libev@.service12
8 files changed, 151 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..dd89aeebce9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = shadowsocks-libev-ipv6first
+ pkgdesc = A lightweight secured socks5 proxy for embedded devices and low end boxes (Server resolve IPv6 first)
+ pkgver = 2.4.6
+ pkgrel = 1
+ url = https://github.com/shadowsocks/shadowsocks-libev
+ install = shadowsocks-libev.install
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ depends = libcap
+ depends = openssl
+ depends = libsodium
+ depends = libev
+ depends = udns
+ depends = zlib
+ provides = shadowsocks-libev
+ conflicts = shadowsocks-libev
+ source = git+https://github.com/shadowsocks/shadowsocks-libev.git#tag=v2.4.6
+ source = ipv6.patch
+ source = shadowsocks-libev@.service
+ source = shadowsocks-libev-server@.service
+ source = shadowsocks-libev-redir@.service
+ source = shadowsocks-libev-tunnel@.service
+ sha512sums = SKIP
+ sha512sums = 456498dd00d6ce900882aa2cc66814f4c6c56cda938a83886f24bae759722bf6a8903d3112ee829ca635a4a8af8eb827815ecb9d44904021e41943e99b98b125
+ sha512sums = 96e5c9ba04a8d45fa57728aeb5282cf25fce42baf2c2221c5040cced89196b25d2c212472ba9b3f53bdce93ad1edd5f06e42ec62ef212764349c1dab24dde16a
+ sha512sums = 73925959731b7ab6e2b3900662f4b67a9986b798b1a4a943307c87574c9069e32a0c2298cf6e9adb895fe71316a3bac09cb684c54e8a1350566b2fe7526c1cff
+ sha512sums = bc336201afdc556130fc0bcacaf8be1588640d9d5426637eca8db473389910f6bfba39672cd69e7fa90548fe83cf8e6006f0f27dab7c937501faa1cdd09629c5
+ sha512sums = d03e0af078a4c996f300c773dd4f13b20f28717913bfe2c58bf7894fa6673940a4a0d9357464dc46956d83ca1dcdab73dd97569e2a95fb6f22ac72571c4f23be
+
+pkgname = shadowsocks-libev-ipv6first
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..36ba1179c73
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
+# Contributor: jiangxq <jiangxueqian at gmail dot com>
+# Contributor: zh99998 <zh99998@gmail.com>
+# Contributor: 4679kun <admin at 4679 dot us>
+# Contributor: ehs2013 <bvs@ge.krtac.win>
+
+_pkgname=shadowsocks-libev
+pkgname=shadowsocks-libev-ipv6first
+pkgver=2.4.6
+pkgrel=1
+pkgdesc='A lightweight secured socks5 proxy for embedded devices and low end boxes (Server resolve IPv6 first)'
+arch=('i686' 'x86_64')
+url='https://github.com/shadowsocks/shadowsocks-libev'
+license=('GPL3')
+depends=('libcap' 'openssl' 'libsodium' 'libev' 'udns' 'zlib')
+makedepends=('git')
+conflicts=('shadowsocks-libev')
+provides=('shadowsocks-libev')
+install=${_pkgname}.install
+source=("git+https://github.com/shadowsocks/${_pkgname}.git#tag=v$pkgver"
+ 'ipv6.patch'
+ 'shadowsocks-libev@.service'
+ 'shadowsocks-libev-server@.service'
+ 'shadowsocks-libev-redir@.service'
+ 'shadowsocks-libev-tunnel@.service')
+
+sha512sums=('SKIP'
+ '456498dd00d6ce900882aa2cc66814f4c6c56cda938a83886f24bae759722bf6a8903d3112ee829ca635a4a8af8eb827815ecb9d44904021e41943e99b98b125'
+ '96e5c9ba04a8d45fa57728aeb5282cf25fce42baf2c2221c5040cced89196b25d2c212472ba9b3f53bdce93ad1edd5f06e42ec62ef212764349c1dab24dde16a'
+ '73925959731b7ab6e2b3900662f4b67a9986b798b1a4a943307c87574c9069e32a0c2298cf6e9adb895fe71316a3bac09cb684c54e8a1350566b2fe7526c1cff'
+ 'bc336201afdc556130fc0bcacaf8be1588640d9d5426637eca8db473389910f6bfba39672cd69e7fa90548fe83cf8e6006f0f27dab7c937501faa1cdd09629c5'
+ 'd03e0af078a4c996f300c773dd4f13b20f28717913bfe2c58bf7894fa6673940a4a0d9357464dc46956d83ca1dcdab73dd97569e2a95fb6f22ac72571c4f23be')
+
+build() {
+ cd "$srcdir/$_pkgname"
+ patch -p0 < ../ipv6.patch
+ ./autogen.sh
+ ./configure --prefix=/usr --enable-shared --enable-system-shared-lib
+ make
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+ make DESTDIR="$pkgdir/" install
+ install -Dm644 "$srcdir/shadowsocks-libev@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-libev@.service"
+ install -Dm644 "$srcdir/shadowsocks-libev-server@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-libev-server@.service"
+ install -Dm644 "$srcdir/shadowsocks-libev-redir@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-libev-redir@.service"
+ install -Dm644 "$srcdir/shadowsocks-libev-tunnel@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-libev-tunnel@.service"
+}
diff --git a/ipv6.patch b/ipv6.patch
new file mode 100644
index 00000000000..5c2e2b9d293
--- /dev/null
+++ b/ipv6.patch
@@ -0,0 +1,11 @@
+--- src/resolv.c
++++ src/resolv.c.mod
+@@ -84,7 +84,7 @@ static struct sockaddr *choose_any(struct ResolvQuery *);
+
+ int resolv_init(struct ev_loop *loop, char **nameservers, int nameserver_num)
+ {
+- resolv_mode = MODE_IPV4_FIRST;
++ resolv_mode = MODE_IPV6_FIRST;
+
+ struct dns_ctx *ctx = &dns_defctx;
+ if (nameservers == NULL) {
diff --git a/shadowsocks-libev-redir@.service b/shadowsocks-libev-redir@.service
new file mode 100644
index 00000000000..7748f83d5e0
--- /dev/null
+++ b/shadowsocks-libev-redir@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service Redir Mode
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/shadowsocks-libev-server@.service b/shadowsocks-libev-server@.service
new file mode 100644
index 00000000000..306e99a6241
--- /dev/null
+++ b/shadowsocks-libev-server@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks-Libev Server Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/ss-server -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/shadowsocks-libev-tunnel@.service b/shadowsocks-libev-tunnel@.service
new file mode 100644
index 00000000000..e04bca9462c
--- /dev/null
+++ b/shadowsocks-libev-tunnel@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service Tunnel Mode
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/shadowsocks-libev.install b/shadowsocks-libev.install
new file mode 100644
index 00000000000..b8e175c052c
--- /dev/null
+++ b/shadowsocks-libev.install
@@ -0,0 +1,10 @@
+post_install() {
+ setcap cap_net_bind_service+ep usr/bin/ss-local 2>/dev/null
+ setcap cap_net_bind_service+ep usr/bin/ss-server 2>/dev/null
+ setcap cap_net_bind_service+ep usr/bin/ss-tunnel 2>/dev/null
+ setcap cap_net_bind_service+ep usr/bin/ss-redir 2>/dev/null
+}
+
+post_upgrade() {
+ post_install "$1"
+}
diff --git a/shadowsocks-libev@.service b/shadowsocks-libev@.service
new file mode 100644
index 00000000000..65f6770194c
--- /dev/null
+++ b/shadowsocks-libev@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/ss-local -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
+