Commit Graph
151 Commits
Author SHA1 Message Date
zonyitoo e4dfd2f9d8 replaced future::abort with tokio JoinHandle abort
- MUST: tokio >= v1.8.2
2021-07-20 15:36:45 +08:00
zonyitoo d730c0e4ec nix Errno can be converted to i32 directly since 0.22 2021-07-20 14:57:08 +08:00
dependabot[bot] fcc943e583 Bump env_logger from 0.8.4 to 0.9.0
Bumps [env_logger](https://github.com/env-logger-rs/env_logger) from 0.8.4 to 0.9.0.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.4...v0.9.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 21:50:30 +08:00
dependabot[bot] 0433b3ec09 Bump nix from 0.21.0 to 0.22.0
Bumps [nix](https://github.com/nix-rust/nix) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/commits)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 21:49:10 +08:00
zonyitoo 0d2e7d5489 log peer addrs when getting SOCKS handshake error
- ref #336
2021-07-09 10:03:15 +08:00
zonyitoo 889115eca0 tokio try_write_io merged into try_io 2021-07-08 10:23:09 +08:00
zonyitoo 42b55f1916 fixed windows TFO by using tokio try_write_io 2021-07-07 21:47:41 +08:00
zonyitoo 0f942ea5d1 check cached DnsClient connection state before query
- ref #567
2021-07-07 00:49:48 +08:00
Max Lv d4b10574fa Remove the reuse for UNIX stream DNS lookup.
Our UNIX stream based DNS lookup doesn't support connection reuse.
2021-07-06 23:56:53 +08:00
vidy 4f6035a909 It's supposed to be remove, not remote. 2021-07-02 18:06:09 +08:00
Mygod 19bc88bcb9 Log detected replay instead of dropping the connection 2021-06-29 16:36:35 +08:00
zonyitoo 9ce69e5b38 killing UDP association relay tasks properly when server is closed
- ref #557
- ref #271
2021-06-28 23:47:24 +08:00
zonyitoo 6490e34ec6 clearing write readiness if TFO connect returns EINPROGRESS
- ref #555
- imperfect until tokio-rs/tokio#3888 was merged
2021-06-26 02:54:51 +08:00
zonyitoo 3743ffe1c3 updated build scripts for empty features 2021-06-21 10:11:55 +08:00
zonyitoo 6583640d5f first write on TFO sockets may return EINPROGRESS
- Remote server doesn't support TFO
- First connect without TFO cookie

fallbacks to normal TCP connect()

ref #555
2021-06-19 01:25:12 +08:00
zonyitoo 05a3d6c499 http local listener initializing with accept_opts
- setting nodelay, keepalive and dualstack
2021-06-16 10:11:17 +08:00
dependabot[bot] 09ca20d6e7 Bump once_cell from 1.7.2 to 1.8.0 (#552)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.7.2 to 1.8.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.7.2...v1.8.0)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-14 23:34:21 +08:00
zonyitoo 420e4511d3 add manager debug strings 2021-06-13 08:14:31 +08:00
dependabot[bot] cee91ef3ad Bump nix from 0.20.0 to 0.21.0 (#548)
Bumps [nix](https://github.com/nix-rust/nix) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 19:39:56 +08:00
zonyitoo e32c869f00 set read timeout for half-open connections (one direction closed)
- ref #490
2021-06-06 03:33:45 +08:00
zonyitoo a8de054871 all tcp sockets will set with default Keep Alive timeout 15s
- fixes #546
- ref #490
2021-06-06 01:42:41 +08:00
zonyitoo df87125212 allow customizing keep-alive seconds on TCP sockets
- ref #490
2021-06-05 18:19:07 +08:00
zonyitoo f1d312fd72 add opts for enabling keep-alive. and enabled by default
- ref #490
2021-06-05 12:48:08 +08:00
zonyitoo 6c3345f13e removed unused config method 2021-06-04 21:49:57 +08:00
zonyitoo 9f25f1e022 reverted default connection timeout
- ref #490
- fixed bug, ssserver slient-drop doesn't work
2021-06-04 19:18:09 +08:00
zonyitoo d7cd2269e2 next release v1.11.1 2021-06-04 13:56:32 +08:00
zonyitoo 2819c47158 set default timeout for shadowsocks connection tunnel
- default timeout is 24 hours
- ref #490
- refactored tunnel copy with copy_bidirectional to avoid unnecessary
  splits
2021-06-04 13:52:45 +08:00
wyzdot 240353fbca add disable opt for local servers 2021-06-02 00:28:57 +08:00
zonyitoo 6c2a1737c9 setting manager's method from configuration
fixes #542
2021-05-29 17:36:05 +08:00
zonyitoo b23bbf253b add missing ACL initialization for manager
- fixes #541
2021-05-29 17:36:05 +08:00
Aaron Chen 5c35f7c7f5 Fix a typo 2021-05-29 00:25:17 +08:00
dependabot[bot] 39b3567d53 Bump arc-swap from 1.2.0 to 1.3.0
Bumps [arc-swap](https://github.com/vorner/arc-swap) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/vorner/arc-swap/releases)
- [Changelog](https://github.com/vorner/arc-swap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/arc-swap/compare/v1.2.0...v1.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 19:15:30 +08:00
dependabot[bot] e9869ee2f8 Bump trust-dns-resolver from 0.20.2 to 0.20.3
Bumps [trust-dns-resolver](https://github.com/bluejekyll/trust-dns) from 0.20.2 to 0.20.3.
- [Release notes](https://github.com/bluejekyll/trust-dns/releases)
- [Changelog](https://github.com/bluejekyll/trust-dns/blob/v0.20.3/CHANGELOG.md)
- [Commits](https://github.com/bluejekyll/trust-dns/compare/v0.20.2...v0.20.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 21:50:46 +08:00
zonyitoo 39c484f264 fixed clippy warnings 2021-05-16 01:27:14 +08:00
zonyitoo f0f1ab59cd properly set available redir types for TCP and UDP separately 2021-05-15 00:40:21 +08:00
zonyitoo 0af3aff112 release v1.11.0 2021-05-14 12:44:49 +08:00
zonyitoo 9ef26b57e4 avoid divide by zero, limits user weight to EPSILON 2021-05-07 13:43:40 +08:00
zonyitoo b06391c7b3 bypassing DNS queries of remote servers' address
- ref shadowsocks/shadowsocks-android#2722
2021-05-07 13:32:47 +08:00
zonyitoo d476ef35b0 fixed score calculation, user_weight should be divider 2021-05-07 12:44:14 +08:00
zonyitoo 032aba58fa make clippy happy 2021-05-07 11:55:16 +08:00
zonyitoo e8772950fb allow customizing servers' weight for balancer
- fixes #510
2021-05-07 11:35:35 +08:00
zonyitoo e167d7814f reverted LFU strategy for UDP management
LFU cache was getting more troubles than benefits
2021-04-28 23:06:07 +08:00
zonyitoo 04bddab6c0 record every resolved target SocketAddr 2021-04-28 14:48:39 +08:00
zonyitoo 7b3415f3b4 trigger CI to address dead lock 2021-04-28 14:29:38 +08:00
zonyitoo d69a2fa544 add recv log for UDP remote-to-local task 2021-04-28 13:06:34 +08:00
ty 4dfcc8e036 Manage UDP associations with LFU strategy (#506)
* manage UDP associations with LFU

- DNS associations could be evicted firstly then others like HTTP/3

* UDP redir caches inbound non-local socket

- Optimization: prevent creating new sockets for the same remotes

* updated libc to v0.2.94 for unified TCP options

* make clippy happy

* Pin lfu-cache to v1.2.1 for edward-shen/lfu-cache#2

* UDP target should cache with expiration 1hrs

* UDP tunnel test with an echo server

- CI crashes occasionally because of 8.8.8.8:53 doesn't respond
2021-04-28 01:27:33 +08:00
zonyitoo 89b329c1ed send syn after 500ms if TFO is enabled for server
- ref #232
2021-04-26 00:38:08 +08:00
ty 8a27bb296c support TFO on Linux, FreeBSD, macOS and Windows (#487)
- ref #184
2021-04-25 23:31:13 +08:00
zonyitoo 423bde10a9 enable features for docrs 2021-04-24 00:24:35 +08:00
zonyitoo df83d24c5f release v1.10.9 2021-04-23 23:58:08 +08:00