-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rucimp: +IpRelayTest1; lua example:+ config_16_tun; fix 3 bugs
fix tun auto route direct_list not working bug fix ws client earlyconn early read bug fix http header host checking bug
- Loading branch information
1 parent
ae430e3
commit 1753b1e
Showing
11 changed files
with
166 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use async_trait::async_trait; | ||
use macro_map::*; | ||
use ruci::{ | ||
map::{self, Map, MapParams, MapResult, ProxyBehavior}, | ||
net::{Addr, CID}, | ||
Name, | ||
}; | ||
|
||
#[map_ext_fields] | ||
#[derive(Debug, Clone, Default, MapExt)] | ||
pub struct IpTest1 {} | ||
|
||
impl Name for IpTest1 { | ||
fn name(&self) -> &'static str { | ||
"ip_relay_test1" | ||
} | ||
} | ||
|
||
#[async_trait] | ||
impl Map for IpTest1 { | ||
async fn maps(&self, _cid: CID, behavior: ProxyBehavior, params: MapParams) -> MapResult { | ||
match behavior { | ||
ProxyBehavior::UNSPECIFIED => panic!("impossible"), | ||
ProxyBehavior::ENCODE => MapResult::builder() | ||
.a(params.a) | ||
.b(params.b) | ||
.c(params.c) | ||
.build(), | ||
ProxyBehavior::DECODE => MapResult::builder() | ||
.a(Some(Addr::from_network_addr_url("ip://0.0.0.0").unwrap())) | ||
.b(params.b) | ||
.c(params.c) | ||
.build(), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ pub mod ws; | |
|
||
pub mod quic_common; | ||
|
||
pub mod ip; | ||
|
||
#[cfg(feature = "quic")] | ||
pub mod quic; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters