mirror of
https://git.proxmox.com/git/proxmox-websocket-tunnel
synced 2025-04-29 18:14:04 +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)]
|
||||
#[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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user