shadowsocks-libev: bump to version 3.1.0
Notable changes since 3.0.8 ede744a: depends on libcares now instead of libudns 1c64829: new cmdline option --no-delay for not turning off TCP_NODELAY 9201619: ss-local: check if client supports socks5 protocol and no-auth-required method f8283fc: Fix potential buffer overflow when parsing json config 380fddb: redir: fix conversion from DSCP to ToS The two patches are now in the offical repo
This commit is contained in:
parent
0931d35319
commit
bdb01ebc55
|
@ -13,12 +13,12 @@ include $(TOPDIR)/rules.mk
|
|||
# - check if default mode has changed from being tcp_only
|
||||
#
|
||||
PKG_NAME:=shadowsocks-libev
|
||||
PKG_VERSION:=3.0.8
|
||||
PKG_RELEASE:=16
|
||||
PKG_VERSION:=3.1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=3bdf7f8f89050aee896496fd86b6b7ef694754f0b8cd97c4b5a04d1d3e5c2e5b
|
||||
PKG_HASH:=3b6493ebdcfff1eb31faf34d164d57049f7253ff5bffafa6ce2263c9ac123f31
|
||||
|
||||
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
|
||||
|
||||
|
@ -56,7 +56,7 @@ define Package/shadowsocks-libev/Default
|
|||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=shadowsocks-libev $(1)
|
||||
URL:=https://github.com/shadowsocks/shadowsocks-libev
|
||||
DEPENDS:=+libev +libmbedtls +libpcre +libpthread +libsodium +libudns +shadowsocks-libev-config +zlib
|
||||
DEPENDS:=+libcares +libev +libmbedtls +libpcre +libpthread +libsodium +shadowsocks-libev-config +zlib
|
||||
endef
|
||||
|
||||
define Package/shadowsocks-libev-$(1)/install
|
||||
|
|
|
@ -1,151 +0,0 @@
|
|||
From a91d70dd37e9555d104629538890d44ef355c772 Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Mon, 26 Jun 2017 14:49:36 +0800
|
||||
Subject: [PATCH 1/2] decouple use_syslog from pid_flags
|
||||
|
||||
Sometimes we need processes to run in the foreground to be supervised
|
||||
and at the same time use syslog facility instead of logging its stdout,
|
||||
stderr output
|
||||
---
|
||||
src/jconf.c | 6 ++++++
|
||||
src/local.c | 2 +-
|
||||
src/manager.c | 2 +-
|
||||
src/redir.c | 2 +-
|
||||
src/server.c | 2 +-
|
||||
src/tunnel.c | 2 +-
|
||||
src/utils.h | 18 +++++++++++-------
|
||||
7 files changed, 22 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/jconf.c b/src/jconf.c
|
||||
index 3c58148..05445c3 100644
|
||||
--- a/src/jconf.c
|
||||
+++ b/src/jconf.c
|
||||
@@ -313,6 +313,12 @@ read_jconf(const char *file)
|
||||
check_json_value_type(value, json_boolean,
|
||||
"invalid config file: option 'ipv6_first' must be a boolean");
|
||||
conf.ipv6_first = value->u.boolean;
|
||||
+#ifdef HAS_SYSLOG
|
||||
+ } else if (strcmp(name, "use_syslog") == 0) {
|
||||
+ check_json_value_type(value, json_boolean,
|
||||
+ "invalid config file: option 'use_syslog' must be a boolean");
|
||||
+ use_syslog = value->u.boolean;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/local.c b/src/local.c
|
||||
index 78f6d29..e4bd477 100644
|
||||
--- a/src/local.c
|
||||
+++ b/src/local.c
|
||||
@@ -1522,8 +1522,8 @@ main(int argc, char **argv)
|
||||
local_addr = "127.0.0.1";
|
||||
}
|
||||
|
||||
+ USE_SYSLOG(argv[0], pid_flags);
|
||||
if (pid_flags) {
|
||||
- USE_SYSLOG(argv[0]);
|
||||
daemonize(pid_path);
|
||||
}
|
||||
|
||||
diff --git a/src/manager.c b/src/manager.c
|
||||
index 6e7197c..338ab85 100644
|
||||
--- a/src/manager.c
|
||||
+++ b/src/manager.c
|
||||
@@ -1149,8 +1149,8 @@ main(int argc, char **argv)
|
||||
timeout = "60";
|
||||
}
|
||||
|
||||
+ USE_SYSLOG(argv[0], pid_flags);
|
||||
if (pid_flags) {
|
||||
- USE_SYSLOG(argv[0]);
|
||||
daemonize(pid_path);
|
||||
}
|
||||
|
||||
diff --git a/src/redir.c b/src/redir.c
|
||||
index 3809411..fae8d54 100644
|
||||
--- a/src/redir.c
|
||||
+++ b/src/redir.c
|
||||
@@ -1140,8 +1140,8 @@ main(int argc, char **argv)
|
||||
#endif
|
||||
}
|
||||
|
||||
+ USE_SYSLOG(argv[0], pid_flags);
|
||||
if (pid_flags) {
|
||||
- USE_SYSLOG(argv[0]);
|
||||
daemonize(pid_path);
|
||||
}
|
||||
|
||||
diff --git a/src/server.c b/src/server.c
|
||||
index 534dbd8..1c25c74 100644
|
||||
--- a/src/server.c
|
||||
+++ b/src/server.c
|
||||
@@ -1726,8 +1726,8 @@ main(int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
+ USE_SYSLOG(argv[0], pid_flags);
|
||||
if (pid_flags) {
|
||||
- USE_SYSLOG(argv[0]);
|
||||
daemonize(pid_path);
|
||||
}
|
||||
|
||||
diff --git a/src/tunnel.c b/src/tunnel.c
|
||||
index 77c7380..2419fa0 100644
|
||||
--- a/src/tunnel.c
|
||||
+++ b/src/tunnel.c
|
||||
@@ -1022,8 +1022,8 @@ main(int argc, char **argv)
|
||||
local_addr = "127.0.0.1";
|
||||
}
|
||||
|
||||
+ USE_SYSLOG(argv[0], pid_flags);
|
||||
if (pid_flags) {
|
||||
- USE_SYSLOG(argv[0]);
|
||||
daemonize(pid_path);
|
||||
}
|
||||
|
||||
diff --git a/src/utils.h b/src/utils.h
|
||||
index 2603e85..53f3983 100644
|
||||
--- a/src/utils.h
|
||||
+++ b/src/utils.h
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <android/log.h>
|
||||
#define USE_TTY()
|
||||
-#define USE_SYSLOG(ident)
|
||||
+#define USE_SYSLOG(ident, _cond)
|
||||
#define LOGI(...) \
|
||||
((void)__android_log_print(ANDROID_LOG_DEBUG, "shadowsocks", \
|
||||
__VA_ARGS__))
|
||||
@@ -53,7 +53,7 @@
|
||||
extern FILE *logfile;
|
||||
#define TIME_FORMAT "%Y-%m-%d %H:%M:%S"
|
||||
#define USE_TTY()
|
||||
-#define USE_SYSLOG(ident)
|
||||
+#define USE_SYSLOG(ident, _cond)
|
||||
#define USE_LOGFILE(ident) \
|
||||
do { \
|
||||
if (ident != NULL) { logfile = fopen(ident, "w+"); } } \
|
||||
@@ -99,11 +99,15 @@ extern int use_syslog;
|
||||
use_tty = isatty(STDERR_FILENO); \
|
||||
} while (0)
|
||||
|
||||
-#define USE_SYSLOG(ident) \
|
||||
- do { \
|
||||
- use_syslog = 1; \
|
||||
- openlog((ident), LOG_CONS | LOG_PID, 0); } \
|
||||
- while (0)
|
||||
+#define USE_SYSLOG(_ident, _cond) \
|
||||
+ do { \
|
||||
+ if (!use_syslog && (_cond)) { \
|
||||
+ use_syslog = 1; \
|
||||
+ } \
|
||||
+ if (use_syslog) { \
|
||||
+ openlog((_ident), LOG_CONS | LOG_PID, 0); \
|
||||
+ } \
|
||||
+ } while (0)
|
||||
|
||||
#define LOGI(format, ...) \
|
||||
do { \
|
||||
--
|
||||
2.12.2
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
From afe796ce6e7a4164459009c58d7e60862edb0be3 Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Tue, 1 Aug 2017 15:21:38 +0800
|
||||
Subject: [PATCH 2/2] syslog with daemon facility instead of kern (0)
|
||||
|
||||
---
|
||||
src/utils.h | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/utils.h b/src/utils.h
|
||||
index 53f3983..3b624e8 100644
|
||||
--- a/src/utils.h
|
||||
+++ b/src/utils.h
|
||||
@@ -99,14 +99,14 @@ extern int use_syslog;
|
||||
use_tty = isatty(STDERR_FILENO); \
|
||||
} while (0)
|
||||
|
||||
-#define USE_SYSLOG(_ident, _cond) \
|
||||
- do { \
|
||||
- if (!use_syslog && (_cond)) { \
|
||||
- use_syslog = 1; \
|
||||
- } \
|
||||
- if (use_syslog) { \
|
||||
- openlog((_ident), LOG_CONS | LOG_PID, 0); \
|
||||
- } \
|
||||
+#define USE_SYSLOG(_ident, _cond) \
|
||||
+ do { \
|
||||
+ if (!use_syslog && (_cond)) { \
|
||||
+ use_syslog = 1; \
|
||||
+ } \
|
||||
+ if (use_syslog) { \
|
||||
+ openlog((_ident), LOG_CONS | LOG_PID, LOG_DAEMON); \
|
||||
+ } \
|
||||
} while (0)
|
||||
|
||||
#define LOGI(format, ...) \
|
||||
--
|
||||
2.12.2
|
||||
|
Loading…
Reference in New Issue