From 716d2c135750361dd0df174670cb7840a42267ac Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Mon, 31 Jul 2017 10:37:39 +0800 Subject: [PATCH] shadowsocks-libev: add ipv6_first option support Signed-off-by: Yousong Zhou --- net/shadowsocks-libev/Makefile | 2 +- net/shadowsocks-libev/files/shadowsocks-libev.init | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile index 722f685cc..54392cb6c 100644 --- a/net/shadowsocks-libev/Makefile +++ b/net/shadowsocks-libev/Makefile @@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk # PKG_NAME:=shadowsocks-libev PKG_VERSION:=3.0.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION) diff --git a/net/shadowsocks-libev/files/shadowsocks-libev.init b/net/shadowsocks-libev/files/shadowsocks-libev.init index f4887d307..988bc84bc 100644 --- a/net/shadowsocks-libev/files/shadowsocks-libev.init +++ b/net/shadowsocks-libev/files/shadowsocks-libev.init @@ -58,10 +58,12 @@ ss_mkjson_server_conf_() { } ss_mkjson_common_conf() { + [ "$ipv6_first" = 0 ] && ipv6_first=false || ipv6_first=true [ "$fast_open" = 0 ] && fast_open=false || fast_open=true [ "$reuse_port" = 0 ] && reuse_port=false || reuse_port=true cat <<-EOF "use_syslog": true, + "ipv6_first": $ipv6_first, "fast_open": $fast_open, "reuse_port": $reuse_port, ${local_address:+${q}local_address${q}: ${q}$local_address${q},} @@ -264,9 +266,10 @@ validate_common_options_() { "${func:-ss_validate}" "$cfgtype" "$cfg" "$@" \ 'disabled:bool:0' \ - 'verbose:bool:0' \ 'fast_open:bool:0' \ + 'ipv6_first:bool:0' \ 'reuse_port:bool:0' \ + 'verbose:bool:0' \ 'mode:or("tcp_only", "udp_only", "tcp_and_udp")' \ 'mtu:uinteger' \ 'timeout:uinteger' \