Commit Graph
23 Commits
Author SHA1 Message Date
Max Lv 27e74f8287 Refine China DNS 2020-03-15 01:43:30 +08:00
zonyitoo 806f44244a Support ACL rules in server (both TCP and UDP)
ref: shadowsocks/shadowsocks-android#2452

Reformatted logs
2020-02-23 13:42:54 +08:00
zonyitoo 80b3212cdd Optimize logs, yield coroutine instead of sleep 100ms when connect failed 2020-02-04 22:02:45 +08:00
zonyitoo 508c6dac3c Check plugin and confirm it starts before listening 2020-02-03 21:31:55 +08:00
Y. T. CHUNG a3b33f2614 Migrate to std::future, async/await (#165)
* Socks5 library, main tcp relay implementation migrated with async/await

* UDP relay local migrated to async/await

* UDP relay server migrated to async/await

* Migrated UDP DNS to async/await, follows tokio-process

* Removed unused uses, add dyn keyword for TraitObjects

* [#151] Uses dl.google.com/generate_204 to check connection latency

* Make sslocal/ssserver TCP relay work successfully, disabled UDP and DNS relay temporary

* Handshake before performing actual read & write

* Wraps timeout logic into a Connection<S> struct

* Make UDP relay work again

* Local uses copy directly

* Completely removed unused ssdns

* Fixed test

* Uses tokio::main macro for main entrance

* Fixed a missing use in local.rs

* Updated travis openssl to 1.1.0L

* Windows signal

* Migrated tokio 0.2 release with std::future support

fix #173

* fixed windows monitor build

* Uses tokio on crates.io

* ctrl_c is a Future

* Run tests with single tokio runtime

* Uses spawn_blocking only with threaded runtime

* Killing all detached Tasks if server is exited

* Updated version to v1.8.0

* Removed unused pin-project

* Uses dns resolver built in tokio

* Explicitly uses threaded scheduler by default

* Reverted, it is threaded scheduler by default

* Updated bytes to v0.5

* Updated many dependencies

* Add a tunnel app (#175)

It can be used to benchmark.

Usage:
sstunnel -v -s 127.0.0.1:8488 -m plain -k password -b 127.0.0.1:1090 -f 127.0.0.1:5201

"-f xxx" : the target/forwad address xxx

* Removed unused remote-dns config field (ssdns is removed)

* Separated TCP local tunneling to its own module

* Implements FromStr for Address

* Fixed typo

* Add tunnel unit test

* Updated tokio to v0.2.2, fixed basic scheduler bug

* Removed Connection, uses try_timeout instead. Revert back to use 8K buffer

* Revert "Removed Connection, uses try_timeout instead. Revert back to use 8K buffer"

This reverts commit 82f698e520.

* Uses Delay instead of Timeout

* Delay doesnt return io::Result

* Revert "Delay doesnt return io::Result"

This reverts commit 74dc294d16.

* Fixed bug, Connection timeout should be shared between read & write operations
2019-12-01 12:20:39 +08:00
Linus Färnstrand 3d25b71a20 Remove extern crate statements (#143) 2019-01-26 00:30:06 +08:00
mvd-ows 36d91c68ae Prepare crate for library use (#139)
* Move all process signal monitoring out of the library

* Run plugins with tokio-process and monitor them for exit
2019-01-25 00:05:55 +08:00
Linus Färnstrand afff1982aa Misc simplification (#142)
* Remove unused addr field in Plugin struct

* Replace many Option matches with Option::map and and_then

* Rustfmt run

* Various changes suggested by clippy
2019-01-24 22:14:48 +08:00
Linus Färnstrand 988a816fa2 Apply cargo fix --edition and upgrade to 2018 (#141)
* Apply cargo fix --edition and upgrade to 2018

* Fix 2018 imports for miscreant
2019-01-21 22:33:40 +08:00
zonyitoo cecc62e4b4 [#85] Supporting shadowsocks-manager reports 2019-01-01 14:56:29 +08:00
Y. T. Chung c60869aa50 Refactor some boxed futures with impl Trait
- Replaced EncryptedWriterFut and DecryptedReaderFut with impl Trait
- Replaced boxed future in try_timeout and io_timeout with a static type
- Modified rustfmt configuration, fully reformatted
2018-10-01 10:32:04 +08:00
Y. T. Chung 03ce21ec01 Updated deps, subprocess impls Send on Windows 2018-06-06 23:01:48 +08:00
Y. T. Chung 16cb100bd8 Travis installs libsodium with apt, test appveyor by preinstalled openssl 2018-05-31 07:53:02 +08:00
Y. T. Chung 4bdb41808d Test if subprocess Sendable Popen works in win32 2018-05-31 07:41:55 +08:00
Y. T. Chung b7b0c59322 Plugin must be sendable 2018-05-18 22:12:52 +08:00
Y. T. CHUNG 8be6da51f3 Migrate tokio and uses new features (#108)
* Add #102 link in README

* Migrating to tokio, #100

* Migrated to tokio-signal v0.2, reformatted

* Should not call tokio::spawn before tokio::run

* Build nightly and stable with different image tag

* Removed unnecessary rustup install

* Renamed version to v1.7.0-alpha

* Removed deprecated calls of Buf

* Updated dependencies

* [#106] Fixed bug, should not hold UDP connections forever

* Lower info log to debug

* Bump version to v1.7.0-alpha.2

* Implement a simple DNS relay server, bump version to v1.7.0-alpha.3

* Better logging

* Fixed build on travis

* Add elapsed time in log

* Should not exit if handler return error

* reformatted

* Add test for DNS

* Updated ssdns param

* Use `trust-dns` and impl Trait
1. Replaced `ToSocketAddrs` with `trust-dns`
2. Uses impl Trait for functions
3. Updated dependencies
4. Fixed bugs

* Bug fixed, logging crate in ssdns
2018-05-16 00:03:50 +08:00
Y. T. Chung 5c89e61a2e Reformatted with new rustfmt 2018-01-20 01:10:16 +08:00
Y. T. Chung b6c5b0474d Abort plugin if specific signal received 2017-07-29 12:20:26 +08:00
Y. T. Chung 5663623f59 Abort process if plugin failed to start 2017-07-26 02:36:38 +08:00
Y. T. Chung 42e29972a4 Uses a more acceptable rustfmt style config 2017-07-26 00:44:16 +08:00
Y. T. Chung eb580be25a Style and wording improvement
1. Remove Emails
2. Better log for timed out
3. Properly log plugin listening address in server mode
4. Use latest rustfmt and new style configuration
2017-07-24 09:05:41 +08:00
Y. T. Chung 11ed6f987f Add INFO log for plugin address 2017-07-23 18:46:39 +08:00
Y. T. Chung ec49103892 supports SIP003 plugin 2017-07-23 14:04:37 +08:00