diff --git a/README.md b/README.md index 03af22b8..f6a32727 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ It is a port of [shadowsocks](https://github.com/shadowsocks/shadowsocks) created by [@clowwindy](https://github.com/clowwindy) maintained by [@madeye](https://github.com/madeye) and [@linusyang](https://github.com/linusyang). -Current version: 2.1.2 | [Changelog](Changes) +Current version: 2.1.3 | [Changelog](Changes) Travis CI: [![Travis CI](https://travis-ci.org/shadowsocks/shadowsocks-libev.png?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-libev) | Jenkins Matrix: [![Jenkins](https://jenkins.shadowvpn.org/buildStatus/icon?job=Shadowsocks-libev)](https://jenkins.shadowvpn.org/job/Shadowsocks-libev/) @@ -255,7 +255,7 @@ Usage only available on Linux kernel > 3.7.0 [--acl ] config file of ACL (Access Control List) - only available in local mode + only available in local and server mode [-v] verbose mode diff --git a/acl/local.acl b/acl/local.acl new file mode 100644 index 00000000..a6f00c16 --- /dev/null +++ b/acl/local.acl @@ -0,0 +1,6 @@ +127.0.0.1 +::1 +10.0.0.0/8 +172.16.0.0/12 +192.168.0.0/16 +fc00::/7 diff --git a/configure b/configure index 6e9ec482..4e5d5ef5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for shadowsocks-libev 2.1.2. +# Generated by GNU Autoconf 2.69 for shadowsocks-libev 2.1.3. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='shadowsocks-libev' PACKAGE_TARNAME='shadowsocks-libev' -PACKAGE_VERSION='2.1.2' -PACKAGE_STRING='shadowsocks-libev 2.1.2' +PACKAGE_VERSION='2.1.3' +PACKAGE_STRING='shadowsocks-libev 2.1.3' PACKAGE_BUGREPORT='max.c.lv@gmail.com' PACKAGE_URL='' @@ -1336,7 +1336,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures shadowsocks-libev 2.1.2 to adapt to many kinds of systems. +\`configure' configures shadowsocks-libev 2.1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1407,7 +1407,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of shadowsocks-libev 2.1.2:";; + short | recursive ) echo "Configuration of shadowsocks-libev 2.1.3:";; esac cat <<\_ACEOF @@ -1528,7 +1528,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -shadowsocks-libev configure 2.1.2 +shadowsocks-libev configure 2.1.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2051,7 +2051,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by shadowsocks-libev $as_me 2.1.2, which was +It was created by shadowsocks-libev $as_me 2.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2872,7 +2872,7 @@ fi # Define the identity of the package. PACKAGE='shadowsocks-libev' - VERSION='2.1.2' + VERSION='2.1.3' cat >>confdefs.h <<_ACEOF @@ -15636,7 +15636,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by shadowsocks-libev $as_me 2.1.2, which was +This file was extended by shadowsocks-libev $as_me 2.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15702,7 +15702,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -shadowsocks-libev config.status 2.1.2 +shadowsocks-libev config.status 2.1.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 58abd6ab..f1db59b9 100755 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl -*- Autoconf -*- dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.67]) -AC_INIT([shadowsocks-libev], [2.1.2], [max.c.lv@gmail.com]) +AC_INIT([shadowsocks-libev], [2.1.3], [max.c.lv@gmail.com]) AC_CONFIG_SRCDIR([src/encrypt.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR(auto) diff --git a/debian/changelog b/debian/changelog index ff6d8261..5cd2c327 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +shadowsocks-libev (2.1.3-1) unstable; urgency=low + + * Add ACL support to remote server. + + -- Max Lv Sun, 08 Feb 2015 10:59:44 +0900 + shadowsocks-libev (2.1.2-1) unstable; urgency=low * Refine multiple port binding. diff --git a/openwrt/Makefile b/openwrt/Makefile index 4f277811..4df62154 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shadowsocks-libev -PKG_VERSION:=2.1.1 +PKG_VERSION:=2.1.3 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/archive diff --git a/src/local.c b/src/local.c index 348b9c7d..5c4aac79 100644 --- a/src/local.c +++ b/src/local.c @@ -429,7 +429,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) LOGI("connect to %s:%s", host, port); } - if ((acl && request->atyp == 1 && acl_contains_ip(host))) { + if ((acl && (request->atyp == 1 || request->atyp == 3) && acl_contains_ip(host))) { if (verbose) { LOGI("bypass %s:%s", host, port); } diff --git a/src/utils.c b/src/utils.c index 0697c2a6..aff9e744 100644 --- a/src/utils.c +++ b/src/utils.c @@ -264,7 +264,7 @@ void usage() printf( " [--acl ] config file of ACL (Access Control List)\n"); printf( - " only available in local mode\n"); + " only available in local and server mode\n"); printf("\n"); printf( " [-v] verbose mode\n");