]> git.proxmox.com Git - proxmox-websocket-tunnel.git/commitdiff
cleanup
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 4 Feb 2022 10:54:36 +0000 (11:54 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 4 Feb 2022 10:54:36 +0000 (11:54 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/main.rs

index 8ca79295f9a192c15653dbcb4c1013127112342f..cefe565fd1b1290825539bb88ec1c4f6a8a15f77 100644 (file)
@@ -38,26 +38,32 @@ type CmdData = Map<String, Value>;
 #[derive(Serialize, Deserialize, Debug)]
 #[serde(rename_all = "kebab-case")]
 struct ConnectCmdData {
-    // target URL for WS connection
+    /// target URL for WS connection
     url: String,
-    // fingerprint of TLS certificate
+
+    /// fingerprint of TLS certificate
     fingerprint: Option<String>,
-    // addition headers such as authorization
+
+    /// addition headers such as authorization
     headers: Option<Vec<(String, String)>>,
 }
 
 #[derive(Serialize, Deserialize, Debug, Clone)]
 #[serde(rename_all = "kebab-case")]
 struct ForwardCmdData {
-    // target URL for WS connection
+    /// target URL for WS connection
     url: String,
-    // addition headers such as authorization
+
+    /// addition headers such as authorization
     headers: Option<Vec<(String, String)>>,
-    // fingerprint of TLS certificate
+
+    /// fingerprint of TLS certificate
     fingerprint: Option<String>,
-    // local UNIX socket path for forwarding
+
+    /// local UNIX socket path for forwarding
     unix: String,
-    // request ticket using these parameters
+
+    /// request ticket using these parameters
     ticket: Option<Map<String, Value>>,
 }
 
@@ -430,10 +436,6 @@ impl CtrlTunnel {
 
 #[tokio::main]
 async fn main() -> Result<(), Error> {
-    do_main().await
-}
-
-async fn do_main() -> Result<(), Error> {
     let tunnel = CtrlTunnel { sender: None };
     tunnel.read_cmd_loop().await
 }