Skip to content

Commit

Permalink
Add HTTP/TLS obfuscating. [SIP001] (shadowsocks#1009)
Browse files Browse the repository at this point in the history
Add experimental HTTP/TLS obfuscating as an **optional extension** of shadowsocks protocol.

More discussions can be found here: shadowsocks/shadowsocks-org#26

As this feature is still a SIP (Shadowsocks Improvement Proposal), it's very unstable and experimental. So, 

1. Don't enable it unless you know what it is.
2. Be very careful when using it in production environment.
  • Loading branch information
madeye authored Dec 27, 2016
1 parent 9b2b394 commit 8cb4f81
Show file tree
Hide file tree
Showing 45 changed files with 2,214 additions and 419 deletions.
7 changes: 7 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
shadowsocks-libev (2.6.0-1) unstable; urgency=medium

* Add HTTP/TLS obfuscating.
* Add support of aunch_activate_socket on macOS.

-- Max Lv <max.c.lv@gmail.com> Tue, 27 Dec 2016 16:37:23 +0800

shadowsocks-libev (2.5.6-1) unstable; urgency=medium

* Add outbound ACL for server.
Expand Down
1 change: 0 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It is a port of [Shadowsocks](https://github.com/shadowsocks/shadowsocks)
created by [@clowwindy](https://github.com/clowwindy), which is maintained by
[@madeye](https://github.com/madeye) and [@linusyang](https://github.com/linusyang).

Current version: 2.5.6 | [Changelog](debian/changelog)
Current version: 2.6.0 | [Changelog](debian/changelog)

Travis CI: [![Travis CI](https://travis-ci.org/shadowsocks/shadowsocks-libev.svg?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-libev)

Expand Down
9 changes: 9 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H

/* Define to 1 if you have the `ev' library (-lev). */
#undef HAVE_LIBEV

/* Compiling with pcre support */
#undef HAVE_LIBPCRE

Expand All @@ -88,6 +91,12 @@
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET

/* Define to 1 if you have the `sodium' library (-lsodium). */
#undef HAVE_LIBSODIUM

/* Define to 1 if you have the `udns' library (-ludns). */
#undef HAVE_LIBUDNS

/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H

Expand Down
213 changes: 159 additions & 54 deletions configure
Original file line number Diff line number Diff line change
@@ -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.5.6.
# Generated by GNU Autoconf 2.69 for shadowsocks-libev 2.6.0.
#
# Report bugs to <max.c.lv@gmail.com>.
#
Expand Down Expand Up @@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='shadowsocks-libev'
PACKAGE_TARNAME='shadowsocks-libev'
PACKAGE_VERSION='2.5.6'
PACKAGE_STRING='shadowsocks-libev 2.5.6'
PACKAGE_VERSION='2.6.0'
PACKAGE_STRING='shadowsocks-libev 2.6.0'
PACKAGE_BUGREPORT='max.c.lv@gmail.com'
PACKAGE_URL=''

Expand Down Expand Up @@ -649,7 +649,6 @@ PTHREAD_CC
ax_pthread_config
INET_NTOP_LIB
MV
RM
GZIP
XMLTO
ASCIIDOC
Expand Down Expand Up @@ -1359,7 +1358,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.5.6 to adapt to many kinds of systems.
\`configure' configures shadowsocks-libev 2.6.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1430,7 +1429,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of shadowsocks-libev 2.5.6:";;
short | recursive ) echo "Configuration of shadowsocks-libev 2.6.0:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1567,7 +1566,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
shadowsocks-libev configure 2.5.6
shadowsocks-libev configure 2.6.0
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2090,7 +2089,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.5.6, which was
It was created by shadowsocks-libev $as_me 2.6.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -4329,7 +4328,7 @@ fi

# Define the identity of the package.
PACKAGE='shadowsocks-libev'
VERSION='2.5.6'
VERSION='2.6.0'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -12494,47 +12493,6 @@ $as_echo "no" >&6; }
fi


# Extract the first word of "rm", so it can be a program name with args.
set dummy rm; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_RM+:} false; then :
$as_echo_n "(cached) " >&6
else
case $RM in
[\\/]* | ?:[\\/]*)
ac_cv_path_RM="$RM" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
;;
esac
fi
RM=$ac_cv_path_RM
if test -n "$RM"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
$as_echo "$RM" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


# Extract the first word of "mv", so it can be a program name with args.
set dummy mv; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Expand Down Expand Up @@ -16204,15 +16162,162 @@ $as_echo "#define HAVE_IPv6 1" >>confdefs.h


if test -z "$USE_SYSTEM_SHARED_LIB_TRUE"; then :
else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sodium_init in -lsodium" >&5
$as_echo_n "checking for sodium_init in -lsodium... " >&6; }
if ${ac_cv_lib_sodium_sodium_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsodium $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char sodium_init ();
int
main ()
{
return sodium_init ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_sodium_sodium_init=yes
else
ac_cv_lib_sodium_sodium_init=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sodium_sodium_init" >&5
$as_echo "$ac_cv_lib_sodium_sodium_init" >&6; }
if test "x$ac_cv_lib_sodium_sodium_init" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSODIUM 1
_ACEOF

LIBS="-lsodium $LIBS"

else

as_fn_error $? "Couldn't find libsodium. Try installing libsodium-dev[el]." "$LINENO" 5

fi


else
subdirs="$subdirs libsodium"

fi

ac_config_files="$ac_config_files shadowsocks-libev.pc Makefile libcork/Makefile libipset/Makefile src/Makefile"

if test -z "$USE_SYSTEM_SHARED_LIB_TRUE"; then :
else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dns_dnlen in -ludns" >&5
$as_echo_n "checking for dns_dnlen in -ludns... " >&6; }
if ${ac_cv_lib_udns_dns_dnlen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ludns $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dns_dnlen ();
int
main ()
{
return dns_dnlen ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_udns_dns_dnlen=yes
else
ac_cv_lib_udns_dns_dnlen=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udns_dns_dnlen" >&5
$as_echo "$ac_cv_lib_udns_dns_dnlen" >&6; }
if test "x$ac_cv_lib_udns_dns_dnlen" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBUDNS 1
_ACEOF

LIBS="-ludns $LIBS"

else
as_fn_error $? "Couldn't find libudns. Try installing libudns-dev or udns-devel." "$LINENO" 5
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ev_loop_destroy in -lev" >&5
$as_echo_n "checking for ev_loop_destroy in -lev... " >&6; }
if ${ac_cv_lib_ev_ev_loop_destroy+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lev $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char ev_loop_destroy ();
int
main ()
{
return ev_loop_destroy ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_ev_ev_loop_destroy=yes
else
ac_cv_lib_ev_ev_loop_destroy=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ev_ev_loop_destroy" >&5
$as_echo "$ac_cv_lib_ev_ev_loop_destroy" >&6; }
if test "x$ac_cv_lib_ev_ev_loop_destroy" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBEV 1
_ACEOF

LIBS="-lev $LIBS"

else
as_fn_error $? "Couldn't find libev. Try installing libev-dev[el]." "$LINENO" 5
fi


else
ac_config_files="$ac_config_files libudns/Makefile libev/Makefile"

fi
Expand Down Expand Up @@ -16778,7 +16883,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.5.6, which was
This file was extended by shadowsocks-libev $as_me 2.6.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -16844,7 +16949,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.5.6
shadowsocks-libev config.status 2.6.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.6], [max.c.lv@gmail.com])
AC_INIT([shadowsocks-libev], [2.6.0], [max.c.lv@gmail.com])
AC_CONFIG_SRCDIR([src/encrypt.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(auto)
Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
shadowsocks-libev (2.6.0-1) unstable; urgency=medium

* Add HTTP/TLS obfuscating.
* Add support of aunch_activate_socket on macOS.

-- Max Lv <max.c.lv@gmail.com> Tue, 27 Dec 2016 16:37:23 +0800

shadowsocks-libev (2.5.6-1) unstable; urgency=medium

* Add outbound ACL for server.
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
Expand Down Expand Up @@ -287,6 +286,7 @@ ASCIIDOC_EXTRA =
MANPAGE_XSL = manpage-normal.xsl
XMLTO_EXTRA = -m manpage-bold-literal.xsl
GZIPCMD = @GZIP@
RM = @RM@
@ENABLE_DOCUMENTATION_FALSE@MAN1_DOC =

# Guard against environment variables
Expand Down
Loading

0 comments on commit 8cb4f81

Please sign in to comment.