Commit Graph

17 Commits (e696b181876d7279e22c573d12a8b1f525c9616c)

Author SHA1 Message Date
name e696b18187 format using goimports 1 year ago
不确定 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>
3 years ago
不确定 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>
3 years ago
不确定 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.
4 years ago
Andy Wang a59d9cb880 Fix singleplex and add tests 4 years ago
Andy Wang 9887649b88 Refactor Singleplexing 4 years ago
notsure2 dab137dbd7 Support session per connection mode (like GoQuiet) when NumConn = 0. 4 years ago
Andy Wang 128f653ea4 Fix duplicate UDP binding 4 years ago
Andy Wang 369f3c781c Fix UDP 4 years ago
Andy Wang e202d8d03b Implement WriteTo and ReadFrom timeouts 4 years ago
Andy Wang 5d4e8b8d8d Refactor udp piping and add tests 4 years ago
Andy Wang 93cf6dec6e Export fields for testing 4 years ago
Andy Wang d53b80208f Refactor for easier testing 4 years ago
Andy Wang e5bda61587 Close connections properly 4 years ago
Andy Wang e41394c83c Set frame size limit through multiplexer 4 years ago
Andy Wang 7bfae8accd Refactor client side transport (breaks server) 4 years ago
Andy Wang a163f066a6 Refactor client config 4 years ago