Commit Graph

61 Commits

Author SHA1 Message Date
Huangbin Zhan 0ec746ccb6 treewide: add conffiles
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2020-05-09 06:06:43 +08:00
Yousong Zhou 2f73c4853b shadowsocks-libev: ignore error from flushing route table
Linux kernel and iproute2 together now implement strict checking of the
existence of route tables.

Previously kernel does not support filtering by table id, now it does
and will error with nlmsgerr "ipv4: FIB table does not exist".

Previously iproute2 dump all routes and filter by table id in userspace,
now this has changed with iproute2 commit c7e6371bc4af ("ip route: Add
protocol, table id and device to dump request")

Error scene

	root@OpenWrt:/# ip route flush table 100
	Error: ipv4: FIB table does not exist.
	Flush terminated
	root@OpenWrt:/# echo $?
	2

Fixes: https://github.com/openwrt/packages/issues/12095
Ref: https://lists.openwall.net/netdev/2019/05/02/105
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-05-06 21:38:53 +08:00
Yousong Zhou b758d897a9 shadowsocks-libev: bump to version 3.3.4
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-01-13 10:14:50 +08:00
Yousong Zhou 97bada594b shadowsocks-libev: bump to version 3.3.3
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-11-04 04:54:43 +00:00
Yousong Zhou 29991142e2 shadowsocks-libev: bump to version 3.3.2
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-10-14 08:23:07 +00:00
Sven Eckelmann bbb1ea7345 treewide: Change .*GPL.*+ licenses to SPDX compatible identifier
The CONTRIBUTING.md requests an (or multiple) SPDX identifier for GPL
licenses. But a lot of packages did use a different, non-SPDX style with a
"+" at the end instead of "-or-later".

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-09-10 07:45:15 +02:00
Yousong Zhou 5d7d44d605 shadowsocks-libev: bump to version 3.3.1
This should fix openwrt/packages#9346 ("shadowsocks-libev: undefined
behavior from unaligned access")

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-08-12 08:21:00 +00:00
Yousong Zhou 5d34dd284a shadowsocks-libev: bump to version 3.3.0
The most notable change was that socket data buffer has been increased
from 2KB to 16KB

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-06-11 17:21:03 +00:00
Deng Qingfang c54a826086 shadowsocks-libev: size optimizations
Use link-time optimization and --gc-sections --as-needed ldflags
Reduces ipk size by 20%

Remove unnecessary dependencies

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
2019-06-10 20:31:10 +08:00
Yousong Zhou afe7d34240 shadowsocks-libev: move plugin options to server section
Plugin options are properties of shadowsocks deployment as a whole,
including both server and each client components.  Multiple client
instances accessing the same server will need to share the same plugin
settings

With this change, plugin options will need to specified to "server" and
"ss-server" section, not to each component section.

Fixes: c19e949 ("shadowsocks-libev: add plugin options support")
Reference: https://github.com/openwrt/packages/issues/8903#issuecomment-489674137
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-05-09 06:13:44 +00:00
Yousong Zhou c19e949380 shadowsocks-libev: add plugin options support
Reference: https://github.com/openwrt/packages/issues/8903
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-05-06 15:11:09 +00:00
Yousong Zhou d63fc1ccd7 shadowsocks-libev: bump to version 3.2.5
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-03-15 02:06:55 +00:00
Yousong Zhou 6c14eae757 shadowsocks-libev: bump to version 3.2.4
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-03-04 03:35:19 +00:00
Yousong Zhou b4452ce160 shadowsocks-libev: move --no-delay into json config file
It was introduced in 3.1.0 as a command line argument and was part of
the json config since 3.1.1

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-02-19 21:08:23 +08:00
Yousong Zhou 9cfa29b873 shadowsocks-libev: use jshn.sh for making json config
As suggested by Jeffery To in openwrt/packages#8233

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-02-19 21:08:23 +08:00
Yousong Zhou 40e7e241a3 shadowsocks-libev: flush ipv6 ss-rules on service stop
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-02-16 07:38:13 +00:00
Yousong Zhou b69810b8ec shadowsocks-libev: ss-rules: fix flushing ipv6 rules
"-6" has to be the first argument

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-02-12 11:53:16 +00:00
Yousong Zhou 8cba4a7f8b shadowsocks-libev: ss-rules: tweak for readability
- quash errors on detection of ipv6 nat
 - remove unnecessary rule args "--comment ..." and "-p ..."

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-02-12 11:49:40 +00:00
Yousong Zhou c84a66112c shadowsocks-libev: flush ss rules on entry
Fixes issue reported in openwrt/luci#2527

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-02-11 13:34:56 +00:00
Yousong Zhou c059c283fe shadowsocks-libev: ss-rules: simplify grep_af
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-01-22 07:52:42 +00:00
Yousong Zhou 5fd4687164 shadowsocks-libev: ss-rules: add ipv6 support
It will require support from ip6tables-mod-nat.  The added functionality
will be skipped otherwise.

For $o_dst_bypass6_, include only address blocks in link [1] whose
"Globally Reachable" field are explicitly "False"

Closes openwrt/packages#7508

 [1] IANA IPv6 Special-Purpose Address Registry,
     https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-01-21 15:19:32 +08:00
Yousong Zhou 823a446a94 shadowsocks-libev: bump to version 3.2.3
A short while after 3.2.2 was tagged, it was superseded by 3.2.3 with a
minor fix for aligned memory allocation for 32-bit arch

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-12-03 01:49:37 +00:00
Yousong Zhou 115ca32d01 shadowsocks-libev: bump to version 3.2.1
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-11-12 03:01:30 +00:00
Yousong Zhou 932cb25b41 shadowsocks-libev: bump to version 3.2.0
Changes summarized by upstream maintainer

  * Add MinGW support by @linusyang.
  * Refine c-ares integration by @xnoreq.
  * Fix building issues with GCC8 by @FlyingheartCN.
  * Minor bug fixes.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-06-04 11:47:17 +08:00
Yousong Zhou 805c6b0ecf shadowsocks-libev: remove unnecessary curly braces
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-02-02 17:26:53 +08:00
Yousong Zhou 4d211674ce shadowsocks-libev: bump to version 3.1.3
Notable changes since 3.1.2

    afce1b3 eliminate timered delay between handshake and data stream #1572
    539bf6e sni in redir removed and no disable_sni option #1876
    1d94442..29ff5d3 udprelay fix (no idea what's the problem...) #1883

Now disable_sni=true is the default.  Existing uci configs setting it
will be a nop

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-02-02 17:24:45 +08:00
Yousong Zhou ef2a2962e1 shadowsocks-libev: remove option manager_address
It's an option that is supposed to be fed by ss-manager.  It can be
in the form of host:port or path to unix dgram socket.  Drop it now with
the assumption that it has no real user at the moment

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-01-04 14:48:19 +08:00
Yousong Zhou 4e2336c5f4 shadowsocks-libev: bump to version 3.1.2
Notable changes since 3.1.1

 - 57ab828 fix possible use-after-free in ss-server
 - 65e9d23 filter through acl first before doing sni detection
 - b26cbc2 another attack on null ref
 - d237a05 udprelay: fix off-by-one bug
 - 0c3cf8b fix runtime TFO detection
 - d445ea9 Linux 4.11 TFO socket option support
2018-01-02 10:39:39 +08:00
Yousong Zhou a1fadbde07 shadowsocks-libev: new option no_delay
--no-delay is a new cmdline argument introduced in 3.1.0 to NOT turn off
TCP_NODELAY socket option, i.e. keeping it's default value without
setting it explicitly.  This can be potentially useful for interactive
traffics

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-01-02 10:34:50 +08:00
Yousong Zhou 3ef23b9ebe shadowsocks-libev: bump to version 3.1.1
Notable changes since 3.1.0

    26ae365: fix possible socks5 exchange corruption caused by bad
             state transition when parsing responses
    f19a96e: fix segfault when presented with config {"mode": null}

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-11-21 17:29:53 +08:00
Yousong Zhou bdb01ebc55 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
2017-09-18 13:29:24 +08:00
Yousong Zhou 0931d35319 shadowsocks-libev: ss-rules: eliminiate not needed local var 2017-09-18 13:29:23 +08:00
Yousong Zhou fd0f3aa930 shadowsocks-libev: minor tweak without functional change
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-09-14 11:25:34 +08:00
Yousong Zhou d4e9a4f098 shadowsocks-libev: more common default config
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-30 17:45:56 +08:00
Yousong Zhou fac1082803 shadowsocks-libev: ss-rules: query resolveip only for ipv4 addresses
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-30 17:40:05 +08:00
Yousong Zhou 5f95c0a2e3 shadowsocks-libev: ss-rules: fix multiple continous \x20 in $o_ifnames
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-30 10:13:30 +08:00
Yousong Zhou 8d7c2f2073 shadowsocks-libev: shorten init script by 2 lines
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-30 10:13:30 +08:00
Yousong Zhou ec6f7f7f53 shadowsocks-libev: ss-rules: resolve server names before adding to ipset
ipset command line utility supports ranges of address: IP-IP, but the
dash character is also valid character in host names.  If we have a
remote server ss-00.example.com, ipset may complain that

    ipset v6.32: Syntax error: cannot parse ss: resolving to IPv4 address failed

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-30 10:13:29 +08:00
Yousong Zhou cff4f65d81 shadowsocks-libev: fix validation of list option
ubox 'list' type is for validating multiple elements separated by
tabs/whitespaces in a single value.  E.g. The following should not be
accepted

    list src_ip_bypass '1.2.3.4 4.3.2.1'

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-30 10:13:29 +08:00
Yousong Zhou d6d0a7612a shadowsocks-libev: ss-rules: new bool option --dst-forward-recentrst
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-22 19:52:14 +08:00
Yousong Zhou df395767d3 shadowsocks-libev: rewrite ss-rules
- New UCI options ifnames, dst_default
 - UCI options src_ips_xxx now accept cidr as their values
 - Export ipset names as part of the interface so that it can be
   depended on and used by other programs
 - Bypass only remote servers used ss-redir instances, so that it's
   possible to let other servers to go through existing re-redir
   instances

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-20 02:21:54 +08:00
Leong Hui Wong b26ba6634d shadowsocks-libev: Update AEAD cipher names.
Signed-off-by: Leong Hui Wong <wong.leonghui@gmail.com>
2017-08-19 20:56:54 +08:00
Yousong Zhou d4ed4c1f21 shadowsocks-libev: setting mode with default value tcp_only
This is the default value taken by ss-server and ss-redir.  After this
change ss_rules section can still use those ss-redir instances who do
not have mode explicitly specified.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-13 12:39:01 +08:00
Yousong Zhou 682b0c2be7 shadowsocks-libev: support disable_sni for ss_server section
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-04 22:19:30 +08:00
Yousong Zhou 49dcdca5d0 shadowsocks-libev: backport patch for logging with daemon facility
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-02 14:34:49 +08:00
Yousong Zhou 716d2c1357 shadowsocks-libev: add ipv6_first option support
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-08-02 14:34:40 +08:00
Yousong Zhou 7f0adf9631 shadowsocks-libev: bump to version 3.0.8
Notable changes since 3.0.7

 - ss-local, ss-redir: ipv6_first awareness
 - ss-server: ppbloom_add only after 1st decryption succeeds

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-07-31 10:23:47 +08:00
Yousong Zhou 2f910479cf shadowsocks-libev: use xargs -r just in case
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-07-28 15:10:46 +08:00
Yousong Zhou b7f69c0633 shadowsocks-libev: fix compiling with stale object files
This will cause various kinds of failures in the buildbot

    ➜  shadowsocks-libev-3.0.7 git:(master) find . -name '*.o' -o -name '*.lo'
    ./libbloom/murmur2/libbloom_la-MurmurHash2.o
    ./libbloom/murmur2/libbloom_la-MurmurHash2.lo
    ./libbloom/libbloom_la-bloom.lo
    ./libbloom/libbloom_la-bloom.o
    ➜  shadowsocks-libev-3.0.7 git:(master) ls -l libbloom/murmur2
    total 24
    -rw-r--r-- 1 yousong yousong  324 Jun 27 14:17 libbloom_la-MurmurHash2.lo
    -rw-r--r-- 1 yousong yousong 4168 Jun 27 14:17 libbloom_la-MurmurHash2.o
    -rw-r--r-- 1 yousong yousong 1344 Feb 17 08:47 MurmurHash2.c
    -rw-r--r-- 1 yousong yousong  142 Feb 17 08:47 murmurhash2.h
    -rw-r--r-- 1 yousong yousong  213 Feb 17 08:47 README
    ➜  shadowsocks-libev-3.0.7 git:(master) file ./libbloom/murmur2/libbloom_la-MurmurHash2.o
    ./libbloom/murmur2/libbloom_la-MurmurHash2.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
    ➜  shadowsocks-libev-3.0.7 git:(master)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-07-28 15:06:24 +08:00
Yousong Zhou 1999396443 shadowsocks-libev: configure options for release build
- It's a common practice that assert should be ignored in release build
 - Whether to enable ssp should be decided by the config of build system

This was taken from Makefile in shadowsocks/openwrt-shadowsocks.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-07-26 10:17:48 +08:00