diff --git a/public/manifest.json b/public/manifest.json index 080d6c7..ff7cc59 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "Cultivation", + "name": "Cultivation", "icons": [ { "src": "favicon.ico", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 3bc5387..68a6876 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -622,10 +622,14 @@ name = "cultivation" version = "0.1.0" dependencies = [ "hudsucker", + "rustls-pemfile", "serde", "serde_json", "tauri", "tauri-build", + "tokio-rustls", + "tokio-tungstenite", + "tracing", ] [[package]] @@ -2698,6 +2702,15 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" +dependencies = [ + "base64", +] + [[package]] name = "rustversion" version = "1.0.6" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 0689d45..2de6f6b 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -18,7 +18,12 @@ tauri-build = { version = "1.0.0-rc.8", features = [] } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } tauri = { version = "1.0.0-rc.9", features = ["dialog-all", "fs-create-dir", "fs-read-dir", "fs-read-file", "fs-write-file", "path-all"] } + hudsucker = "0.17.2" +tracing = "0.1.34" +tokio-rustls = "0.23.4" +tokio-tungstenite = "0.17.1" +rustls-pemfile = "1.0.0" [features] # by default Tauri runs in production mode diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index e994ea4..013e7bd 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -3,8 +3,19 @@ windows_subsystem = "windows" )] +mod proxy; + +use tauri::{ + command +}; + fn main() { tauri::Builder::default() .run(tauri::generate_context!()) .expect("error while running tauri application"); } + +#[tauri::command] +fn connect() { + +} \ No newline at end of file diff --git a/src-tauri/src/proxy.rs b/src-tauri/src/proxy.rs new file mode 100644 index 0000000..4277c09 --- /dev/null +++ b/src-tauri/src/proxy.rs @@ -0,0 +1,21 @@ +/* + * Built on example code from: + * https://github.com/omjadas/hudsucker/blob/main/examples/log.rs + */ + +use hudsucker::{ + async_trait::async_trait, + certificate_authority::RcgenAuthority, + hyper::{Body, Request, Response}, + *, +}; +use std::net::SocketAddr; +use tracing::*; +use tokio_tungstenite::tungstenite::Message; + +/** + * Starts an HTTP(S) proxy server. + */ +async fn start_proxy() { + +} \ No newline at end of file