fix: rename crate to rust_nex

This commit is contained in:
DJMrTV 2025-06-13 10:10:04 +02:00
commit 35cee07591
10 changed files with 87 additions and 87 deletions

View file

@ -9,8 +9,8 @@ use rustls::{
SignatureScheme,
};
use rustls_pki_types::PrivateKeyDer;
use splatoon_server_rust::common::setup;
use splatoon_server_rust::reggie::{get_configured_tls_acceptor, TestStruct, ROOT_TRUST_ANCHOR, SELF_CERT, SELF_KEY};
use rust_nex::common::setup;
use rust_nex::reggie::{get_configured_tls_acceptor, TestStruct, ROOT_TRUST_ANCHOR, SELF_CERT, SELF_KEY};
use std::borrow::ToOwned;
use std::fs;
use std::io::Cursor;
@ -21,10 +21,10 @@ use tokio::io::AsyncReadExt;
use tokio::net::{TcpListener, TcpSocket};
use tokio::task;
use tokio_rustls::TlsAcceptor;
use splatoon_server_rust::define_rmc_proto;
use splatoon_server_rust::rmc::protocols::new_rmc_gateway_connection;
use splatoon_server_rust::rmc::response::ErrorCode;
use splatoon_server_rust::rmc::structures::RmcSerialize;
use rust_nex::define_rmc_proto;
use rust_nex::rmc::protocols::new_rmc_gateway_connection;
use rust_nex::rmc::response::ErrorCode;
use rust_nex::rmc::structures::RmcSerialize;

View file

@ -17,13 +17,13 @@ use rsa::signature::{RandomizedSigner, SignatureEncoding};
use sha2::Sha256;
use tokio::net::TcpSocket;
use tokio::task;
use splatoon_server_rust::common::setup;
use splatoon_server_rust::prudp::packet::VirtualPort;
use splatoon_server_rust::prudp::router::Router;
use splatoon_server_rust::prudp::unsecure::Unsecure;
use splatoon_server_rust::reggie::{establish_tls_connection_to, UnitPacketRead, UnitPacketWrite};
use splatoon_server_rust::rmc::structures::RmcSerialize;
use splatoon_server_rust::rnex_proxy_common::ConnectionInitData;
use rust_nex::common::setup;
use rust_nex::prudp::packet::VirtualPort;
use rust_nex::prudp::router::Router;
use rust_nex::prudp::unsecure::Unsecure;
use rust_nex::reggie::{establish_tls_connection_to, UnitPacketRead, UnitPacketWrite};
use rust_nex::rmc::structures::RmcSerialize;
use rust_nex::rnex_proxy_common::ConnectionInitData;
static OWN_IP_PRIVATE: Lazy<Ipv4Addr> = Lazy::new(|| {
env::var("SERVER_IP")

View file

@ -1,4 +1,4 @@
extern crate self as splatoon_server_rust;
extern crate self as rust_nex;
pub mod endianness;
pub mod prudp;

View file

@ -7,7 +7,7 @@
//! also the first and only current usage of rnex, expect this and rnex to be split into seperate
//! repos soon.
extern crate self as splatoon_server_rust;
extern crate self as rust_nex;
use crate::nex::account::Account;
use crate::nex::auth_handler::{AuthHandler, RemoteAuthClientProtocol};

View file

@ -157,7 +157,7 @@ macro_rules! define_rmc_proto {
}) => {
paste::paste!{
pub trait [<Local $name>]: std::any::Any $( + [<Raw $protocol>] + $protocol)* {
async fn rmc_call(&self, remote_response_connection: &splatoon_server_rust::util::SendingBufferConnection, protocol_id: u16, method_id: u32, call_id: u32, rest: Vec<u8>){
async fn rmc_call(&self, remote_response_connection: &rust_nex::util::SendingBufferConnection, protocol_id: u16, method_id: u32, call_id: u32, rest: Vec<u8>){
match protocol_id{
$(
[<Raw $protocol Info>]::PROTOCOL_ID => <Self as [<Raw $protocol>]>::rmc_call_proto(self, remote_response_connection, method_id, call_id, rest).await,
@ -167,16 +167,16 @@ macro_rules! define_rmc_proto {
}
}
pub struct [<Remote $name>](splatoon_server_rust::rmc::protocols::RmcConnection);
pub struct [<Remote $name>](rust_nex::rmc::protocols::RmcConnection);
impl splatoon_server_rust::rmc::protocols::RemoteInstantiatable for [<Remote $name>]{
fn new(conn: splatoon_server_rust::rmc::protocols::RmcConnection) -> Self{
impl rust_nex::rmc::protocols::RemoteInstantiatable for [<Remote $name>]{
fn new(conn: rust_nex::rmc::protocols::RmcConnection) -> Self{
Self(conn)
}
}
impl splatoon_server_rust::rmc::protocols::HasRmcConnection for [<Remote $name>]{
fn get_connection(&self) -> &splatoon_server_rust::rmc::protocols::RmcConnection{
impl rust_nex::rmc::protocols::HasRmcConnection for [<Remote $name>]{
fn get_connection(&self) -> &rust_nex::rmc::protocols::RmcConnection{
&self.0
}
}

View file

@ -5,7 +5,7 @@ use log::error;
use tokio::io::{AsyncRead, AsyncWrite};
use tokio::sync::mpsc::{channel, Receiver, Sender};
use tokio::task;
use splatoon_server_rust::reggie::{UnitPacketRead, UnitPacketWrite};
use rust_nex::reggie::{UnitPacketRead, UnitPacketWrite};
#[derive(Clone)]
pub struct SendingBufferConnection(Sender<Vec<u8>>);