Skip to content

Commit

Permalink
unified local UDP association implementation
Browse files Browse the repository at this point in the history
NOTE: Every time when sending packets back to local listener will
require an allocation of Box<Pin<Future>> because GAT is not stablized
yet.
  • Loading branch information
zonyitoo committed Dec 31, 2020
1 parent e048bc2 commit 474e57a
Show file tree
Hide file tree
Showing 14 changed files with 735 additions and 1,127 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/shadowsocks-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ cfg_if! {

/// For Linux-like systems' Netfilter `REDIRECT`. Only for TCP connections.
///
/// This is supported from Linux 2.4 Kernel. Document: https://www.netfilter.org/documentation/index.html#documentation-howto
/// This is supported from Linux 2.4 Kernel. Document: <https://www.netfilter.org/documentation/index.html#documentation-howto>
///
/// NOTE: Filter rule `REDIRECT` can only be applied to TCP connections.
#[cfg(any(target_os = "linux", target_os = "android"))]
Expand All @@ -252,7 +252,7 @@ cfg_if! {
///
/// Supported by OpenBSD 3.0+, FreeBSD 5.3+, NetBSD 3.0+, Solaris 11.3+, macOS 10.7+, iOS, QNX
///
/// Document: https://www.freebsd.org/doc/handbook/firewalls-pf.html
/// Document: <https://www.freebsd.org/doc/handbook/firewalls-pf.html>
#[cfg(any(
target_os = "openbsd",
target_os = "freebsd",
Expand Down
9 changes: 6 additions & 3 deletions crates/shadowsocks-service/src/local/net/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//! Shadowsocks Local Network Utilities
pub use self::{auto_proxy_io::AutoProxyIo, auto_proxy_stream::AutoProxyClientStream};
pub use self::{
tcp::{auto_proxy_io::AutoProxyIo, auto_proxy_stream::AutoProxyClientStream},
udp::{UdpAssociationManager, UdpInboundWrite},
};

mod auto_proxy_io;
mod auto_proxy_stream;
mod tcp;
mod udp;
2 changes: 2 additions & 0 deletions crates/shadowsocks-service/src/local/net/tcp/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod auto_proxy_io;
pub mod auto_proxy_stream;
Loading

0 comments on commit 474e57a

Please sign in to comment.