Commit Graph
71 Commits
Author SHA1 Message Date
Max Lv 83e637cc57 Disable port reusing in manager mode 2017-12-18 21:42:21 +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 c67d275803 Fix #1734 2017-10-14 07:21:08 +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 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 babc9c4775 Fix #1531 2017-06-18 16:02:57 +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
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
Paizhuo.Chen 7ffaa9f33e fix shadowsocks/shadowsocks-libev#1408 2017-03-26 22:12:23 +08:00
Paizhuo.Chen 233cf15834 Add method, fast_open, mode, plugin options to ss-manager 2017-03-25 21:39:25 +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 0cff5503f6 Add default manager-address 2017-02-10 15:38:38 +08:00
Max Lv f4b1641636 Fix #1217 2017-02-08 09:58:04 +08:00
Max Lv ef0402eb10 Add --key option to set key directly (#1207) 2017-02-06 17:02:04 +08:00
Max Lv 7b290f30d6 Make SO_REUSEPORT disabled by default 2017-02-02 21:05:57 +08:00
anonymous-contributor a3d0f02c3e Use enum number for val of long options (#1155) 2017-02-01 12:53:20 +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
Max Lv cb60579c74 Refine buffer handling in ss-manager 2017-01-23 12:27:45 +08:00
Max Lv 2d3a1b2a3e Fix #1123 2017-01-23 08:44:36 +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 ecf1fcc845 Fix #1059 2017-01-10 21:57:38 +08:00
Roger Shimizu f59cd07992 fix typo in src/manager.c 2017-01-09 22:45:50 +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
GhostFlying c807d2d6c4 fix bug when port reuse fail (#1037) 2017-01-05 23:26:47 -06:00
Max Lv 3b4af24fec Fix indent 2017-01-06 12:22:15 +08:00
GhostFlying 9753cc54dc Check port before add port via ss-manager (#1035)
* add simple port check functions

* release sock lock when manager exit

* simplfy the sock lock

* release sock lock when receive the stat report

* simplfy dns query

* add udp port check

* enable port check function

* clean code and logs
2017-01-05 06:06:05 -06:00
Max Lv 2694e86bd9 Fix #1016 2016-12-28 18:02:08 +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
Syrone Wong e6c0780435 memset zero before using
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-12-10 21:37:56 -06:00
Rayson zhu a8fdd77fbf add user config option 2016-11-25 02:10:17 -06:00
Max Lv 52e391962f Add option for firewall rules 2016-11-17 15:18:46 +08:00
Max Lv 79a98a66d8 Refine geteuid() 2016-11-16 18:19:51 +08:00
Max Lv a05a64f563 Add missing macro #954 2016-11-16 14:40:09 +08:00
Max Lv 6d9331a56d Fix #954 2016-11-16 14:04:57 +08:00
Rayson Zhu 07d2b1a005 exit when running as a nonexistent user and warn when running as root 2016-11-14 21:14:06 +08:00
Max Lv 5cd294879b Add -6 option for #942 2016-11-12 11:01:05 +08:00
Max Lv 904ee4a771 Fix #881 2016-10-12 15:51:18 +08:00
Max Lv b28638ab80 Clean up 2016-09-09 13:17:58 +08:00
Max Lv 64870a276b Add HTTP/SNI parser (#809)
* WiP: add HTTP/SNI parser

* WiP: replace hostname with HTTP/SNI header

* WiP: add ACL

* Fix white list

* Replace free() with ss_free()

* Refine sockaddr handling

* Add HTTP/SNI support to redir
2016-09-08 10:10:23 +08:00
Max Lv 5812840b24 Fix typo 2016-08-26 09:19:38 +08:00
Syrone Wong b1f5c68650 Fix typo (found by codespell) (#753)
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-03 06:50:43 -05:00
Roger Shimizu 2445b8690f fix of PATH_MAX for GNU/Hurd (#727)
Info:
 - https://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html
 - https://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL
2016-07-17 18:39:27 -05:00
Max Lv bdef06618d Fix #708 2016-07-06 11:09:59 +08:00
anonymous-contributor af69798355 New jconf parameters (#695)
* Add 'tunnel_address' support for json config parser

And allow ss-tunnel to use the newly introduced parser.

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

* Add "mode" support for jconf

Now jconf supports "mode" setting, allowed values are "tcp_only",
"tcp_and_udp" and "udp_only".

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

* Use jconf "mode" for server/local/tunnel/manager

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

* Add per-project vimrc to gitignore

As the coding style differs from kernel and other projects, so such
project vimrc should be helpful.

Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
2016-06-30 23:19:13 -05:00