feat: split rmc off from prudp, make macros crate location independent and add tls connection setup
This commit is contained in:
parent
0a1e49d9bc
commit
9da91bb835
24 changed files with 1218 additions and 420 deletions
26
src/executables/proxy_secure.rs
Normal file
26
src/executables/proxy_secure.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use splatoon_server_rust::reggie::RemoteRmcTestProto;
|
||||
use std::fs;
|
||||
use std::net::IpAddr;
|
||||
use std::sync::Arc;
|
||||
use rustls::ClientConfig;
|
||||
use rustls_pki_types::ServerName;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tokio::net::TcpStream;
|
||||
use tokio_rustls::{TlsConnector, TlsStream};
|
||||
use splatoon_server_rust::common::setup;
|
||||
use splatoon_server_rust::reggie::{establish_tls_connection_to, get_configured_tls_connector, RemoteTestProto, UnitPacketWrite};
|
||||
use splatoon_server_rust::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote};
|
||||
use splatoon_server_rust::rmc::structures::RmcSerialize;
|
||||
|
||||
|
||||
#[tokio::main]
|
||||
async fn main(){
|
||||
setup();
|
||||
|
||||
let mut stream
|
||||
= establish_tls_connection_to("192.168.178.120:2376", "account.spfn.net").await;
|
||||
|
||||
let remo = new_rmc_gateway_connection(stream.into(), |r| Arc::new(OnlyRemote::<RemoteTestProto>::new(r)) );
|
||||
|
||||
println!("{:?}", remo.test().await);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue