chore: anti pretendo people note and cleanup
This commit is contained in:
parent
4e83068662
commit
c698e0b3dd
25 changed files with 69 additions and 682 deletions
|
|
@ -1,32 +1,17 @@
|
|||
use rnex_core::reggie::{RemoteEdgeNodeHolder, UnitPacketRead};
|
||||
use log::{error, info};
|
||||
use once_cell::sync::Lazy;
|
||||
use rustls::client::danger::HandshakeSignatureValid;
|
||||
use rustls::pki_types::{CertificateDer, TrustAnchor, UnixTime};
|
||||
use rustls::server::danger::{ClientCertVerified, ClientCertVerifier};
|
||||
use rustls::server::{ClientCertVerifierBuilder, WebPkiClientVerifier};
|
||||
use rustls::{
|
||||
DigitallySignedStruct, DistinguishedName, Error, RootCertStore, ServerConfig, ServerConnection,
|
||||
SignatureScheme,
|
||||
};
|
||||
use rustls_pki_types::PrivateKeyDer;
|
||||
use rnex_core::common::setup;
|
||||
use std::borrow::ToOwned;
|
||||
use std::{env, fs};
|
||||
use std::{env};
|
||||
use std::io::Cursor;
|
||||
use std::net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4};
|
||||
use std::net::SocketAddrV4;
|
||||
use std::sync::Arc;
|
||||
use macros::{method_id, rmc_proto, rmc_struct};
|
||||
use tokio::io::AsyncReadExt;
|
||||
use tokio::net::{TcpListener, TcpSocket, TcpStream};
|
||||
use tokio::net::{TcpListener, TcpStream};
|
||||
use tokio::task;
|
||||
use tokio_rustls::TlsAcceptor;
|
||||
use rnex_core::define_rmc_proto;
|
||||
use rnex_core::executables::common::{OWN_IP_PRIVATE, SECURE_SERVER_ACCOUNT, SERVER_PORT};
|
||||
use rnex_core::nex::auth_handler::AuthHandler;
|
||||
use rnex_core::reggie::EdgeNodeHolderConnectOption::DontRegister;
|
||||
use rnex_core::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote};
|
||||
use rnex_core::rmc::response::ErrorCode;
|
||||
use rnex_core::rmc::structures::RmcSerialize;
|
||||
use rnex_core::rnex_proxy_common::ConnectionInitData;
|
||||
use rnex_core::util::SplittableBufferConnection;
|
||||
|
|
@ -57,7 +42,7 @@ async fn main() {
|
|||
|
||||
|
||||
|
||||
while let Ok((mut stream, addr)) = listen.accept().await {
|
||||
while let Ok((mut stream, _addr)) = listen.accept().await {
|
||||
let buffer = match stream.read_buffer().await{
|
||||
Ok(v) => v,
|
||||
Err(e) => {
|
||||
|
|
@ -68,7 +53,7 @@ async fn main() {
|
|||
|
||||
let user_connection_data = ConnectionInitData::deserialize(&mut Cursor::new(buffer));
|
||||
|
||||
let user_connection_data = match user_connection_data{
|
||||
let _user_connection_data = match user_connection_data{
|
||||
Ok(v) => v,
|
||||
Err(e) => {
|
||||
error!("an error ocurred whilest reading connection data: {:?}", e);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
use std::io::Cursor;
|
||||
use rnex_core::rmc::structures::RmcSerialize;
|
||||
use rnex_core::reggie::{RemoteEdgeNodeHolder, UnitPacketRead};
|
||||
use rnex_core::reggie::UnitPacketRead;
|
||||
use std::net::SocketAddrV4;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::AtomicU32;
|
||||
use log::{error, info};
|
||||
use tokio::net::{TcpListener, TcpStream};
|
||||
use tokio::net::TcpListener;
|
||||
use tokio::task;
|
||||
use rnex_core::common::setup;
|
||||
use rnex_core::executables::common::{OWN_IP_PRIVATE, SERVER_PORT};
|
||||
use rnex_core::nex::matchmake::MatchmakeManager;
|
||||
use rnex_core::nex::remote_console::RemoteConsole;
|
||||
use rnex_core::nex::user::User;
|
||||
use rnex_core::reggie::EdgeNodeHolderConnectOption::DontRegister;
|
||||
use rnex_core::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote};
|
||||
use rnex_core::rmc::protocols::new_rmc_gateway_connection;
|
||||
use rnex_core::rnex_proxy_common::ConnectionInitData;
|
||||
use rnex_core::rmc::protocols::RemoteInstantiatable;
|
||||
use rnex_core::util::SplittableBufferConnection;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
|
|
@ -35,7 +33,7 @@ async fn main() {
|
|||
|
||||
MatchmakeManager::initialize_garbage_collect_thread(weak_mmm).await;
|
||||
|
||||
while let Ok((mut stream, addr)) = listen.accept().await {
|
||||
while let Ok((mut stream, _addr)) = listen.accept().await {
|
||||
let buffer = match stream.read_buffer().await{
|
||||
Ok(v) => v,
|
||||
Err(e) => {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
use std::env;
|
||||
use std::net::{Ipv4Addr, SocketAddrV4};
|
||||
use macros::{method_id, rmc_proto, RmcSerialize};
|
||||
use std::net::Ipv4Addr;
|
||||
use once_cell::sync::Lazy;
|
||||
use tonic::transport::Server;
|
||||
use crate::define_rmc_proto;
|
||||
use crate::prudp::station_url::StationUrl;
|
||||
use crate::nex::account::Account;
|
||||
use crate::rmc::response::ErrorCode;
|
||||
|
||||
pub static OWN_IP_PRIVATE: Lazy<Ipv4Addr> = Lazy::new(|| {
|
||||
env::var("SERVER_IP")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
use std::io::Cursor;
|
||||
use std::net::SocketAddrV4;
|
||||
use std::sync::{Arc, Weak};
|
||||
use log::error;
|
||||
use macros::rmc_struct;
|
||||
use tokio::net::TcpListener;
|
||||
use tokio::sync::RwLock;
|
||||
|
|
@ -56,7 +55,7 @@ async fn main() {
|
|||
|
||||
let holder: Arc<DataHolder> = Default::default();
|
||||
|
||||
while let Ok((mut stream, addr)) = listen.accept().await {
|
||||
while let Ok((stream, _addr)) = listen.accept().await {
|
||||
let mut conn: SplittableBufferConnection = stream.into();
|
||||
|
||||
let Some(data) = conn.recv().await else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue