Update proxy to handle traffic

This commit is contained in:
KingRainbow44
2022-05-16 01:57:34 -04:00
parent 167e13c941
commit acb59ce8a4
7 changed files with 84 additions and 21 deletions

View File

@@ -4,6 +4,7 @@ windows_subsystem = "windows"
)]
use open;
use tokio::sync::oneshot::Sender;
use structs::{APIQuery};
mod file_helpers;
@@ -38,17 +39,20 @@ fn main() {
#[tauri::command]
async fn connect(port: u16) {
// Log message to console.
println!("Connecting to proxy...");
// Create and start a proxy.
proxy::create_proxy(port).await;
println!("Connecting to proxy...");
// Change proxy settings.
proxy::connect_to_proxy(port);
// Create and start a proxy.
proxy::create_proxy(port).await;
}
#[tauri::command]
fn disconnect() {
// Log message to console.
println!("Disconnecting from proxy...");
// Change proxy settings.
proxy::disconnect_from_proxy();
}