195 Commits
Author SHA1 Message Date
Max Lv 14dd82045e Refine json config handling. #2308 2019-03-05 09:52:44 +08:00
Max Lv 144138788b Refine ipv6 only handling. #2300 2019-03-01 07:32:25 +08:00
Max Lv 404ec62b79 Fix #2285 2019-02-18 09:59:40 +08:00
Max Lv 782311ad2b Refine ss_align interfaces 2019-01-22 12:59:29 +08:00
Max Lv 7ad2df9615 Remove all connection timeout from local clients 2019-01-17 21:36:49 +08:00
Mygod 641e4ed9c8 Refine passing plugin args
Refine 68f885c271. Somehow I postponed this change for 8 months. Good job me!
2019-01-17 00:48:29 +08:00
Max Lv dd5e954ab4 Clean up 2018-09-02 17:21:23 -07:00
Max Lv a377c5114a Fix #1974 2018-03-13 02:58:48 -07:00
ksqsf 3c3c50b4f8 Search XDG_CONFIG_HOME for user-specific config 2018-02-11 00:30:09 +08:00
Max Lv 85a64ae836 Bump version 2018-01-15 17:25:03 -08:00
Max Lv 512891c66f Refine SNI parser in ss-local 2018-01-07 20:20:15 -08:00
Max Lv 539bf6e66d Avoid reconstructing requests with SNI/HTTP parser 2018-01-07 18:17:21 -08:00
Max Lv 3ed6019e1f Fix #1843 2017-12-20 09:20:01 +08:00
Max Lv 0c3cf8beb3 Handle runtime fast open check correctly 2017-12-01 09:49:15 +08:00
Max Lv 79f0e3c68d Fix uninitialized variables 2017-11-28 10:33:26 +08:00
Max Lv aebb79c222 Refine build on platform without TCP_FASTOPEN 2017-11-27 14:02:11 +08:00
Max Lv a15251b2fc Fix the missing addr reset 2017-11-26 16:28:15 +08:00
Max Lv 2cad381036 Refine TFO in redir and server mode 2017-11-26 14:32:26 +08:00
Max Lv d445ea938b Refine TFO interface. #1800 2017-11-26 13:12:00 +08:00
星野ハジメ cc1bb4cf62 format with .uncrustify.cfg (#1759)
* format with .uncrustify.cfg

format with .uncrustify.cfg

* format with .uncrustify.cfg

* format with .uncrustify.cfg exclude json.* base64.* uthash.h

* format with .uncrustify.cfg exclude json.* base64.* uthash.h
2017-10-30 21:28:53 +08:00
星野ハジメ 44027da326 enable TCP_NODELAY from config file (#1757)
* Fix #1739

Refine #1739

* enable TCP_NODELAY from config file
2017-10-30 10:35:14 +08:00
Vladimir Olteanu 82694c8f19 properly set recv_ctx->connected 2017-09-16 14:19:43 +08:00
Vladimir Olteanu 1c64829dfa Add command-line argument for keeping TCP_NODELAY (#1685) 2017-09-15 09:17:00 +08:00
Max Lv ede744ae7c Add c-ares support (#1655)
* Replace udns with c-ares

* Get IO loop work

* Clean up

* Avoid initializing nameservers each query

* Add ARES_OPT_SERVERS

* Refine resolv_cancel

* Fix a memory leak

* Replace udns.h with ares.h

* Fix all inet_* fucntions

* Clean up

* Enable servers_ports when VERSION_MINOR >= 11

* Avoid ares_inet_XtoX

* Handle multipe nameservers correctly

* Use ares_set_servers for IPv4 and IPv6 mixed list

* Refine c-ares for udprelay

* Refine ares_set_servers()

* Refine the timer based on ares_timeout

* Avoid resolv_cancel

* Fix an issue of null pointer

* Fix another null pointer issue

* Refine the order of resolv_shutdown

* Fix the corrupted ev io
2017-08-31 09:16:07 +08:00
Daniel 8e6ee153f0 Replace unchecked malloc with ss_malloc.
In a few places `malloc` was being used without checking the return for
a `NULL` pointer. There's already a wrapper (`ss_malloc`) in
`util.c` that performs this check and exits if it fails so this commit
replaces the unsafe `malloc`s with `ss_malloc`s.
2017-08-06 18:05:18 -07:00
DUPONCHEEL Sébastien 380fddbba9 redir: fix dscp to tos conversion 2017-08-06 06:58:31 -07:00
Yousong Zhou db1728c76d decouple use_syslog from pid_flags
Sometimes we need processes to run in the foreground to be supervised
and at the same time use syslog facility instead of logging its stdout,
stderr output
2017-08-01 22:59:38 -07:00
Yifu Yu 4ea517daf3 Fix: ss-local and ss-redir should also respect ipv6_first. 2017-07-14 01:51:35 -05:00
Vladimir Olteanu 0b2dce5fe9 ss-redir: fix memleak in remote_send_cb 2017-06-05 19:09:38 -05:00
Lucas BEE 44feddd4f6 ss-redir: Add option to disable SNI feature
Add an option 'disable_sni' in the config file to allow clients running
ss-redir to disable the HTTP/SNI feature
2017-05-23 06:23:53 +08:00
Max Lv e2c24d6ac8 Refine TFO in ss-redir 2017-03-20 22:59:14 +08:00
Max Lv cfe830405f Fix #1376 2017-03-18 16:14:03 +08:00
lqs 5cf6476aa7 fix bugs 2017-03-08 21:26:52 +08:00
Martin Wetterwald 6e069c7edb ss-redir: allow you to define additionals listenings ports to set a TOS/DSCP on the outgoings ciphered connections 2017-03-08 13:58:28 +08:00
Max Lv 5e13d396ee Refine port binding 2017-03-07 12:05:07 +08:00
Sebastien DUPONCHEEL 5074cd336d mptcp: make shadowsocks kernel independant 2017-03-03 20:14:00 +08:00
lqs 8a40e538f8 Add tcp-fast-open support for ss-redir 2017-02-26 22:45:31 +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 dde1bf7dec Fix a potential issue in parse_addr 2017-02-04 18:36:06 +08:00
Max Lv 116e177657 Refine ss-tunnel 2017-02-04 09:34:38 +08:00
Max Lv 44220a5a53 Fix options 2017-02-04 09:29:31 +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 4ebe5aeb12 Add SIP004 (AEAD) support 2017-01-29 10:10:44 +08:00
Max Lv 0acc79b430 Fix UDP relay when plugin enabled 2017-01-14 12:34:05 +08:00