966 Commits
Author SHA1 Message Date
Syrone Wong 7df4178db8 update entropy info based on libsodium documentation 2017-11-13 08:21:51 +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
Max Lv 26ae365f7b Refine #1756 2017-10-30 18:02:59 +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
Max Lv f19a96e1fa Refine #1739 2017-10-18 09:29:32 +08:00
Max Lv b3f3b58a1d Fix #1739 2017-10-16 15:51:05 +08:00
Max Lv c67d275803 Fix #1734 2017-10-14 07:21:08 +08:00
Vladimir Olteanu 82694c8f19 properly set recv_ctx->connected 2017-09-16 14:19:43 +08:00
Max Witten b721c0fa6d Update docs for TCP_NODELAY 2017-09-15 10:55:15 +08:00
Max Lv 666801ddfc Disable addr reconstruction on Android 2017-09-15 10:19:03 +08:00
Vladimir Olteanu 1c64829dfa Add command-line argument for keeping TCP_NODELAY (#1685) 2017-09-15 09:17:00 +08:00
Max Lv c213ef1963 Add ARES_VERSION_MAJOR 2017-09-13 10:12:00 +08:00
Max Lv 0cb9cbe50d Fix #1682 2017-09-12 12:57:58 +08:00
Max Lv 277d6d0b5b Disable DNS rotate 2017-09-12 09:01:12 +08:00
Max Lv 012c6e7278 Merge pull request #1678 from linxiaocong/master
fix segment fault when plugin enabled and multi remote servers configured
2017-09-11 14:38:27 +08:00
Max Lv 01df436bb1 Refine #1677 2017-09-11 09:42:48 +08:00
linxiaocong da4bbe74fb fix segment fault when plugin and multi remote servers enabled 2017-09-10 14:56:25 +08:00
Max Lv 7abac61466 Fix #1663 2017-09-05 11:59:18 +08:00
Vladimir Olteanu 9201619090 ss-local: properly handle SOCKS5
* close the connection if the client doesn't speak SOCKS5
 * check if client supports "no auth. required"
2017-09-04 15:28:07 +08:00
Max Lv 7b7223da44 Fix cmake files 2017-08-31 13:55:24 +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
Xingwang Liao f1fde57111 Redirect 'INFO' log to stdout
Signed-off-by: Xingwang Liao <kuoruan@gmail.com>
2017-08-24 17:48:02 +08:00
Max Lv f8283fcc89 Fix #1626 2017-08-12 22:39:45 +08:00
Timothy Qiu 32466ed51b Discards long ACL lines 2017-08-09 15:53:58 -07:00
Zhuoyun Wei a46d2a1a83 ss-nat: Specify LAN interface with -I flag 2017-08-07 16:48:42 -07:00
Daniel ac974ecf82 acl: remove unused 'n' var 2017-08-06 18:05:43 -07:00
Daniel 5ede10f694 plugin: remove unused 'new_path' var 2017-08-06 18:05:31 -07: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
Daniel 6544ef9cf8 Replace udprealy function name typos with udprelay.
Two functions `construct_udprealy_header` and `parse_udprealy_header`
contained typos and should be `construct_udprelay_header` and
`parse_udprelay_header` respectively. This commit updates these function
names and the respective callers.
2017-08-06 06:58:16 -07:00
Max Lv 0ff1ec97be Enlarge the max_tries 2017-08-03 07:52:28 +08:00
Max Lv bf7fd7a860 Merge branch 'issue-1566'. #1566 2017-08-03 07:40:26 +08:00
Max Lv 8e41a43dc9 Remove reuse_port lock 2017-08-03 07:24:54 +08:00
Yousong Zhou 7c5416b441 syslog with daemon facility instead of kern (0) 2017-08-01 22:59:38 -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 fbd34516f0 Update json.c and fix #1594 2017-07-28 22:55:23 +08:00
Max Lv bf8f8312b4 Refine the ppbloom filter 2017-07-21 19:54:00 +08:00
Yifu Yu 4ea517daf3 Fix: ss-local and ss-redir should also respect ipv6_first. 2017-07-14 01:51:35 -05:00
Max Lv 0e74ea509c Refine the CLI help text. #1547 2017-07-06 17:17:17 +08:00
Vladimir Olteanu 556627399e parsing socks 5 request: more suggestive code 2017-07-04 23:57:21 -05:00
Vladimir Olteanu afb27ad054 count length bit when checking buffer size 2017-07-04 23:57:21 -05:00
Max Lv 5070256631 Clean up 2017-06-28 17:13:00 +08:00
Max Lv babc9c4775 Fix #1531 2017-06-18 16:02:57 +08:00
Max Lv 95b4416e14 Clean up 2017-06-14 16:36:47 +08:00
Max Lv f5278f0ac8 Fix a typo 2017-06-12 10:27:41 +08:00
Max Lv ba81b2f49e Decrease the visibility of fragmentation. #1524 2017-06-12 10:14:03 +08:00
Xiandong eba486cb02 Output service method in list API (#1523)
* Fix #1518 config file with wrong json format

Removing trailing "," to make the configuration file compliant with JSON specification

* Remove extra "," in json file

* server_port should be integer instead of string 

server_port in generated json configuration file should be integer instead of string

* Add list active service ports feature

A new management API has been added to list all active service ports.

* Make list API output JSON compliant 

In the following format:
[
{ "server_port":"8388","password":"password"},
...
]
Note that server_port value is string instead of integer for easy display on the console.

* Make safe room for the new list entry

"\n\t{\"server_port\":\"%s\",\"password\":\"%s\"}," 
Reserve 50 char spaces for the extra characters in the above.

* Output method for each service port in list API
2017-06-08 21:56:35 -05:00
Max Lv f308ddeda6 Fix #1522 2017-06-08 15:39:18 +08:00
Xiandong e2f717e9fb Add list API to list service ports (#1521)
* Fix #1518 config file with wrong json format

Removing trailing "," to make the configuration file compliant with JSON specification

* Remove extra "," in json file

* server_port should be integer instead of string 

server_port in generated json configuration file should be integer instead of string

* Add list active service ports feature

A new management API has been added to list all active service ports.

* Make list API output JSON compliant 

In the following format:
[
{ "server_port":"8388","password":"password"},
...
]
Note that server_port value is string instead of integer for easy display on the console.

* Make safe room for the new list entry

"\n\t{\"server_port\":\"%s\",\"password\":\"%s\"}," 
Reserve 50 char spaces for the extra characters in the above.
2017-06-07 22:10:52 -05:00
Xiandong 195a961e97 server_port in json file should be integer (#1520)
* Fix #1518 config file with wrong json format

Removing trailing "," to make the configuration file compliant with JSON specification

* Remove extra "," in json file

* server_port should be integer instead of string 

server_port in generated json configuration file should be integer instead of string
2017-06-06 04:27:22 -05:00