Commit Graph

96 Commits

Author SHA1 Message Date
name e696b18187 format using goimports 2023-03-07 17:09:18 +08:00
Selim ae14e28999
ServerName rotation (#158)
* inital servername rotation

* Move MockDomainList to LocalConnConfig as the list doesn't need to be sent to the remote

* Use CSPRNG to pick the next candidate of MockDomains

Co-authored-by: Andy Wang <cbeuw.andy@gmail.com>
2021-03-25 20:06:16 +00:00
Andy Wang 57bb437802
Log timestamp 2020-12-27 20:27:04 +00:00
不确定 cfbf0dfcb6
Fix critical bugs in session opening for TCP and UDP in case of Singleplex mode. (#145)
* Fix critical bugs in session opening for TCP and UDP in case of Singleplex mode.

- In case of TCP, don't open the session in the listener accept thread. This
  causes resource exhaustion of the tcp listener backlog queue in case of internet
  connection disruption or timeout.

- In case of UDP, don't create a new session for every UDP packet.

* Fix race in integration test.

* Fix race condition in session maker

* Code style improvements

* Explicit session.Close() call is indeed needed

Co-authored-by: Andy Wang <cbeuw.andy@gmail.com>
2020-12-19 14:42:10 +00:00
notsure2 caca33a1a5 Respect user choice of ProxyMethod in shadowsocks plugin mode. 2020-12-11 09:03:48 +00:00
Andy Wang 3f3259d4d3 MakeSession no longer needs to know if the Session should be admin 2020-10-15 23:02:51 +01:00
Andy Wang f96925982f Rename SplitConfigs to ProcessRawConfig to better reflect its behaviour 2020-10-15 22:51:59 +01:00
Andy Wang 9887649b88 Refactor Singleplexing 2020-10-15 21:32:38 +01:00
Andy Wang 0b217ddb07 Linting 2020-08-17 17:56:05 +01:00
notsure2 dab137dbd7 Support session per connection mode (like GoQuiet) when NumConn = 0. 2020-07-06 23:18:52 +02:00
不确定 aff53484eb
Accept and ignore 2 parameters passed by shadowsocks-android in shadowsocks plugin mode. (#115) 2020-05-27 01:06:30 +01:00
Andy Wang 5cbc24817d Acceptor function 2020-05-23 22:25:17 +01:00
Andy Wang 5d4e8b8d8d Refactor udp piping and add tests 2020-04-11 22:37:15 +01:00
Andy Wang d53b80208f Refactor for easier testing 2020-04-10 11:07:38 +01:00
Andy Wang 444182f5bb Purge impurity 2020-04-09 22:11:12 +01:00
Andy Wang 86095ba5e6 Refactor out Dialer 2020-04-09 00:34:02 +01:00
Kirill Buev ba5d903539 Fix incorrect config field name for remote port in plugin mode 2020-04-07 09:05:44 +03:00
Andy Wang 25e41d0941 Allow UDP option to be set in both commandline and json 2020-04-06 13:11:19 +01:00
Andy Wang a163f066a6 Refactor client config 2020-04-06 13:07:16 +01:00
Andy Wang 5e1931a11c Ineffectual assignments 2020-04-04 16:10:43 +01:00
notsure2 2de034ec92 Make keepalive optional on client -> server and server -> proxy connections. Use KeepAlive value in config (seconds). 2020-04-04 15:32:19 +01:00
Andy Wang 6b973045d5 Refactor verbosity flag parsing 2020-04-04 15:29:06 +01:00
notsure2 d4ac2a2cf5 Accept log level flag even when started in shadowsocks mode. 2020-04-04 15:18:25 +01:00
Andy Wang 2327420f75 Allow remote host to be set in the client config file 2020-04-04 00:43:06 +01:00
Andy Wang d482661494 Fix #101 by concatenating IPv6 ports correctly 2020-04-03 23:39:48 +01:00
Andy Wang 517a6d6e57 Handle error and retry for Crypto.rand 2020-02-01 23:46:46 +00:00
Andy Wang 339b324946 Working direct WebSocket transport 2019-09-01 20:23:45 +01:00
Andy Wang a3c3c5dc07 Client side plain websocket 2019-08-31 18:01:39 +01:00
Andy Wang 2dcb105005 Allow ProxyMethod to be set as command line argument 2019-08-30 22:45:42 +01:00
Andy Wang 46c02d17f4 Refactor InitState 2019-08-20 22:48:01 +01:00
Andy Wang c44a061cbe Remove a redundant argument 2019-08-20 20:25:07 +01:00
Andy Wang eabe113547 Add Stream Timeout 2019-08-19 23:23:41 +01:00
Andy Wang e28df86a55 Move Unordered field around 2019-08-16 23:20:24 +01:00
Andy Wang d73462653d Refactor routing 2019-08-14 11:56:55 +01:00
Andy Wang 44a09219f7 Experimental support for UDP 2019-08-14 11:56:55 +01:00
Andy Wang 83fb53f0d4 Fix wrong condition for isAdmin 2019-08-14 10:49:26 +01:00
Qian Wang f65a46f4a9 Remove unnecessary state variable IsAdmin 2019-08-12 14:25:24 +01:00
Qian Wang cb672a99de Refactor session configuration 2019-08-12 00:22:15 +01:00
Qian Wang c3d4057315 Add verbosity arguments 2019-08-09 22:51:17 +01:00
Qian Wang d9d8be12dc How tf did I import math/rand as crypto/rand?! 2019-08-06 21:04:47 +01:00
Qian Wang f96a24f13d Fix nil pointer when the session breaks 2019-08-06 20:11:32 +01:00
Qian Wang e15536d7c7 Refactor TLS handshake 2019-08-06 15:50:33 +01:00
Qian Wang 3dc4c6fb3f Add more trace logs 2019-08-06 11:19:47 +01:00
Qian Wang 9fa37e327f Use exclusively salsa20 for header encryption 2019-08-03 22:05:06 +01:00
Qian Wang f933c7b453 Move pipe to util 2019-08-03 15:01:12 +01:00
Qian Wang e75c713385 Refactor session struct's obfs fields 2019-08-02 16:37:48 +01:00
Qian Wang 1a628cb524 Refactor client TLS 2019-08-02 16:02:25 +01:00
Qian Wang 33f232475d Improve logging 2019-08-02 15:45:33 +01:00
Qian Wang 726a405a26 TLS1.3 2019-08-02 01:01:19 +01:00
Qian Wang 0684f5df40 Refactor payload cipher 2019-08-01 00:43:33 +01:00