Commit Graph

17 Commits

Author SHA1 Message Date
name e696b18187 format using goimports 2023-03-07 17:09:18 +08:00
不确定 dc030fbb47
Implement UDP stream timeout. (#148)
* Implement UDP stream timeout.

* Correctly delete streams from map after closing

Co-authored-by: Andy Wang <cbeuw.andy@gmail.com>
2020-12-23 00:43:38 +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
不确定 e77fd4c446
Fix regression: termination of long downloads after StreamTimeout seconds (#141)
* Fix termination of long downloads after StreamTimeout seconds.

- Even if not broadcasting in a loop, we still need to update the read deadline.
- Don't enforce the timeout after the first data is written.

* When timeout no longer needs to be enforced, no need to schedule a broadcast.

* Fix Cloak client. Don't enforce read deadline after first read.

* Enforce StreamTimeout on the initial bytes sent by localConn only.

* Revert changes to multiplex module. Remove timeout from caller.
2020-12-12 17:00:46 +00:00
Andy Wang a59d9cb880 Fix singleplex and add tests 2020-10-17 16:15:55 +01:00
Andy Wang 9887649b88 Refactor Singleplexing 2020-10-15 21:32:38 +01:00
notsure2 dab137dbd7 Support session per connection mode (like GoQuiet) when NumConn = 0. 2020-07-06 23:18:52 +02:00
Andy Wang 128f653ea4 Fix duplicate UDP binding 2020-05-27 13:41:34 +01:00
Andy Wang 369f3c781c Fix UDP 2020-05-23 15:44:24 +01:00
Andy Wang e202d8d03b Implement WriteTo and ReadFrom timeouts 2020-04-14 14:14:51 +01:00
Andy Wang 5d4e8b8d8d Refactor udp piping and add tests 2020-04-11 22:37:15 +01:00
Andy Wang 93cf6dec6e Export fields for testing 2020-04-10 14:09:48 +01:00
Andy Wang d53b80208f Refactor for easier testing 2020-04-10 11:07:38 +01:00
Andy Wang e5bda61587 Close connections properly 2020-04-09 23:52:08 +01:00
Andy Wang e41394c83c Set frame size limit through multiplexer 2020-04-09 16:37:46 +01:00
Andy Wang 7bfae8accd Refactor client side transport (breaks server) 2020-04-08 20:53:09 +01:00
Andy Wang a163f066a6 Refactor client config 2020-04-06 13:07:16 +01:00