mirror of
https://git.proxmox.com/git/proxmox-websocket-tunnel
synced 2025-04-30 14:07:16 +00:00
cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
f8faa2c3f0
commit
941f0305a2
26
src/main.rs
26
src/main.rs
@ -38,26 +38,32 @@ type CmdData = Map<String, Value>;
|
|||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
struct ConnectCmdData {
|
struct ConnectCmdData {
|
||||||
// target URL for WS connection
|
/// target URL for WS connection
|
||||||
url: String,
|
url: String,
|
||||||
// fingerprint of TLS certificate
|
|
||||||
|
/// fingerprint of TLS certificate
|
||||||
fingerprint: Option<String>,
|
fingerprint: Option<String>,
|
||||||
// addition headers such as authorization
|
|
||||||
|
/// addition headers such as authorization
|
||||||
headers: Option<Vec<(String, String)>>,
|
headers: Option<Vec<(String, String)>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
struct ForwardCmdData {
|
struct ForwardCmdData {
|
||||||
// target URL for WS connection
|
/// target URL for WS connection
|
||||||
url: String,
|
url: String,
|
||||||
// addition headers such as authorization
|
|
||||||
|
/// addition headers such as authorization
|
||||||
headers: Option<Vec<(String, String)>>,
|
headers: Option<Vec<(String, String)>>,
|
||||||
// fingerprint of TLS certificate
|
|
||||||
|
/// fingerprint of TLS certificate
|
||||||
fingerprint: Option<String>,
|
fingerprint: Option<String>,
|
||||||
// local UNIX socket path for forwarding
|
|
||||||
|
/// local UNIX socket path for forwarding
|
||||||
unix: String,
|
unix: String,
|
||||||
// request ticket using these parameters
|
|
||||||
|
/// request ticket using these parameters
|
||||||
ticket: Option<Map<String, Value>>,
|
ticket: Option<Map<String, Value>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,10 +436,6 @@ impl CtrlTunnel {
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), Error> {
|
async fn main() -> Result<(), Error> {
|
||||||
do_main().await
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn do_main() -> Result<(), Error> {
|
|
||||||
let tunnel = CtrlTunnel { sender: None };
|
let tunnel = CtrlTunnel { sender: None };
|
||||||
tunnel.read_cmd_loop().await
|
tunnel.read_cmd_loop().await
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user