All checks were successful
Build and Test / fast-racing-neo (push) Successful in 16m31s
Build and Test / splatoon (push) Successful in 17m7s
Build and Test / puyopuyo (push) Successful in 17m7s
Build and Test / mario-tennis (push) Successful in 17m17s
Build and Test / minecraft-wiiu (push) Successful in 17m20s
Build and Test / wii-u-chat (push) Successful in 17m20s
Build and Test / splatoon-testfire (push) Successful in 17m23s
Build and Test / wii-sports-club (push) Successful in 17m25s
Build and Test / super-mario-maker (push) Successful in 21m26s
Build and Test / sonic-transformed (push) Successful in 28m35s
Build and Test / friends (push) Successful in 29m31s
48 lines
1.5 KiB
Rust
48 lines
1.5 KiB
Rust
use once_cell::sync::Lazy;
|
|
use rnex_core::common::with_setup;
|
|
use rnex_core::executables::common::{SECURE_SERVER_ACCOUNT, new_simple_backend};
|
|
use rnex_core::nex::auth_handler::AuthHandler;
|
|
use rnex_core::reggie::EdgeNodeHolderConnectOption::DontRegister;
|
|
use rnex_core::reggie::RemoteEdgeNodeHolder;
|
|
use rnex_core::rmc::protocols::{OnlyRemote, new_rmc_gateway_connection};
|
|
use rnex_core::rmc::structures::RmcSerialize;
|
|
use rnex_core::util::SplittableBufferConnection;
|
|
use std::env;
|
|
use std::net::SocketAddrV4;
|
|
use std::sync::Arc;
|
|
use tokio::net::TcpStream;
|
|
|
|
pub static FORWARD_EDGE_NODE_HOLDER: Lazy<SocketAddrV4> = Lazy::new(|| {
|
|
env::var("FORWARD_EDGE_NODE_HOLDER")
|
|
.ok()
|
|
.and_then(|s| Some(s.parse().unwrap()))
|
|
.expect("FORWARD_EDGE_NODE_HOLDER not set")
|
|
});
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
with_setup(async || {
|
|
let conn = TcpStream::connect(&*FORWARD_EDGE_NODE_HOLDER)
|
|
.await
|
|
.unwrap();
|
|
|
|
let conn: SplittableBufferConnection = conn.into();
|
|
|
|
conn.send(DontRegister.to_data().unwrap()).await;
|
|
|
|
let conn = new_rmc_gateway_connection(conn, |r| {
|
|
Arc::new(OnlyRemote::<RemoteEdgeNodeHolder>::new(r))
|
|
});
|
|
|
|
new_simple_backend(move |_, _| {
|
|
let controller = conn.clone();
|
|
Arc::new(AuthHandler {
|
|
destination_server_acct: &SECURE_SERVER_ACCOUNT,
|
|
build_name: env!("AUTH_REPORT_VERSION"),
|
|
control_server: controller,
|
|
})
|
|
})
|
|
.await;
|
|
})
|
|
.await;
|
|
}
|