Commit Graph
330 Commits
Author SHA1 Message Date
Max Lv 46ff0a8045 Refine #2162 2018-09-02 17:27:59 -07:00
Max Lv dd5e954ab4 Clean up 2018-09-02 17:21:23 -07:00
Max Lv 1dcfe68c8c Fix #2162 2018-09-02 12:43:37 +08:00
sxyoxygen 8356d8ae74 Update server.c 2018-08-08 01:56:12 +08:00
Yegor Ievlev 8fd83e2686 Use chacha20-ietf as a default cipher instead of rc4-md5 (#2080)
* Use chacha20-ietf as a default cipher instead of rc4-md5

* Update tunnel.c

* Update utils.c

* Update ss-local.asciidoc

* Update ss-local.asciidoc

* Update tunnel.c

* Update ss-tunnel.asciidoc

* Update ss-manager.asciidoc

* Update ss-redir.asciidoc

* Update shadowsocks-libev.asciidoc

* Update aead.c

* Update local.c

* Update server.c

* Update utils.c
2018-06-07 08:58:10 +08:00
Max Lv a0ef456977 Fix #2051 2018-05-24 16:54:57 +08:00
FlyingheartCN 662b6db3f3 Fix Build Fail with GCC8 2018-05-04 01:41:36 +08:00
Linus Yang 14fb82b966 Enable plugins on MinGW 2018-03-14 09:58:25 +08:00
Max Lv a377c5114a Fix #1974 2018-03-13 02:58:48 -07:00
Linus Yang 3f00e533bf Minor format fix 2018-03-12 13:16:37 +08:00
Linus Yang 0a11c87aa5 Do not override error code of setsockopt 2018-03-12 12:41:51 +08:00
Linus Yang b4c5021c65 Missing macro for MinGW 2018-03-10 23:44:27 +08:00
Linus Yang f4c612f832 Support TCP fast open on Windows 2018-03-09 17:46:38 +08:00
Linus Yang 2ed8791dab Re-add support for MinGW 2018-03-08 17:26:11 +08:00
Max Lv 8acbe68e66 Fix #1915 2018-02-11 08:42:07 +08:00
ksqsf 3c3c50b4f8 Search XDG_CONFIG_HOME for user-specific config 2018-02-11 00:30:09 +08:00
Max Lv 5fa98a6693 Fix #1911 2018-02-06 10:18:03 +08:00
Max Lv 85a64ae836 Bump version 2018-01-15 17:25:03 -08:00
Max Lv be795e1985 Refine query interface 2017-12-27 22:18:55 -08:00
Max Lv 10ce3ed5d3 Refine query handling 2017-12-27 21:52:17 -08:00
Max Lv 57ab828ba1 Fix a potential null pointer acceess issue. #1854
It's possible that c-ares calls the callback function immediately in ares_gethostbyname, which may free the server
structure in that callback function.
2017-12-27 21:47:28 -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 6eb93c4c4e Fix conditional build for new TFO API 2017-11-26 23:31:19 +08:00
Max Lv 9ac81759df Refine TFO on Darwin 2017-11-26 14:43:50 +08:00
Max Lv 2cad381036 Refine TFO in redir and server mode 2017-11-26 14:32:26 +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
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
Max Lv 5070256631 Clean up 2017-06-28 17:13:00 +08:00
Max Lv f308ddeda6 Fix #1522 2017-06-08 15:39:18 +08:00
Max Lv d252da8d83 Fix another potential out of bound access. #1465 2017-04-19 12:46:59 +08:00
Max Lv 9ee82a9a89 Fix a potential out of bound access. #1465 2017-04-19 12:16:41 +08:00
V.E.O 0de794f0db avoid blocking requests from local plugins server
When ss-server wrapped in a plugin server, every peer_name are 127.0.0.1, black list seems not working.
If large requests sent from the plugin server, ss-server would in DoS.
Maybe when in plugin mode, disable black list in ss-server and move it to plugin server?
2017-04-14 19:02:48 +08:00
Sebastien DUPONCHEEL 6c6a054e5f ss-server: allows you to set a TOS/DSCP value to the outgoing ciphered connection to the client from a netfilter mark setted on the (re)comming connection from the outside world. 2017-03-08 13:58:28 +08:00
Max Lv 5e13d396ee Refine port binding 2017-03-07 12:05:07 +08:00
Max Lv 3f1337540e Listening at 0.0.0.0 by default 2017-03-04 09:25:12 +08:00
Sebastien DUPONCHEEL 5074cd336d mptcp: make shadowsocks kernel independant 2017-03-03 20:14:00 +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 504a3f7813 Refine MAX_FRAG 2017-02-14 10:38:39 +08:00
Max Lv 422eaa5024 Add back fragmentation detection 2017-02-14 10:02:36 +08:00
Max Lv 2a9b9c7358 Revert "Fix server buffer #1245"
This reverts commit 9716eede20.
2017-02-13 19:03:28 +08:00
Max Lv 9716eede20 Fix server buffer #1245 2017-02-13 18:54:37 +08:00