Commit graph

15 commits

Author SHA1 Message Date
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
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
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
0931d35319 shadowsocks-libev: ss-rules: eliminiate not needed local var 2017-09-18 13:29:23 +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
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
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
4ca3a7fcec shadowsocks-libev: ss-rules: rename usage func
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
Yousong Zhou
8ad2f36550 shadowsocks-libev: ss-rules: add executable bits 2017-07-23 23:29:12 +08:00
Yousong Zhou
b61af9703e shadowsocks-libev: rewrite
- Selecting only a single or subset of all components of shadowsocks-libev is
  now possible (this is the main motivation behind the rewrite)
- Configuring multiple instances of the same component is now also possible
- Same option names as with the json config
- Unified configuration generation method for each component
- Add support for ss-local, ss-tunnel, ss-server
- Most data validation is now done with validate_data
- USE_PROCD=1
- Update ss-rules with the one from shadowsocks/luci-app-shadowsocks
- Add README.md
- Set myself as the maintainer

Addresses #4435

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-07-02 10:01:53 +08:00
Jian Chang
a2a2d146bc shadowsocks-libev: bump version
Fix the multiple UDP source port issue.
Allow using different IP and ports for TCP and UDP

Signed-off-by: Jian Chang <aa65535@live.com>
2015-07-22 16:30:32 +08:00
aa65535
024bd84282 shadowsocks-libev: add package
Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes.

Signed-off-by: aa65535 <aa65535@live.com>
2015-07-03 11:01:32 +08:00