1338 Commits
Author SHA1 Message Date
Max Lv 8cb4f81eba Add HTTP/TLS obfuscating. [SIP001] (#1009)
Add experimental HTTP/TLS obfuscating as an **optional extension** of shadowsocks protocol.

More discussions can be found here: https://github.com/shadowsocks/shadowsocks-org/issues/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.
v2.6.0
2016-12-27 02:53:25 -06:00
Max Lv 9b2b394249 Update ACL 2016-12-27 16:02:07 +08:00
Max Lv 32f52dabf9 Fix #1008 2016-12-27 15:02:13 +08:00
Max Lv 8e52029d31 Fix #1006 2016-12-23 18:17:25 +08:00
Liu DongMiao d2b7e6702d Support mac os x's launch_activate_socket (#1003)
In Mac OS X 10.10, `launch_activate_socket` was introduced.
So whenever the port is requested, the `launchd` can launch the program
dynamically. A possible plist may like this:

```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>com.github.shadowsocks</string>
        <key>ProgramArguments</key>
        <array>
                <string>/path/to/ss-local</string>
                <string>-s</string>
                <string>server host</string>
                <string>-p</string>
                <string>server port</string>
                <!-- the -l and -b can be ommited, as launchd takes over it -->
                <string>-k</string>
                <string>password</string>
                <string>-m</string>
                <string>method</string>
                <string>-t</string>
                <string>timeout</string>
                <string>-A</string>
        </array>
        <key>Sockets</key>
        <dict>
                <!-- the name is hard coded in ss-local -->
                <key>Listeners</key>
                <dict>
                        <key>SockNodeName</key>
                        <string>127.0.0.1</string>
                        <key>SockServiceName</key>
                        <string>socks</string>
                </dict>
        </dict>
</dict>
</plist>
```

The magic is `launchd` will listen to the `SockServiceName`, when the port
is requested, the `ss-local` will be launched.
2016-12-22 01:06:22 -06:00
Max Lv 134a35fd6c Refine addr resolving 2016-12-20 22:17:04 +08:00
Max Lv 6be61ccaea Refine regex 2016-12-17 07:27:32 +08:00
Max Lv 16765857af Refine ACLs 2016-12-16 20:16:20 +08:00
Max Lv a4a69a3746 Refine ACL 2016-12-16 20:09:55 +08:00
Max Lv a02a67dcf0 Update GFWList 2016-12-16 15:20:33 +08:00
Max Lv 63f50dcbe7 Refine ACL 2016-12-15 20:54:43 +08:00
Mygod 82943612fd Update gfwlist 2016-12-15 12:21:12 +08:00
Max Lv 31a88839d0 Handle large HTTP header properly 2016-12-14 08:51:59 +08:00
Max Lv 1153c89bcb Update gfwlist.acl 2016-12-11 12:39:09 +08:00
Syrone Wong e6c0780435 memset zero before using
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-12-10 21:37:56 -06:00
Max Lv 001e6da00d Fix #993 2016-12-08 22:02:45 +08:00
Max Lv dafadaa621 Fix #990 2016-12-08 19:04:47 +08:00
Syrone Wong 9db8c3abe8 zeroize some structs before using
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-12-08 04:11:43 -06:00
Syrone Wong cbe12c30fe Update uthash to latest
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-12-08 04:10:52 -06:00
Max Lv b7e5a97a74 Fix building error of ss-redir 2016-12-08 15:20:08 +08:00
Max Lv 25cc062e5d Use cork_container_of instead 2016-12-08 15:06:42 +08:00
Max Lv 65843154cf Fix building error 2016-12-08 14:51:14 +08:00
Max Lv a63a33861f Add container_of 2016-12-08 14:48:40 +08:00
Syrone Wong baff29e970 Fix issues found by cppcheck
- GNU treats void* as char* when doing pointer arithmetic, so let's make it clear
- Fix memory leak, save copy from malloc() and pass the original pointer to free()
- minor type mismatches

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-12-07 22:30:47 -06:00
Max Lv 8b358c59c7 Disable resolution retry after startup 2016-12-08 12:11:55 +08:00
Syrone Wong 43a236d3ca Clarify calculation precedence for '&' and '?' (#986) 2016-12-07 20:05:36 -06:00
Max Lv a987783b2a Fix a potential memory leak 2016-12-04 13:52:59 +08:00
Max Lv 24b407c37d Fix #981 2016-12-04 11:53:42 +08:00
Rayson Zhu 135ceedb14 revert pwd->name to user when error occurs (#979) 2016-11-28 22:02:45 -06:00
Rayson Zhu 4034190b15 Change supplementary groups after setgid. (#977) 2016-11-28 16:42:35 -06:00
Max Lv fd388e0502 Fix #972 2016-11-26 13:34:41 +08:00
Rayson zhu 7bbf81068b fix broken EL6 packaging support
Tests show that EL6 is too old to support `%elif` statement (which is very stupid).
And revert dependency `openssl-libs` to `openssl` because of
inconsistent names in EL6.
2016-11-25 03:13:40 -06:00
Rayson zhu 5d85590f7c support packaging for openSUSE 2016-11-25 02:13:10 -06:00
Rayson zhu 1c738323a7 Similar fix as #967 2016-11-25 02:11:16 -06:00
Rayson zhu a8fdd77fbf add user config option 2016-11-25 02:10:17 -06:00
tim-le aca5f5ddb4 Fix #966 again (#967)
* SO_REUSEADDR for remote sockfd

avoid  ERROR: bind_to_address: Address already in use

* set addr->sin_port to be 0

* Update server.c

* Update server.c

* Update server.c

* Update server.c

* Update server.c

* Update server.c

* Update server.c
2016-11-20 03:24:27 -06:00
Max Lv dbc530ccb1 Fix #966 2016-11-20 15:39:07 +08:00
Max Lv c0b26e380e Fix #985 2016-11-20 15:36:21 +08:00
Rayson zhu b80c159758 RPM packaing: move .la and .so to devel subpackage 2016-11-20 00:06:16 -06:00
Rayson zhu 156cd88776 check for libsodium, libev, libudns if configured with system library 2016-11-20 00:05:59 -06:00
Max Lv f14d37f09c Merge pull request #962 from vfreex/packaging-bash-completion
Package bash completion file
2016-11-20 00:05:39 -06:00
Rayson zhu 9754edda9c package bash completion files 2016-11-20 12:58:31 +08:00
Rayson zhu 48d159504f fix -l completion 2016-11-20 01:32:18 +08:00
Rayson zhu a6ef853e2b will not print user name 2016-11-20 01:31:58 +08:00
Max Lv 28a61096f3 Merge pull request #959 from vfreex/fix-configure-enable-system-shared-lib
Fix broken `configure --enable-system-shared-lib`
2016-11-19 06:37:34 -06:00
Rayson zhu 54f607e0ec Fix broken configure --enable-system-shared-lib
The following error will occur when configuring with --enable-system-shared-lib:

```
/usr/bin/rm: cannot remove 'libtoolT': No such file or directory
```

This issue is caused by overwriting gnu make variable `RM` with `rm`,
whose default value is `rm -f` (https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html).
2016-11-19 19:17:43 +08:00
Max Lv a7350a19b3 Merge pull request #958 from vfreex/fix-completion-ciphers
Bash completion: add missing cipher list
2016-11-18 03:40:12 -06:00
Rayson Zhu a21f515d37 Bash completion: add missing cipher list 2016-11-18 16:19:09 +08:00
Max Lv 936cbaf4fd Merge pull request #957 from vfreex/feature-bash-completion
Add bash completion files
2016-11-18 01:52:52 -06:00
Rayson Zhu cfaadbdd62 Add bash completion files 2016-11-18 15:19:03 +08:00