-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(duplex): make oblivion full duplex
- Loading branch information
Showing
12 changed files
with
271 additions
and
315 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "oblivion" | ||
version = "1.3.0" | ||
version = "2.0.0" | ||
authors = ["苏向夜 <[email protected]>"] | ||
description = "Rust High Concurrency Implementation of Oblivion, an End-to-End Encryption Protocol Based on ECDHE Encryption Algorithm" | ||
edition = "2021" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
//! # Oblivion Default Handler | ||
use super::{render::BaseResponse, render::Response}; | ||
use crate::utils::parser::OblivionRequest; | ||
use oblivion_codegen::async_route; | ||
use super::render::{BaseResponse, Response}; | ||
use super::session::Session; | ||
use futures::FutureExt; | ||
|
||
/// Not Found Handler | ||
/// | ||
/// Handling a non-existent route request. | ||
#[async_route] | ||
pub fn not_found(mut request: OblivionRequest) -> Response { | ||
Ok(BaseResponse::TextResponse( | ||
format!( | ||
"Path {} is not found, error with code 404.", | ||
request.get_olps() | ||
), | ||
404, | ||
)) | ||
pub fn not_found(session: &mut Session) -> Response { | ||
let olps = session.request.as_mut().unwrap().get_ip(); | ||
async move { | ||
Ok(BaseResponse::TextResponse( | ||
format!("Path {} is not found, error with code 404.", olps), | ||
404, | ||
)) | ||
} | ||
.boxed() | ||
} |
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ pub mod packet; | |
pub mod render; | ||
pub mod router; | ||
pub mod server; | ||
// pub mod session; | ||
pub mod session; |
Oops, something went wrong.