Skip to content

Commit 73ec21e

Browse files
feat(ironposh-web): allow disabling raw ui
1 parent ba32597 commit 73ec21e

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ironposh-web/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ironposh-web"
3-
version = "0.3.5"
3+
version = "0.3.7"
44
authors = ["irving ou <jou@devolutions.net>"]
55
edition = "2018"
66
description = "PowerShell Remoting over WinRM for WebAssembly"

crates/ironposh-web/src/conversions.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ impl From<WasmWinRmConfig> for WinRmConfig {
7979
client_computer_name,
8080
cols,
8181
rows,
82+
raw_ui_enabled,
8283
force_insecure,
8384
} = config;
8485

@@ -110,7 +111,12 @@ impl From<WasmWinRmConfig> for WinRmConfig {
110111
}
111112
};
112113

114+
let raw_ui_enabled = raw_ui_enabled.unwrap_or(true);
115+
113116
let host_info = HostInfo::builder()
117+
.is_host_null(false)
118+
.is_host_ui_null(false)
119+
.is_host_raw_ui_null(!raw_ui_enabled)
114120
.host_default_data(
115121
HostDefaultData::builder()
116122
.buffer_size(size.clone())

crates/ironposh-web/src/types/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ pub struct WasmWinRmConfig {
389389
#[serde(default = "default_rows")]
390390
pub rows: u16,
391391

392+
/// Enable PSHostRawUserInterface (terminal/RawUI). Defaults to true.
393+
#[serde(default)]
394+
pub raw_ui_enabled: Option<bool>,
395+
392396
/// Force disable SSPI encryption even on TCP transport.
393397
/// WARNING: This makes the destination channel insecure!
394398
/// Only valid when transport is Tcp.

0 commit comments

Comments
 (0)