Commit Graph
944 Commits
Author SHA1 Message Date
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
Xiandong b9085c2e32 Remove extra "," in json file 2017-06-06 02:55:50 -05:00
Xiandong ae156c6aeb Fix #1518 config file with wrong json format
Removing trailing "," to make the configuration file compliant with JSON specification
2017-06-06 02:55:50 -05:00
Vladimir Olteanu 0b2dce5fe9 ss-redir: fix memleak in remote_send_cb 2017-06-05 19:09:38 -05:00
Max Lv 4b1550626f Update specs 2017-05-27 09:34:55 +08:00
Aaron LI e65b3b1505 Move <sys/socket.h> inclusion to fix build on DFlyBSD
The ``<sys/socket.h>`` header should be included in ``src/netutils.h``
before the usage of ``struct sockaddr_storage``, otherwise build failed
with errors such as:

```
In file included from udprelay.c:53:0:
netutils.h:68:22: error: 'struct sockaddr_storage' declared inside parameter list [-Werror]
                      int ipv6first);
                      ^
netutils.h:68:22: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
```

Tested on DragonFly BSD 4.9-development and Debian Linux testing.
2017-05-24 20:00:53 +08: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 b7bb4358e1 Clean up 2017-05-22 17:11:59 +08:00
Max Lv b7bdb16338 Fix #1502 2017-05-19 12:27:19 +08:00
Mygod 72622a3e3d Use standard __ANDROID__ preprocessor macro 2017-05-17 07:08:41 +08:00
Max Lv 33fe5adc19 Remove debug info 2017-05-06 07:30:30 +08:00
Max Lv 0313c8bcc6 Fix stat_update_cb for UDP packets 2017-05-06 07:24:12 +08:00
Max Lv 3f0d39aee6 Fix #1491 2017-05-03 15:36:58 +08:00
Zou Yong eb30a3d161 Fix losing data issue of SALSA20 cipher
If nonce received in more than one packet under some network condition, the salsa20 cipher decryption will lose cipher->nonce_len - left_len bytes of data.
2017-04-30 21:01:15 +08:00
Zou Yong 0559d8ce2e Fix decryption failed issue by nonce overwrite
If the first packet is less than nonce length, then the chunk nonce data will be overwrote by next packet and result in decrypt failed
2017-04-28 19:35:42 +08:00
Vladimir Olteanu c6bc21bc1a Make use of struct when parsing method select requests 2017-04-27 07:45:26 +08:00
Vladimir Olteanu 8065d2f0cf Make SOCKS5 fields unsigned 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
zzzdong 9db9df5f4d Add a option in CMakeLists.txt for switch build with static libraries or not 2017-04-23 07:16:22 +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