Commit Graph
276 Commits
Author SHA1 Message Date
Max Lv 3f0d39aee6 Fix #1491 2017-05-03 15:36:58 +08:00
Vladimir Olteanu c6bc21bc1a Make use of struct when parsing method select requests 2017-04-27 07:45:26 +08:00
Daniel b918fd7a77 aviod twice resolving when domain has bypassed ip 2017-04-25 07:13:27 +08:00
Daniel 81006d4690 resolve when acl_match_host failed 2017-04-23 16:46:23 +08:00
Daniel 54acbba2a7 resolve domain so we can bypass domain with geoip 2017-04-23 16:46:23 +08:00
Max Lv 5b2fb72b14 Refine interface 2017-03-27 13:09:29 +08:00
Max Lv 087bfe7f91 Stop the timer properly 2017-03-19 17:19:49 +08:00
Max Lv fa82628dd9 Add delayed connect to ss-local as well 2017-03-17 09:54:20 +08:00
Max Lv 5e13d396ee Refine port binding 2017-03-07 12:05:07 +08:00
Max Lv de0cebb62e Fix a building issue 2017-03-05 16:07:10 +08:00
Max Lv 9241e545f4 Don't apply ACL on DNS port on Android 2017-03-05 15:59:07 +08:00
Sebastien DUPONCHEEL 5074cd336d mptcp: make shadowsocks kernel independant 2017-03-03 20:14:00 +08:00
Max Lv 997ac83702 Fix #1296 2017-02-24 15:57:01 +08:00
Max Lv b655fb2b8f Replace nonce cache with a ping-pong bloom filter (#1282)
* Add Ping-Pong bloom filter

* Refine bloom filter insertion

* Reduce the error rate to 0.00001

* Avoid alignment issue in murmurhash2

* Fix a memory leak

* Fix build on non-GPU targets

* Detect get_current_dir_name in configure

* Update README.md

* Remove redudant bfree()

* Reduce the memory usage for local client

* Fix #1275

* Refine #1275

* Use IP when bypassing SNI domains

* Also apply replay detector on UDP traffic

* Update deb build script

Now build script is able to auto detect system and choose libraries
necessary to build.

Also update the README accordingly.

* Update build script to enable jessie/stretch etc

Also include a few cleanup that simplified pkg installation from
backports repository.
2017-02-20 10:29:32 +08:00
Max Lv d434cd20ec Fix a memory leak 2017-02-17 12:31:22 +08:00
Max Lv ef0402eb10 Add --key option to set key directly (#1207) 2017-02-06 17:02:04 +08:00
Max Lv f45c150e02 Fix redundant options 2017-02-04 09:23:22 +08:00
Max Lv a906d0cfc8 Fix UDP relay issue on Android 2017-02-03 12:33:28 +08:00
Max Lv 7b290f30d6 Make SO_REUSEPORT disabled by default 2017-02-02 21:05:57 +08:00
Max Lv 56658d1c79 Merge pull request #1152 from shadowsocks/sip004
Add AEAD support
2017-02-01 18:19:40 +08:00
anonymous-contributor 98c51cd0d5 Obfsproxy standalone mode (#1156)
* ss-libev: Introduce mode parameter for start_plugin

Since obfsproxy handles client and server in different ways, no matter
standalone or manged mode, so introduce the mode for start_plugin() to
support obfsproxy.

With more comments added to plugin.h for later developers.

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>

* ss-libev: Move SS protocol plugin initialization code to start_ss_plugin

Move SS protocol plugin initialization to start_ss_plugin() function, as
the support for obfsproxy will not use that environment.

Also, remove the use of get_current_dir_name() which is a glibc
extension, such macro hack will just make code less readable.
Not to mention it already screw up code folding of vim.

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>

* ss-libev: Introduce obfsproxy standalone mode support as plugin

Now shadowsocks-libev supports to use obfsproxy as plugin.

Currently we only support to use standalone(proxy) mode of obfsproxy, as
managed mode needs to use SOCKS5 as upstream forward, while ss-libev
doesn't support it yet.

And the output from plugin is just trashed for now.
Support to pipe them into stdout/stderr will be added later.

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>

* ss-libev: doc: Fix wrong cmdline parameter for plugin options

Command line option for plugin options is "--plugin-opts", not the json
option "--plugin_opts"

Fix it.

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
2017-02-01 18:18:43 +08:00
anonymous-contributor a3d0f02c3e Use enum number for val of long options (#1155) 2017-02-01 12:53:20 +08:00
anonymous-contributor 1fc17aca38 Use enum number for val of long options (#1155)
* ss-libev: local: Use enum number for val of long options

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>

* ss-libev: manager: Use enum number for val of long options

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>

* ss-libev: redir: Use enum number for val of long options

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>

* ss-libev: server: Use enum number for val of long options

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>

* ss-libev: tunnel: Use enum number for val of long options

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
2017-02-01 12:49:10 +08:00
Max Lv 3b2a5d1a1f Fix SNI parser 2017-01-31 18:41:57 +08:00
Max Lv 9c7add71dd Fix #1148 2017-01-30 08:41:04 +08:00
Max Lv 4ebe5aeb12 Add SIP004 (AEAD) support 2017-01-29 10:10:44 +08:00
Max Lv 3f8cd982e5 Drop MinGW32 support 2017-01-24 20:10:31 +08:00
Mygod da6a6884a9 Remove prefix option 2017-01-20 18:11:38 +08:00
Max Lv 0acc79b430 Fix UDP relay when plugin enabled 2017-01-14 12:34:05 +08:00
Max Lv 92f0baa789 Update SIP003 interfaces 2017-01-14 10:40:14 +08:00
Max Lv 3fde843ec8 Fix #1061 2017-01-12 10:24:27 +08:00
Max Lv 51135c9184 Fix #1054 2017-01-10 10:41:08 +08:00
Max Lv 94a341fe2c Refine SIGCHLD handling 2017-01-09 17:56:56 +08:00
Max Lv 97c58ad44d Refine signal handling 2017-01-08 16:22:49 +08:00
Max Lv 61b82c45c5 Add SIP003 plugin support (#1044)
https://github.com/shadowsocks/shadowsocks-org/issues/28
2017-01-08 01:10:00 -06:00
Mygod 422b9d3df2 Refine ACL logic in local.c 2016-12-29 06:23:02 -06:00
Max Lv a4f4afdf98 Fix a typo 2016-12-29 12:43:51 +08:00
Max Lv 3383501e7b Disable fast_open when it's not supported 2016-12-29 11:26:32 +08:00
Max Lv 80565eece1 Refine the log of obfuscating 2016-12-28 15:01:17 +08:00
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.
2016-12-27 02:53:25 -06:00
Max Lv 32f52dabf9 Fix #1008 2016-12-27 15:02:13 +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 31a88839d0 Handle large HTTP header properly 2016-12-14 08:51:59 +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 dafadaa621 Fix #990 2016-12-08 19:04:47 +08:00
Max Lv 25cc062e5d Use cork_container_of instead 2016-12-08 15:06:42 +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