Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译master分支报错 #355

Closed
dev4u opened this issue Dec 24, 2020 · 1 comment
Closed

编译master分支报错 #355

dev4u opened this issue Dec 24, 2020 · 1 comment

Comments

@dev4u
Copy link

dev4u commented Dec 24, 2020

error[E0599]: no method named `with_poll` found for struct `AsyncFdReadyGuard<'_, mio::net::UnixStream>` in the current scope
  --> crates/shadowsocks/src/relay/sys/unix/uds.rs:40:15
   |
40 |         ready.with_poll(|| match send_with_fd(fd, buf, fds) {
   |               ^^^^^^^^^ method not found in `AsyncFdReadyGuard<'_, mio::net::UnixStream>`

估计是更新到tokio 1.0导致的
tokio-rs/tokio@8f4c16e

zonyitoo added a commit that referenced this issue Dec 24, 2020
@dev4u
Copy link
Author

dev4u commented Dec 24, 2020

来来来,干了这个,还有两个

error[E0308]: `match` arms have incompatible types
   --> crates/shadowsocks/src/relay/sys/unix/uds.rs:133:22
    |
129 | /             match self.io.get_ref().write(buf) {
130 | |                 Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
131 | |                     write_guard.clear_ready();
    | |                     -------------------------- this is found to be of type `()`
132 | |                 }
133 | |                 x => Poll::Ready(x),
    | |                      ^^^^^^^^^^^^^^ expected `()`, found enum `std::task::Poll`
134 | |             }
    | |_____________- `match` arms have incompatible types
    |
    = note: expected type `()`
               found enum `std::task::Poll<std::result::Result<usize, std::io::Error>>`

x => return Poll::Ready(x)

error[E0425]: cannot find value `addr` in this scope
   --> crates/shadowsocks/src/relay/sys/unix/mod.rs:164:9
    |
164 |     if !addr.ip().is_loopback() {
    |         ^^^^ not found in this scope

if !bind_addr.ip().is_loopback() {

zonyitoo added a commit that referenced this issue Dec 28, 2020
* upgrade to tokio v1.0

- removed tokio::prelude
- upgrade hyper to v0.14, tokio-rustls to v0.22

still working on migrating trust-dns-* and tokio-native-tls

ref #354

* tokio v1.0 removed with_poll

fix #355, ref #354

* removed CTRL-BREAK signal handler

ref #354

* fixes compliation error, add missing return

fixes #355

* allow setting SO_SNDBUF and SO_RCVBUF for sockets

ref #352

* completely removed unix socket based DNS resolving

ref shadowsocks/shadowsocks-android#2622

* fix build issue on Windows

* fixed uds poll_write loop, fixed udp outbound loopback check

ref #355

* disable default trust-dns resolver for andorid, macos, ios

This commit also:

- Optimized resolve() logging with elapsed time
- updated tokio-native-tls

* local-dns removed from default features

* fix rustc version with rust-toolchain

* Bump bytes from 0.6.0 to 1.0.0

* add dependabot badge

* indirectly depend on trust_dns_proto via trust_dns_resolver

* auto reconnect if udp sendto failed

* recreate proxied socket if recv() returns failure

* increase score precision to 0.0001

* example of log4rs configuration

* PingBalancer instance shouldn't kill probing task when dropping

- Probing task should be controlled by the internal shared state

* switch to trust-dns main for latest tokio 1.0 support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant