diff --git a/Cargo.toml b/Cargo.toml index f4f835c..86b17cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,10 +8,6 @@ keywords = ["tun", "network", "tunnel", "vpn"] categories = ["network-programming", "asynchronous"] readme = "README.md" -[lib] -crate-type = ["cdylib"] -path = "src/main.rs" - [dependencies] clap = "2.33" aes-gcm = "0.10.3" diff --git a/src/client.rs b/src/client.rs index 42282fe..124a664 100644 --- a/src/client.rs +++ b/src/client.rs @@ -22,7 +22,7 @@ use crate::udp::{UDPVpnPacket, UDPVpnHandshake, UDPSerializable}; use network_interface::NetworkInterface; use network_interface::NetworkInterfaceConfig; -pub async fn client_mode(client_config: ClientConfiguration, fd: i32) -> i32 { +pub async fn client_mode(client_config: ClientConfiguration, fd: i32) { info!("Starting client..."); let sock = UdpSocket::bind("0.0.0.0:25565").await.unwrap(); @@ -140,6 +140,4 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) -> i32 { } } } - - -2 } \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index e39d23f..7e8751f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,10 @@ -#![cfg(target_os = "android")] +/*#![cfg(target_os = "android")] use jni::{ objects::{JClass, JString}, sys::{jboolean, jchar, jint}, JNIEnv, -}; +};*/ use std::{error::Error, fs, net::Ipv4Addr, str}; use clap::{App, Arg, ArgMatches}; use env_logger::Builder; @@ -15,8 +15,9 @@ use fast32::base32::RFC4648; mod config; mod client; mod udp; -mod mobile; +//mod mobile; +/* #[no_mangle] pub unsafe extern "C" fn Java_com_alterdekim_frida_FridaLib_run( mut env: JNIEnv, @@ -34,8 +35,8 @@ pub unsafe extern "C" fn Java_com_alterdekim_frida_FridaLib_run( pub unsafe extern "C" fn Java_com_alterdekim_frida_FridaLib_stop(_env: JNIEnv, _: JClass) -> jint { mobile::mobile_stop() } + */ -/* #[tokio::main] async fn main() { // Initialize the logger with 'info' as the default level @@ -66,4 +67,4 @@ async fn main() { let config: ClientConfiguration = serde_yaml::from_slice(RFC4648.decode(cfg_raw.as_bytes()).unwrap().as_slice()).expect("Bad client config file structure"); client::client_mode(config, matches.value_of("fd").unwrap().parse().unwrap()).await; -}*/ \ No newline at end of file +} \ No newline at end of file