Giter VIP home page Giter VIP logo

rsnova's Introduction

Rust practice project

Features

Getting Started

Examples

Build

$ cargo build --release

Generate cert/key for TLS/QUIC

$ ./target/release/rsnova --rcgen

Launch Server At Remote Server

$ ./rsnova --role server --protocol tls --key ./key.der --cert ./cert.der --listen 0.0.0.0:48100

Launch Server At Local Client

$ ./rsnova --role client  --cert ./cert.der --listen 127.0.0.1:48100 --remote tls://<ip:port>

Use Proxy
Now you can configure socks5://127.0.0.1:48100 as the proxy for browser/tools.

rsnova's People

Contributors

yinqiwen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rsnova's Issues

can't complie in heroku

-----> Building on the Heroku-20 stack
-----> Using buildpack: https://github.com/emk/heroku-buildpack-rust.git
-----> Rust app detected
-----> Downloading rustup
-----> Using rustup to install Rust channel stable
info: downloading installer
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-12-02, rust version 1.57.0 (f1edd0429 2021-11-29)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu installed - rustc 1.57.0 (f1edd0429 2021-11-29)
Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory (/tmp/codon/tmp/cache/cargo/bin).
To configure your current shell, run:
source /tmp/codon/tmp/cache/cargo/env
-----> Building application using Cargo
Updating crates.io index
Downloading crates ...
Downloaded num_cpus v1.13.0
Downloaded percent-encoding v2.1.0
Downloaded opaque-debug v0.3.0
Downloaded pin-project-lite v0.2.7
Downloaded rand_chacha v0.3.1
Downloaded rand_core v0.6.3
Downloaded regex v1.5.4
Downloaded regex-syntax v0.6.25
Downloaded webpki v0.21.4
Downloaded quote v1.0.10
Downloaded rand v0.7.3
Downloaded sha-1 v0.9.8
Downloaded tokio-macros v0.2.6
Downloaded syn v1.0.82
Downloaded void v1.0.2
Downloaded url v2.2.2
Downloaded rand_xorshift v0.1.1
Downloaded rand_pcg v0.1.2
Downloaded rand_jitter v0.1.4
Downloaded percent-encoding v1.0.1
Downloaded webpki-roots v0.17.0
Downloaded tungstenite v0.10.1
Downloaded unchecked-index v0.2.2
Downloaded twoway v0.2.2
Downloaded tungstenite v0.16.0
Downloaded yansi v0.5.0
Downloaded url v1.7.2
Downloaded bincode v1.3.3
Downloaded base64 v0.11.0
Downloaded tokio v0.2.25
Downloaded rustls v0.16.0
Downloaded tokio v1.15.0
Downloaded textwrap v0.11.0
Downloaded ascii v0.8.7
Downloaded ring v0.16.20
Downloaded skip32 v1.0.5
Downloaded base64 v0.10.1
Downloaded chunked_transfer v0.3.1
Downloaded block-padding v0.1.5
Downloaded block-buffer v0.7.3
Downloaded autocfg v0.1.7
Downloaded ansi_term v0.11.0
Downloaded toml v0.4.10
Downloaded libc v0.2.112
Downloaded nix v0.14.1
Downloaded idna v0.2.3
Downloaded glob v0.3.0
Downloaded tokio-tungstenite v0.16.1
Downloaded nom v4.2.3
Downloaded async-tls v0.6.0
Downloaded mio v0.7.14
Downloaded input_buffer v0.3.1
Downloaded http v0.2.5
Downloaded rand_isaac v0.1.1
Downloaded itoa v0.4.8
Downloaded futures-macro v0.3.17
Downloaded futures-channel v0.3.17
Downloaded rand_os v0.1.3
Downloaded futures-core v0.3.17
Downloaded bytes v0.5.6
Downloaded base64 v0.13.0
Downloaded rand v0.6.5
Downloaded rand_core v0.4.2
Downloaded vec_map v0.8.2
Downloaded utf-8 v0.7.6
Downloaded unicode-width v0.1.9
Downloaded rand_hc v0.1.0
Downloaded rand_core v0.3.1
Downloaded proc-macro2 v1.0.34
Downloaded rand_chacha v0.1.1
Downloaded flexi_logger v0.14.8
Downloaded clap v2.33.4
Downloaded tiny_http v0.6.4
Downloaded time v0.1.44
Downloaded thiserror v1.0.30
Downloaded slab v0.4.5
Downloaded signal-hook-registry v1.4.0
Downloaded serde v1.0.131
Downloaded net2 v0.2.37
Downloaded memchr v2.4.1
Downloaded mio-uds v0.6.8
Downloaded futures-task v0.3.17
Downloaded futures-sink v0.3.17
Downloaded num-integer v0.1.44
Downloaded mio v0.6.23
Downloaded lazy_static v1.4.0
Downloaded iovec v0.1.4
Downloaded idna v0.1.5
Downloaded httparse v1.5.1
Downloaded getrandom v0.1.16
Downloaded futures-io v0.3.17
Downloaded futures v0.3.17
Downloaded form_urlencoded v1.0.1
Downloaded fnv v1.0.7
Downloaded fake-simd v0.1.2
Downloaded digest v0.9.0
Downloaded digest v0.8.1
Downloaded crc v1.8.1
Downloaded cpufeatures v0.2.1
Downloaded chrono v0.4.19
Downloaded cfg-if v1.0.0
Downloaded cfg-if v0.1.10
Downloaded cc v1.0.72
Downloaded bytes v1.1.0
Downloaded byteorder v1.4.3
Downloaded byte-tools v0.3.1
Downloaded build_const v0.2.2
Downloaded block-buffer v0.9.0
Downloaded bitflags v1.3.2
Downloaded autocfg v1.0.1
Downloaded atty v0.2.14
Downloaded aho-corasick v0.7.18
Downloaded version_check v0.9.3
Downloaded version_check v0.1.5
Downloaded untrusted v0.7.1
Downloaded unicode-xid v0.2.2
Downloaded unicode-normalization v0.1.19
Downloaded unicode-bidi v0.3.7
Downloaded unicase v2.6.0
Downloaded typenum v1.14.0
Downloaded tinyvec_macros v0.1.0
Downloaded tinyvec v1.5.1
Downloaded thiserror-impl v1.0.30
Downloaded strsim v0.8.0
Downloaded spin v0.5.2
Downloaded sha-1 v0.8.2
Downloaded serde_derive v1.0.131
Downloaded sct v0.6.1
Downloaded proc-macro-nested v0.1.7
Downloaded pin-project-lite v0.1.12
Downloaded opaque-debug v0.2.3
Downloaded num-traits v0.2.14
Downloaded matches v0.1.9
Downloaded log v0.4.14
Downloaded getrandom v0.2.3
Downloaded generic-array v0.14.4
Downloaded generic-array v0.12.4
Downloaded futures-util v0.3.17
Downloaded futures-executor v0.3.17
Downloaded rand_core v0.5.1
Downloaded rand_chacha v0.2.2
Downloaded rand v0.8.4
Downloaded proc-macro-hack v0.5.19
Downloaded ppv-lite86 v0.2.15
Downloaded pin-utils v0.1.0
Downloaded once_cell v1.9.0
Compiling libc v0.2.112
Compiling cfg-if v1.0.0
Compiling autocfg v1.0.1
Compiling proc-macro2 v1.0.34
Compiling unicode-xid v0.2.2
Compiling syn v1.0.82
Compiling log v0.4.14
Compiling memchr v2.4.1
Compiling typenum v1.14.0
Compiling version_check v0.9.3
Compiling tinyvec_macros v0.1.0
Compiling futures-core v0.3.17
Compiling rand_core v0.4.2
Compiling matches v0.1.9
Compiling autocfg v0.1.7
Compiling unicode-bidi v0.3.7
Compiling proc-macro-hack v0.5.19
Compiling slab v0.4.5
Compiling byteorder v1.4.3
Compiling cc v1.0.72
Compiling proc-macro-nested v0.1.7
Compiling ppv-lite86 v0.2.15
Compiling futures-channel v0.3.17
Compiling futures-task v0.3.17
Compiling untrusted v0.7.1
Compiling spin v0.5.2
Compiling futures-sink v0.3.17
Compiling pin-project-lite v0.2.7
Compiling once_cell v1.9.0
Compiling getrandom v0.1.16
Compiling cfg-if v0.1.10
Compiling bytes v1.1.0
Compiling fnv v1.0.7
Compiling pin-utils v0.1.0
Compiling percent-encoding v2.1.0
Compiling serde_derive v1.0.131
Compiling httparse v1.5.1
Compiling futures-io v0.3.17
Compiling byte-tools v0.3.1
Compiling serde v1.0.131
Compiling itoa v0.4.8
Compiling build_const v0.2.2
Compiling version_check v0.1.5
Compiling utf-8 v0.7.6
Compiling bytes v0.5.6
Compiling cpufeatures v0.2.1
Compiling opaque-debug v0.3.0
Compiling base64 v0.13.0
Compiling nix v0.14.1
Compiling unicode-width v0.1.9
Compiling fake-simd v0.1.2
Compiling regex-syntax v0.6.25
Compiling bitflags v1.3.2
Compiling opaque-debug v0.2.3
Compiling percent-encoding v1.0.1
Compiling lazy_static v1.4.0
Compiling ascii v0.8.7
Compiling ansi_term v0.11.0
Compiling chunked_transfer v0.3.1
Compiling void v1.0.2
Compiling yansi v0.5.0
Compiling pin-project-lite v0.1.12
Compiling strsim v0.8.0
Compiling base64 v0.11.0
Compiling glob v0.3.0
Compiling vec_map v0.8.2
Compiling unchecked-index v0.2.2
Compiling skip32 v1.0.5
Compiling futures-macro v0.3.17
Compiling futures-util v0.3.17
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling generic-array v0.14.4
Compiling unicase v2.6.0
Compiling tinyvec v1.5.1
Compiling rand_core v0.3.1
Compiling rand_jitter v0.1.4
Compiling rand_chacha v0.1.1
Compiling rand_pcg v0.1.2
Compiling rand v0.6.5
Compiling base64 v0.10.1
Compiling ring v0.16.20
Compiling form_urlencoded v1.0.1
Compiling block-padding v0.1.5
Compiling http v0.2.5
Compiling crc v1.8.1
Compiling nom v4.2.3
Compiling input_buffer v0.3.1
Compiling textwrap v0.11.0
Compiling rand_hc v0.1.0
Compiling rand_isaac v0.1.1
Compiling rand_xorshift v0.1.1
Compiling unicode-normalization v0.1.19
Compiling getrandom v0.2.3
Compiling iovec v0.1.4
Compiling net2 v0.2.37
Compiling time v0.1.44
Compiling num_cpus v1.13.0
Compiling rand_os v0.1.3
Compiling signal-hook-registry v1.4.0
Compiling atty v0.2.14
Compiling quote v1.0.10
Compiling mio v0.7.14
Compiling aho-corasick v0.7.18
Compiling twoway v0.2.2
Compiling generic-array v0.12.4
Compiling idna v0.2.3
Compiling idna v0.1.5
Compiling rand_core v0.6.3
Compiling rand_core v0.5.1
Compiling mio v0.6.23
Compiling clap v2.33.4
Compiling tokio v1.15.0
Compiling regex v1.5.4
Compiling digest v0.8.1
Compiling block-buffer v0.7.3
Compiling block-buffer v0.9.0
Compiling digest v0.9.0
Compiling url v2.2.2
Compiling url v1.7.2
Compiling rand_chacha v0.3.1
Compiling rand_chacha v0.2.2
Compiling mio-uds v0.6.8
Compiling webpki v0.21.4
Compiling sct v0.6.1
Compiling chrono v0.4.19
Compiling thiserror-impl v1.0.30
Compiling tokio-macros v0.2.6
Compiling sha-1 v0.8.2
Compiling sha-1 v0.9.8
Compiling rand v0.8.4
Compiling rand v0.7.3
Compiling webpki-roots v0.17.0
Compiling rustls v0.16.0
Compiling flexi_logger v0.14.8
Compiling tiny_http v0.6.4
Compiling thiserror v1.0.30
Compiling tokio v0.2.25
Compiling tungstenite v0.10.1
Compiling tungstenite v0.16.0
Compiling futures-executor v0.3.17
Compiling bincode v1.3.3
Compiling toml v0.4.10
Compiling tokio-tungstenite v0.16.1
Compiling futures v0.3.17
Compiling async-tls v0.6.0
Compiling rsnova v0.2.0 (/tmp/build_3aa572f6)
warning: unused import: bytes::BytesMut
--> src/channel/rmux.rs:14:5
|
14 | use bytes::BytesMut;
| ^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
warning: unused import: std::error::Error
--> src/channel/rmux.rs:16:5
|
16 | use std::error::Error;
| ^^^^^^^^^^^^^^^^^
warning: unused import: AsyncRead
--> src/channel/rmux.rs:18:31
|
18 | use tokio::io::{AsyncBufRead, AsyncRead, AsyncWrite, AsyncWriteExt};
| ^^^^^^^^^
warning: unused import: crate::utils::make_io_error
--> src/rmux/crypto.rs:4:5
|
4 | use crate::utils::make_io_error;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unnecessary parentheses around block return value
--> src/rmux/event.rs:48:9
|
48 | (self.flag_len >> 8)
| ^ ^
|
= note: #[warn(unused_parens)] on by default
help: remove these parentheses
|
48 - (self.flag_len >> 8)
48 + self.flag_len >> 8
|
warning: unused import: new_window_update_event
--> src/rmux/session.rs:4:20
|
4 | new_syn_event, new_window_update_event, Event, FLAG_DATA, FLAG_FIN, FLAG_PING, FLAG_PONG,
| ^^^^^^^^^^^^^^^^^^^^^^^
warning: unused imports: Context, Poll
--> src/rmux/session.rs:21:17
|
21 | use std::task::{Context, Poll};
| ^^^^^^^ ^^^^
warning: unused imports: AtomicU32, Ordering
--> src/tunnel/relay.rs:9:25
|
9 | use std::sync::atomic::{AtomicU32, Ordering};
| ^^^^^^^^^ ^^^^^^^^
warning: unused import: std::error::Error
--> src/tunnel/ws.rs:9:5
|
9 | use std::error::Error;
| ^^^^^^^^^^^^^^^^^
warning: denote infinite loops with loop { ... }
--> src/utils/io.rs:210:5
|
210 | while true {
| ^^^^^^^^^^ help: use loop
|
= note: #[warn(while_true)] on by default
warning: denote infinite loops with loop { ... }
--> src/utils/io.rs:224:5
|
224 | while true {
| ^^^^^^^^^^ help: use loop
warning: unused import: std::net::ToSocketAddrs
--> src/utils/net.rs:20:9
|
20 | use std::net::ToSocketAddrs;
| ^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: std::error::Error
--> src/utils/ws.rs:5:5
|
5 | use std::error::Error;
| ^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound tokio::net::TcpStream: tokio::io::async_read::AsyncRead is not satisfied
--> src/tunnel/ws.rs:76:59
|
76 | let ws_stream = match tokio_tungstenite::accept_async(inbound).await {
| ------------------------------- ^^^^^^^ the trait tokio::io::async_read::AsyncRead is not implemented for tokio::net::TcpStream
| |
| required by a bound introduced by this call
|
note: required by a bound in accept_async
--> /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:123:8
|
123 | S: AsyncRead + AsyncWrite + Unpin,
| ^^^^^^^^^ required by this bound in accept_async
error[E0277]: the trait bound tokio::net::TcpStream: tokio::io::async_write::AsyncWrite is not satisfied
--> src/tunnel/ws.rs:76:59
|
76 | let ws_stream = match tokio_tungstenite::accept_async(inbound).await {
| ------------------------------- ^^^^^^^ the trait tokio::io::async_write::AsyncWrite is not implemented for tokio::net::TcpStream
| |
| required by a bound introduced by this call
|
note: required by a bound in accept_async
--> /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:123:20
|
123 | S: AsyncRead + AsyncWrite + Unpin,
| ^^^^^^^^^^ required by this bound in accept_async
error[E0599]: the method split exists for struct WebSocketStream<tokio::net::TcpStream>, but its trait bounds were not satisfied
--> src/tunnel/ws.rs:82:35
|
82 | let (write, read) = ws_stream.split();
| ^^^^^ method cannot be called on WebSocketStream<tokio::net::TcpStream> due to unsatisfied trait bounds
|
::: /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:183:1
|
183 | pub struct WebSocketStream {
| -----------------------------
| |
| doesn't satisfy _: futures::StreamExt
| doesn't satisfy _: futures::Stream
|
= note: the following trait bounds were not satisfied:
WebSocketStream<tokio::net::TcpStream>: futures::Stream
which is required by WebSocketStream<tokio::net::TcpStream>: futures::StreamExt
&WebSocketStream<tokio::net::TcpStream>: futures::Stream
which is required by &WebSocketStream<tokio::net::TcpStream>: futures::StreamExt
&mut WebSocketStream<tokio::net::TcpStream>: futures::Stream
which is required by &mut WebSocketStream<tokio::net::TcpStream>: futures::StreamExt
error[E0277]: the trait bound tokio::net::TcpStream: tokio::io::async_read::AsyncRead is not satisfied
--> src/channel/rmux.rs:161:65
|
161 | let ws = match tokio_tungstenite::client_async(url, conn).await {
| ------------------------------- ^^^^ the trait tokio::io::async_read::AsyncRead is not implemented for tokio::net::TcpStream
| |
| required by a bound introduced by this call
|
note: required by a bound in client_async
--> /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:83:8
|
83 | S: AsyncRead + AsyncWrite + Unpin,
| ^^^^^^^^^ required by this bound in client_async
error[E0277]: the trait bound tokio::net::TcpStream: tokio::io::async_write::AsyncWrite is not satisfied
--> src/channel/rmux.rs:161:65
|
161 | let ws = match tokio_tungstenite::client_async(url, conn).await {
| ------------------------------- ^^^^ the trait tokio::io::async_write::AsyncWrite is not implemented for tokio::net::TcpStream
| |
| required by a bound introduced by this call
|
note: required by a bound in client_async
--> /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:83:20
|
83 | S: AsyncRead + AsyncWrite + Unpin,
| ^^^^^^^^^^ required by this bound in client_async
error[E0599]: the method split exists for struct WebSocketStream<tokio::net::TcpStream>, but its trait bounds were not satisfied
--> src/channel/rmux.rs:165:36
|
165 | let (write, read) = ws.split();
| ^^^^^ method cannot be called on WebSocketStream<tokio::net::TcpStream> due to unsatisfied trait bounds
|
::: /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:183:1
|
183 | pub struct WebSocketStream {
| -----------------------------
| |
| doesn't satisfy _: futures::StreamExt
| doesn't satisfy _: futures::Stream
|
= note: the following trait bounds were not satisfied:
WebSocketStream<tokio::net::TcpStream>: futures::Stream
which is required by WebSocketStream<tokio::net::TcpStream>: futures::StreamExt
&WebSocketStream<tokio::net::TcpStream>: futures::Stream
which is required by &WebSocketStream<tokio::net::TcpStream>: futures::StreamExt
&mut WebSocketStream<tokio::net::TcpStream>: futures::Stream
which is required by &mut WebSocketStream<tokio::net::TcpStream>: futures::StreamExt
error[E0277]: the trait bound AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>: tokio::io::async_read::AsyncRead is not satisfied
--> src/channel/rmux.rs:182:65
|
182 | let ws = match tokio_tungstenite::client_async(url, conn).await {
| ------------------------------- ^^^^ the trait tokio::io::async_read::AsyncRead is not implemented for AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>
| |
| required by a bound introduced by this call
|
note: required by a bound in client_async
--> /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:83:8
|
83 | S: AsyncRead + AsyncWrite + Unpin,
| ^^^^^^^^^ required by this bound in client_async
error[E0277]: the trait bound AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>: tokio::io::async_write::AsyncWrite is not satisfied
--> src/channel/rmux.rs:182:65
|
182 | let ws = match tokio_tungstenite::client_async(url, conn).await {
| ------------------------------- ^^^^ the trait tokio::io::async_write::AsyncWrite is not implemented for AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>
| |
| required by a bound introduced by this call
|
note: required by a bound in client_async
--> /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:83:20
|
83 | S: AsyncRead + AsyncWrite + Unpin,
| ^^^^^^^^^^ required by this bound in client_async
error[E0599]: the method split exists for struct WebSocketStream<AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>>, but its trait bounds were not satisfied
--> src/channel/rmux.rs:186:36
|
186 | let (write, read) = ws.split();
| ^^^^^ method cannot be called on WebSocketStream<AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>> due to unsatisfied trait bounds
|
::: /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.16.1/src/lib.rs:183:1
|
183 | pub struct WebSocketStream {
| -----------------------------
| |
| doesn't satisfy _: futures::StreamExt
| doesn't satisfy _: futures::Stream
|
= note: the following trait bounds were not satisfied:
WebSocketStream<AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>>: futures::Stream
which is required by WebSocketStream<AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>>: futures::StreamExt
&WebSocketStream<AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>>: futures::Stream
which is required by &WebSocketStream<AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>>: futures::StreamExt
&mut WebSocketStream<AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>>: futures::Stream
which is required by &mut WebSocketStream<AsyncTokioIO<async_tls::client::TlsStream<AsyncTcpStream>>>: futures::StreamExt
error[E0599]: the method poll_next exists for struct Pin<&mut &mut SplitStream<WebSocketStream<S>>>, but its trait bounds were not satisfied
--> src/utils/ws.rs:33:22
|
33 | match stream.poll_next(cx) {
| ^^^^^^^^^ method cannot be called on Pin<&mut &mut SplitStream<WebSocketStream<S>>> due to unsatisfied trait bounds
|
::: /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.17/src/stream/stream/split.rs:14:1
|
14 | pub struct SplitStream(BiLock);
| ------------------------------------- doesn't satisfy SplitStream<WebSocketStream<S>>: futures::Stream
|
= note: the following trait bounds were not satisfied:
SplitStream<WebSocketStream<S>>: futures::Stream
which is required by &mut SplitStream<WebSocketStream<S>>: futures::Stream
error[E0599]: the method send exists for mutable reference &mut SplitSink<WebSocketStream<S>, tungstenite::Message>, but its trait bounds were not satisfied
--> src/utils/ws.rs:98:27
|
98 | let future = sink.send(msg);
| ^^^^ method cannot be called on &mut SplitSink<WebSocketStream<S>, tungstenite::Message> due to unsatisfied trait bounds
|
::: /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.17/src/stream/stream/split.rs:47:1
|
47 | pub struct SplitSink<S, Item> {
| -----------------------------
| |
| doesn't satisfy _: SinkExt<_>
| doesn't satisfy _: futures::Sink<_>
|
= note: the following trait bounds were not satisfied:
SplitSink<WebSocketStream<S>, tungstenite::Message>: futures::Sink<_>
which is required by SplitSink<WebSocketStream<S>, tungstenite::Message>: SinkExt<_>
&mut SplitSink<WebSocketStream<S>, tungstenite::Message>: futures::Sink<_>
which is required by &mut SplitSink<WebSocketStream<S>, tungstenite::Message>: SinkExt<_>
error[E0599]: no method named as_mut found for struct Pin<&mut _> in the current scope
--> src/utils/ws.rs:100:22
|
100 | match future.as_mut().poll(cx) {
| ^^^^^^ method not found in Pin<&mut _>
|
= note: the method was found for
- Pin<P>
= note: future is a function, perhaps you wish to call it
error[E0599]: the method close exists for mutable reference &mut SplitSink<WebSocketStream<S>, tungstenite::Message>, but its trait bounds were not satisfied
--> src/utils/ws.rs:114:27
|
114 | let future = sink.close();
| ^^^^^ method cannot be called on &mut SplitSink<WebSocketStream<S>, tungstenite::Message> due to unsatisfied trait bounds
|
::: /tmp/codon/tmp/cache/cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.17/src/stream/stream/split.rs:47:1
|
47 | pub struct SplitSink<S, Item> {
| -----------------------------
| |
| doesn't satisfy _: SinkExt<_>
| doesn't satisfy _: futures::Sink<_>
|
= note: the following trait bounds were not satisfied:
SplitSink<WebSocketStream<S>, tungstenite::Message>: futures::Sink<_>
which is required by SplitSink<WebSocketStream<S>, tungstenite::Message>: SinkExt<_>
&mut SplitSink<WebSocketStream<S>, tungstenite::Message>: futures::Sink<_>
which is required by &mut SplitSink<WebSocketStream<S>, tungstenite::Message>: SinkExt<_>
error[E0599]: no method named as_mut found for struct Pin<&mut _> in the current scope
--> src/utils/ws.rs:116:22
|
116 | match future.as_mut().poll(cx) {
| ^^^^^^ method not found in Pin<&mut _>
|
= note: the method was found for
- Pin<P>
= note: future is a function, perhaps you wish to call it
warning: unused import: futures::StreamExt
--> src/channel/rmux.rs:15:5
|
15 | use futures::StreamExt;
| ^^^^^^^^^^^^^^^^^^
warning: unused import: futures::StreamExt
--> src/tunnel/ws.rs:8:5
|
8 | use futures::StreamExt;
| ^^^^^^^^^^^^^^^^^^
warning: unused import: Future
--> src/utils/ws.rs:4:15
|
4 | use futures::{Future, SinkExt, Stream};
| ^^^^^^
warning: unused import: SinkExt
--> src/utils/ws.rs:4:23
|
4 | use futures::{Future, SinkExt, Stream};
| ^^^^^^^
warning: unused import: Stream
--> src/utils/ws.rs:4:32
|
4 | use futures::{Future, SinkExt, Stream};
| ^^^^^^
Some errors have detailed explanations: E0277, E0599.
For more information about an error, try rustc --explain E0277.
warning: rsnova (lib) generated 18 warnings
error: could not compile rsnova due to 14 previous errors; 18 warnings emitted
warning: build failed, waiting for other jobs to finish...
error: build failed
! Push rejected, failed to compile Rust app.
! Push failed

heroku failed

client.toml on pc
[log]
logtostderr = true
level = "info"
logdir = "./"

[[tunnel]]
listen = "127.0.0.1:48100"
pac=[{host = ".*", channel = "ws"}]

[[channel]]
name = "ws"
url = "ws://rsnova***.herokuapp.com:80"
ping_interval_sec = 100
conns_per_host = 5
max_alive_mins = 70
cipher = {key="****", method = "chacha20poly1305"}

server heroku.toml
[log]
logtostderr = false
level = "info"
logdir = ""

[[tunnel]]

listen address of tunnel server

listen = "ws://0.0.0.0"

pac rule to relay traffic, 'direct' is special channel which relay direct to remote target server

pac=[{host = ".", channel = "direct"}]
cipher = {key="
**************", method = "chacha20poly1305"}

failed
server
2020-03-09T03:00:55.216718+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=rsnova***.herokuapp.com request_id=1a107577-5aab-4323-9a22-d7ba65c70414 fwd="******" dyno= connect= service= status=503 bytes= protocol=http

client
[�[1;38;5;196m2020-03-09 11:01:39.757053 +00:00�[0m] �[1;38;5;196mERROR�[0m [src\channel\routine.rs:34] �[1;38;5;196mFailed to init_rmux_client; error=�[0m

dyno
./target/release/rsnova -c ./heroku.toml

that failed
and i like pac mode at gsnova
will rsnova support IsCNIP?
thanx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.