microsandbox-rb 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/Cargo.lock +183 -74
- data/DESIGN.md +1 -1
- data/README.md +3 -2
- data/ext/microsandbox/Cargo.toml +5 -5
- data/ext/microsandbox/src/sandbox.rs +15 -2
- data/lib/microsandbox/ssh.rb +15 -2
- data/lib/microsandbox/version.rb +2 -2
- data/sig/microsandbox.rbs +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 241dfe5d94b8c98d3c790994698b004a591d66229d9965799fc5886b01e5a19d
|
|
4
|
+
data.tar.gz: a134b4cbb4b58a60d72d6a7ace30ab6333da4057d0868c1a6e351396b7ff4d00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c326c0481781ae1f3fc19994dfd8e4c004c4bdc8aa81b33e67386538f4fa9ff58cb84514955079c39daa09817c8eba65ac7d4ebe91ab34698ac5fce8cfa9c574
|
|
7
|
+
data.tar.gz: 1d93018f5982d2767cd66e29c50a195a3d138d7f60f93a2a3e6020384f41ce843e3a0b85d5152a2d17995a724ed9cc6169e72c0bcfc506017e7ae84b3acbe73f
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,38 @@ All notable changes to this gem are documented here. The format is based on
|
|
|
6
6
|
microsandbox runtime it embeds; each release notes the upstream runtime tag it
|
|
7
7
|
wraps, and the README's Versioning section keeps the full gem→runtime map.
|
|
8
8
|
|
|
9
|
+
## [0.15.0] - 2026-08-24
|
|
10
|
+
|
|
11
|
+
Adopts upstream runtime **`v0.6.9` → `v0.6.14`**, stepping through every
|
|
12
|
+
intermediate tag (v0.6.10, v0.6.11, v0.6.12, v0.6.13 each verified and
|
|
13
|
+
committed individually).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `ssh.open_client` and `ssh.prepare_server` accept `inactivity_timeout:` —
|
|
18
|
+
a per-session SSH inactivity timeout in seconds (upstream #1341, `v0.6.10`).
|
|
19
|
+
`nil` (the default) inherits the global config (600s out of the box), `0`
|
|
20
|
+
disables the timeout, and a negative or non-finite value raises
|
|
21
|
+
`ArgumentError`, matching the Python binding's `ValueError` semantics. The
|
|
22
|
+
SSH inactivity timeout stays separate from the sandbox lifecycle
|
|
23
|
+
`idle_timeout`.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Upstream runtime highlights carried without further Ruby surface:
|
|
28
|
+
- `v0.6.10` — bind-mount correctness (contained rootfs patches, parent-first
|
|
29
|
+
nested destinations, path formatting), guest bootstrap moved off the kernel
|
|
30
|
+
command line, DNS pins required for deferred domain allows, host-loopback
|
|
31
|
+
family fallback, configurable global ssh inactivity timeout.
|
|
32
|
+
- `v0.6.11` / `v0.6.12` — release-pipeline fixes (Linux glibc baseline
|
|
33
|
+
lowered to 2.28; bundled `msb` executable mode preserved), reflected in the
|
|
34
|
+
prebuilt bundles the companion binaries gem vendors.
|
|
35
|
+
- `v0.6.13` — legacy ext4 upper-disk resize support; temporary exec
|
|
36
|
+
sandboxes stopped on errors; `LocalBackendBuilder::try_build_lazy()` added
|
|
37
|
+
upstream (embedding-host API — not adopted here, matching the Python
|
|
38
|
+
binding; the ext stays on `LocalBackend::lazy()`).
|
|
39
|
+
- `v0.6.14` — `msb_krun` VMM stack bumped to 0.1.32.
|
|
40
|
+
|
|
9
41
|
## [0.14.0] - 2026-08-24
|
|
10
42
|
|
|
11
43
|
Runtime tag unchanged — still upstream **`v0.6.9`**.
|
data/Cargo.lock
CHANGED
|
@@ -102,6 +102,12 @@ version = "0.2.21"
|
|
|
102
102
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
103
103
|
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
|
104
104
|
|
|
105
|
+
[[package]]
|
|
106
|
+
name = "ambient-authority"
|
|
107
|
+
version = "0.0.2"
|
|
108
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
109
|
+
checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b"
|
|
110
|
+
|
|
105
111
|
[[package]]
|
|
106
112
|
name = "android_system_properties"
|
|
107
113
|
version = "0.1.5"
|
|
@@ -869,6 +875,36 @@ dependencies = [
|
|
|
869
875
|
"pkg-config",
|
|
870
876
|
]
|
|
871
877
|
|
|
878
|
+
[[package]]
|
|
879
|
+
name = "cap-primitives"
|
|
880
|
+
version = "4.0.3"
|
|
881
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
882
|
+
checksum = "8b5f74729fd2f44701d1a8eb47e906cdb3ccd9ec0f02baad85a744b791940b18"
|
|
883
|
+
dependencies = [
|
|
884
|
+
"ambient-authority",
|
|
885
|
+
"fs-set-times",
|
|
886
|
+
"io-extras",
|
|
887
|
+
"io-lifetimes 3.0.1",
|
|
888
|
+
"ipnet",
|
|
889
|
+
"maybe-owned",
|
|
890
|
+
"rustix",
|
|
891
|
+
"rustix-linux-procfs",
|
|
892
|
+
"windows-sys 0.60.2",
|
|
893
|
+
"winx",
|
|
894
|
+
]
|
|
895
|
+
|
|
896
|
+
[[package]]
|
|
897
|
+
name = "cap-std"
|
|
898
|
+
version = "4.0.3"
|
|
899
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
900
|
+
checksum = "c1ec78e242cfa2cfe276807ac2ecc00315a6c97786977414bcd1c3963b6c91b8"
|
|
901
|
+
dependencies = [
|
|
902
|
+
"cap-primitives",
|
|
903
|
+
"io-extras",
|
|
904
|
+
"io-lifetimes 3.0.1",
|
|
905
|
+
"rustix",
|
|
906
|
+
]
|
|
907
|
+
|
|
872
908
|
[[package]]
|
|
873
909
|
name = "capng"
|
|
874
910
|
version = "0.2.3"
|
|
@@ -1723,7 +1759,7 @@ dependencies = [
|
|
|
1723
1759
|
"libc",
|
|
1724
1760
|
"option-ext",
|
|
1725
1761
|
"redox_users",
|
|
1726
|
-
"windows-sys 0.
|
|
1762
|
+
"windows-sys 0.60.2",
|
|
1727
1763
|
]
|
|
1728
1764
|
|
|
1729
1765
|
[[package]]
|
|
@@ -2023,6 +2059,17 @@ dependencies = [
|
|
|
2023
2059
|
"percent-encoding",
|
|
2024
2060
|
]
|
|
2025
2061
|
|
|
2062
|
+
[[package]]
|
|
2063
|
+
name = "fs-set-times"
|
|
2064
|
+
version = "0.20.3"
|
|
2065
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2066
|
+
checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a"
|
|
2067
|
+
dependencies = [
|
|
2068
|
+
"io-lifetimes 2.0.4",
|
|
2069
|
+
"rustix",
|
|
2070
|
+
"windows-sys 0.52.0",
|
|
2071
|
+
]
|
|
2072
|
+
|
|
2026
2073
|
[[package]]
|
|
2027
2074
|
name = "fs_extra"
|
|
2028
2075
|
version = "1.3.0"
|
|
@@ -2046,9 +2093,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
|
|
|
2046
2093
|
|
|
2047
2094
|
[[package]]
|
|
2048
2095
|
name = "futures"
|
|
2049
|
-
version = "0.3.
|
|
2096
|
+
version = "0.3.34"
|
|
2050
2097
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2051
|
-
checksum = "
|
|
2098
|
+
checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3"
|
|
2052
2099
|
dependencies = [
|
|
2053
2100
|
"futures-channel",
|
|
2054
2101
|
"futures-core",
|
|
@@ -2061,9 +2108,9 @@ dependencies = [
|
|
|
2061
2108
|
|
|
2062
2109
|
[[package]]
|
|
2063
2110
|
name = "futures-channel"
|
|
2064
|
-
version = "0.3.
|
|
2111
|
+
version = "0.3.34"
|
|
2065
2112
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2066
|
-
checksum = "
|
|
2113
|
+
checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
|
|
2067
2114
|
dependencies = [
|
|
2068
2115
|
"futures-core",
|
|
2069
2116
|
"futures-sink",
|
|
@@ -2071,15 +2118,15 @@ dependencies = [
|
|
|
2071
2118
|
|
|
2072
2119
|
[[package]]
|
|
2073
2120
|
name = "futures-core"
|
|
2074
|
-
version = "0.3.
|
|
2121
|
+
version = "0.3.34"
|
|
2075
2122
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2076
|
-
checksum = "
|
|
2123
|
+
checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
|
|
2077
2124
|
|
|
2078
2125
|
[[package]]
|
|
2079
2126
|
name = "futures-executor"
|
|
2080
|
-
version = "0.3.
|
|
2127
|
+
version = "0.3.34"
|
|
2081
2128
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2082
|
-
checksum = "
|
|
2129
|
+
checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432"
|
|
2083
2130
|
dependencies = [
|
|
2084
2131
|
"futures-core",
|
|
2085
2132
|
"futures-task",
|
|
@@ -2099,9 +2146,9 @@ dependencies = [
|
|
|
2099
2146
|
|
|
2100
2147
|
[[package]]
|
|
2101
2148
|
name = "futures-io"
|
|
2102
|
-
version = "0.3.
|
|
2149
|
+
version = "0.3.34"
|
|
2103
2150
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2104
|
-
checksum = "
|
|
2151
|
+
checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
|
|
2105
2152
|
|
|
2106
2153
|
[[package]]
|
|
2107
2154
|
name = "futures-lite"
|
|
@@ -2118,32 +2165,32 @@ dependencies = [
|
|
|
2118
2165
|
|
|
2119
2166
|
[[package]]
|
|
2120
2167
|
name = "futures-macro"
|
|
2121
|
-
version = "0.3.
|
|
2168
|
+
version = "0.3.34"
|
|
2122
2169
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2123
|
-
checksum = "
|
|
2170
|
+
checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
|
|
2124
2171
|
dependencies = [
|
|
2125
2172
|
"proc-macro2",
|
|
2126
2173
|
"quote",
|
|
2127
|
-
"syn
|
|
2174
|
+
"syn 3.0.4",
|
|
2128
2175
|
]
|
|
2129
2176
|
|
|
2130
2177
|
[[package]]
|
|
2131
2178
|
name = "futures-sink"
|
|
2132
|
-
version = "0.3.
|
|
2179
|
+
version = "0.3.34"
|
|
2133
2180
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2134
|
-
checksum = "
|
|
2181
|
+
checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
|
|
2135
2182
|
|
|
2136
2183
|
[[package]]
|
|
2137
2184
|
name = "futures-task"
|
|
2138
|
-
version = "0.3.
|
|
2185
|
+
version = "0.3.34"
|
|
2139
2186
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2140
|
-
checksum = "
|
|
2187
|
+
checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
|
|
2141
2188
|
|
|
2142
2189
|
[[package]]
|
|
2143
2190
|
name = "futures-util"
|
|
2144
|
-
version = "0.3.
|
|
2191
|
+
version = "0.3.34"
|
|
2145
2192
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2146
|
-
checksum = "
|
|
2193
|
+
checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
|
|
2147
2194
|
dependencies = [
|
|
2148
2195
|
"futures-channel",
|
|
2149
2196
|
"futures-core",
|
|
@@ -2832,6 +2879,28 @@ dependencies = [
|
|
|
2832
2879
|
"rand_core 0.10.1",
|
|
2833
2880
|
]
|
|
2834
2881
|
|
|
2882
|
+
[[package]]
|
|
2883
|
+
name = "io-extras"
|
|
2884
|
+
version = "0.19.0"
|
|
2885
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2886
|
+
checksum = "20fd6de4ccfcc187e38bc21cfa543cb5a302cb86a8b114eb7f0bf0dc9f8ac00f"
|
|
2887
|
+
dependencies = [
|
|
2888
|
+
"io-lifetimes 3.0.1",
|
|
2889
|
+
"windows-sys 0.52.0",
|
|
2890
|
+
]
|
|
2891
|
+
|
|
2892
|
+
[[package]]
|
|
2893
|
+
name = "io-lifetimes"
|
|
2894
|
+
version = "2.0.4"
|
|
2895
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2896
|
+
checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983"
|
|
2897
|
+
|
|
2898
|
+
[[package]]
|
|
2899
|
+
name = "io-lifetimes"
|
|
2900
|
+
version = "3.0.1"
|
|
2901
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2902
|
+
checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96"
|
|
2903
|
+
|
|
2835
2904
|
[[package]]
|
|
2836
2905
|
name = "ipnet"
|
|
2837
2906
|
version = "2.12.0"
|
|
@@ -3284,6 +3353,12 @@ dependencies = [
|
|
|
3284
3353
|
"regex-automata",
|
|
3285
3354
|
]
|
|
3286
3355
|
|
|
3356
|
+
[[package]]
|
|
3357
|
+
name = "maybe-owned"
|
|
3358
|
+
version = "0.3.4"
|
|
3359
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3360
|
+
checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4"
|
|
3361
|
+
|
|
3287
3362
|
[[package]]
|
|
3288
3363
|
name = "md-5"
|
|
3289
3364
|
version = "0.11.0"
|
|
@@ -3317,8 +3392,8 @@ dependencies = [
|
|
|
3317
3392
|
|
|
3318
3393
|
[[package]]
|
|
3319
3394
|
name = "microsandbox"
|
|
3320
|
-
version = "0.6.
|
|
3321
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3395
|
+
version = "0.6.14"
|
|
3396
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3322
3397
|
dependencies = [
|
|
3323
3398
|
"anyhow",
|
|
3324
3399
|
"astral-tokio-tar",
|
|
@@ -3326,6 +3401,8 @@ dependencies = [
|
|
|
3326
3401
|
"base64 0.23.1",
|
|
3327
3402
|
"blake3",
|
|
3328
3403
|
"bytes",
|
|
3404
|
+
"cap-primitives",
|
|
3405
|
+
"cap-std",
|
|
3329
3406
|
"chrono",
|
|
3330
3407
|
"ciborium",
|
|
3331
3408
|
"crossterm",
|
|
@@ -3377,8 +3454,8 @@ dependencies = [
|
|
|
3377
3454
|
|
|
3378
3455
|
[[package]]
|
|
3379
3456
|
name = "microsandbox-agent-client"
|
|
3380
|
-
version = "0.6.
|
|
3381
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3457
|
+
version = "0.6.14"
|
|
3458
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3382
3459
|
dependencies = [
|
|
3383
3460
|
"ciborium",
|
|
3384
3461
|
"microsandbox-protocol",
|
|
@@ -3390,8 +3467,8 @@ dependencies = [
|
|
|
3390
3467
|
|
|
3391
3468
|
[[package]]
|
|
3392
3469
|
name = "microsandbox-db"
|
|
3393
|
-
version = "0.6.
|
|
3394
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3470
|
+
version = "0.6.14"
|
|
3471
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3395
3472
|
dependencies = [
|
|
3396
3473
|
"async-trait",
|
|
3397
3474
|
"sea-orm",
|
|
@@ -3402,8 +3479,8 @@ dependencies = [
|
|
|
3402
3479
|
|
|
3403
3480
|
[[package]]
|
|
3404
3481
|
name = "microsandbox-filesystem"
|
|
3405
|
-
version = "0.6.
|
|
3406
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3482
|
+
version = "0.6.14"
|
|
3483
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3407
3484
|
dependencies = [
|
|
3408
3485
|
"libc",
|
|
3409
3486
|
"microsandbox-utils",
|
|
@@ -3415,8 +3492,8 @@ dependencies = [
|
|
|
3415
3492
|
|
|
3416
3493
|
[[package]]
|
|
3417
3494
|
name = "microsandbox-image"
|
|
3418
|
-
version = "0.6.
|
|
3419
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3495
|
+
version = "0.6.14"
|
|
3496
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3420
3497
|
dependencies = [
|
|
3421
3498
|
"astral-tokio-tar",
|
|
3422
3499
|
"async-compression",
|
|
@@ -3442,8 +3519,8 @@ dependencies = [
|
|
|
3442
3519
|
|
|
3443
3520
|
[[package]]
|
|
3444
3521
|
name = "microsandbox-metrics"
|
|
3445
|
-
version = "0.6.
|
|
3446
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3522
|
+
version = "0.6.14"
|
|
3523
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3447
3524
|
dependencies = [
|
|
3448
3525
|
"chrono",
|
|
3449
3526
|
"libc",
|
|
@@ -3454,8 +3531,8 @@ dependencies = [
|
|
|
3454
3531
|
|
|
3455
3532
|
[[package]]
|
|
3456
3533
|
name = "microsandbox-migration"
|
|
3457
|
-
version = "0.6.
|
|
3458
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3534
|
+
version = "0.6.14"
|
|
3535
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3459
3536
|
dependencies = [
|
|
3460
3537
|
"sea-orm-migration",
|
|
3461
3538
|
"serde_json",
|
|
@@ -3463,8 +3540,8 @@ dependencies = [
|
|
|
3463
3540
|
|
|
3464
3541
|
[[package]]
|
|
3465
3542
|
name = "microsandbox-network"
|
|
3466
|
-
version = "0.6.
|
|
3467
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3543
|
+
version = "0.6.14"
|
|
3544
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3468
3545
|
dependencies = [
|
|
3469
3546
|
"base64 0.22.1",
|
|
3470
3547
|
"bytes",
|
|
@@ -3507,8 +3584,8 @@ dependencies = [
|
|
|
3507
3584
|
|
|
3508
3585
|
[[package]]
|
|
3509
3586
|
name = "microsandbox-protocol"
|
|
3510
|
-
version = "0.6.
|
|
3511
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3587
|
+
version = "0.6.14"
|
|
3588
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3512
3589
|
dependencies = [
|
|
3513
3590
|
"chrono",
|
|
3514
3591
|
"ciborium",
|
|
@@ -3522,8 +3599,8 @@ dependencies = [
|
|
|
3522
3599
|
|
|
3523
3600
|
[[package]]
|
|
3524
3601
|
name = "microsandbox-runtime"
|
|
3525
|
-
version = "0.6.
|
|
3526
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3602
|
+
version = "0.6.14"
|
|
3603
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3527
3604
|
dependencies = [
|
|
3528
3605
|
"bytes",
|
|
3529
3606
|
"chrono",
|
|
@@ -3557,8 +3634,8 @@ dependencies = [
|
|
|
3557
3634
|
|
|
3558
3635
|
[[package]]
|
|
3559
3636
|
name = "microsandbox-types"
|
|
3560
|
-
version = "0.6.
|
|
3561
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3637
|
+
version = "0.6.14"
|
|
3638
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3562
3639
|
dependencies = [
|
|
3563
3640
|
"chrono",
|
|
3564
3641
|
"ipnetwork",
|
|
@@ -3566,13 +3643,14 @@ dependencies = [
|
|
|
3566
3643
|
"serde_json",
|
|
3567
3644
|
"sha2 0.11.0",
|
|
3568
3645
|
"thiserror",
|
|
3646
|
+
"typed-path",
|
|
3569
3647
|
"zeroize",
|
|
3570
3648
|
]
|
|
3571
3649
|
|
|
3572
3650
|
[[package]]
|
|
3573
3651
|
name = "microsandbox-utils"
|
|
3574
|
-
version = "0.6.
|
|
3575
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3652
|
+
version = "0.6.14"
|
|
3653
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3576
3654
|
dependencies = [
|
|
3577
3655
|
"dirs",
|
|
3578
3656
|
"libc",
|
|
@@ -3584,8 +3662,8 @@ dependencies = [
|
|
|
3584
3662
|
|
|
3585
3663
|
[[package]]
|
|
3586
3664
|
name = "microsandbox-vsock"
|
|
3587
|
-
version = "0.6.
|
|
3588
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3665
|
+
version = "0.6.14"
|
|
3666
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.14#b30fd164ad8640cbc34f6aa9645f9c265c3490b8"
|
|
3589
3667
|
dependencies = [
|
|
3590
3668
|
"libc",
|
|
3591
3669
|
"msb_krun",
|
|
@@ -3597,7 +3675,7 @@ dependencies = [
|
|
|
3597
3675
|
|
|
3598
3676
|
[[package]]
|
|
3599
3677
|
name = "microsandbox_rb"
|
|
3600
|
-
version = "0.
|
|
3678
|
+
version = "0.15.0"
|
|
3601
3679
|
dependencies = [
|
|
3602
3680
|
"chrono",
|
|
3603
3681
|
"futures",
|
|
@@ -3702,9 +3780,9 @@ dependencies = [
|
|
|
3702
3780
|
|
|
3703
3781
|
[[package]]
|
|
3704
3782
|
name = "msb_krun"
|
|
3705
|
-
version = "0.1.
|
|
3783
|
+
version = "0.1.32"
|
|
3706
3784
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3707
|
-
checksum = "
|
|
3785
|
+
checksum = "d4c0de669aeda774c3da60692af7e693fdf000f4813922b15389dd1209b042ac"
|
|
3708
3786
|
dependencies = [
|
|
3709
3787
|
"crossbeam-channel",
|
|
3710
3788
|
"kvm-bindings",
|
|
@@ -3722,9 +3800,9 @@ dependencies = [
|
|
|
3722
3800
|
|
|
3723
3801
|
[[package]]
|
|
3724
3802
|
name = "msb_krun_arch"
|
|
3725
|
-
version = "0.1.
|
|
3803
|
+
version = "0.1.32"
|
|
3726
3804
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3727
|
-
checksum = "
|
|
3805
|
+
checksum = "0e9631350df54bde880a7cf3fda67ff03132b115abae95f7b668599611286c87"
|
|
3728
3806
|
dependencies = [
|
|
3729
3807
|
"kvm-bindings",
|
|
3730
3808
|
"kvm-ioctls",
|
|
@@ -3737,15 +3815,15 @@ dependencies = [
|
|
|
3737
3815
|
|
|
3738
3816
|
[[package]]
|
|
3739
3817
|
name = "msb_krun_arch_gen"
|
|
3740
|
-
version = "0.1.
|
|
3818
|
+
version = "0.1.32"
|
|
3741
3819
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3742
|
-
checksum = "
|
|
3820
|
+
checksum = "fb11ff7f19adb1ee23d25ca65c9a06a75069e3b949e70922ba52a133dc9e43bb"
|
|
3743
3821
|
|
|
3744
3822
|
[[package]]
|
|
3745
3823
|
name = "msb_krun_cpuid"
|
|
3746
|
-
version = "0.1.
|
|
3824
|
+
version = "0.1.32"
|
|
3747
3825
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3748
|
-
checksum = "
|
|
3826
|
+
checksum = "09a315fabad3ffbf3cd6b4922dfa8e95b25e11624f548850c8029f46039c332a"
|
|
3749
3827
|
dependencies = [
|
|
3750
3828
|
"kvm-bindings",
|
|
3751
3829
|
"kvm-ioctls",
|
|
@@ -3754,9 +3832,9 @@ dependencies = [
|
|
|
3754
3832
|
|
|
3755
3833
|
[[package]]
|
|
3756
3834
|
name = "msb_krun_devices"
|
|
3757
|
-
version = "0.1.
|
|
3835
|
+
version = "0.1.32"
|
|
3758
3836
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3759
|
-
checksum = "
|
|
3837
|
+
checksum = "b54befdee0428ae481ecd894306f2ceef19ad951275908bd4d9182a4216a4933"
|
|
3760
3838
|
dependencies = [
|
|
3761
3839
|
"bitflags 1.3.2",
|
|
3762
3840
|
"capng",
|
|
@@ -3784,9 +3862,9 @@ dependencies = [
|
|
|
3784
3862
|
|
|
3785
3863
|
[[package]]
|
|
3786
3864
|
name = "msb_krun_hvf"
|
|
3787
|
-
version = "0.1.
|
|
3865
|
+
version = "0.1.32"
|
|
3788
3866
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3789
|
-
checksum = "
|
|
3867
|
+
checksum = "cbde98ef6b71b920af6e4a8ee89110ffac6204942620799772dad12dcf2273ac"
|
|
3790
3868
|
dependencies = [
|
|
3791
3869
|
"crossbeam-channel",
|
|
3792
3870
|
"libloading",
|
|
@@ -3796,9 +3874,9 @@ dependencies = [
|
|
|
3796
3874
|
|
|
3797
3875
|
[[package]]
|
|
3798
3876
|
name = "msb_krun_kernel"
|
|
3799
|
-
version = "0.1.
|
|
3877
|
+
version = "0.1.32"
|
|
3800
3878
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3801
|
-
checksum = "
|
|
3879
|
+
checksum = "080d35863dad4a81a5eb6c5ff9292caab0219e50e7c8b3d0da4ebe74e7797322"
|
|
3802
3880
|
dependencies = [
|
|
3803
3881
|
"msb-vm-memory",
|
|
3804
3882
|
"msb_krun_utils",
|
|
@@ -3806,9 +3884,9 @@ dependencies = [
|
|
|
3806
3884
|
|
|
3807
3885
|
[[package]]
|
|
3808
3886
|
name = "msb_krun_polly"
|
|
3809
|
-
version = "0.1.
|
|
3887
|
+
version = "0.1.32"
|
|
3810
3888
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3811
|
-
checksum = "
|
|
3889
|
+
checksum = "af85cc51c6f8f196224793975aad7da7e51ef8247b42b5cd8f7635561a9d5fdb"
|
|
3812
3890
|
dependencies = [
|
|
3813
3891
|
"libc",
|
|
3814
3892
|
"msb_krun_utils",
|
|
@@ -3816,18 +3894,18 @@ dependencies = [
|
|
|
3816
3894
|
|
|
3817
3895
|
[[package]]
|
|
3818
3896
|
name = "msb_krun_smbios"
|
|
3819
|
-
version = "0.1.
|
|
3897
|
+
version = "0.1.32"
|
|
3820
3898
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3821
|
-
checksum = "
|
|
3899
|
+
checksum = "f36a5c9866ccf755b4675338d4e696ee50e7425a153ac71db89e3bb95b1cffce"
|
|
3822
3900
|
dependencies = [
|
|
3823
3901
|
"msb-vm-memory",
|
|
3824
3902
|
]
|
|
3825
3903
|
|
|
3826
3904
|
[[package]]
|
|
3827
3905
|
name = "msb_krun_utils"
|
|
3828
|
-
version = "0.1.
|
|
3906
|
+
version = "0.1.32"
|
|
3829
3907
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3830
|
-
checksum = "
|
|
3908
|
+
checksum = "112be8806546f721718a88ba01f9e86d4189aff39f79d5816a90465e9eb4dbe0"
|
|
3831
3909
|
dependencies = [
|
|
3832
3910
|
"bitflags 1.3.2",
|
|
3833
3911
|
"crossbeam-channel",
|
|
@@ -3841,9 +3919,9 @@ dependencies = [
|
|
|
3841
3919
|
|
|
3842
3920
|
[[package]]
|
|
3843
3921
|
name = "msb_krun_vmm"
|
|
3844
|
-
version = "0.1.
|
|
3922
|
+
version = "0.1.32"
|
|
3845
3923
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3846
|
-
checksum = "
|
|
3924
|
+
checksum = "f9865e5331c61d4dea48fae764f5c6a8248f83cd8d0f961dd03598b79885ace4"
|
|
3847
3925
|
dependencies = [
|
|
3848
3926
|
"bzip2",
|
|
3849
3927
|
"crossbeam-channel",
|
|
@@ -4639,7 +4717,7 @@ dependencies = [
|
|
|
4639
4717
|
"once_cell",
|
|
4640
4718
|
"socket2",
|
|
4641
4719
|
"tracing",
|
|
4642
|
-
"windows-sys 0.
|
|
4720
|
+
"windows-sys 0.52.0",
|
|
4643
4721
|
]
|
|
4644
4722
|
|
|
4645
4723
|
[[package]]
|
|
@@ -4806,9 +4884,9 @@ checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
|
|
|
4806
4884
|
|
|
4807
4885
|
[[package]]
|
|
4808
4886
|
name = "rcgen"
|
|
4809
|
-
version = "0.14.
|
|
4887
|
+
version = "0.14.9"
|
|
4810
4888
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4811
|
-
checksum = "
|
|
4889
|
+
checksum = "091e7a8e7d86e6feb87a27ce8e2cba29d49eff9507afeebefab7eeb2ca667fb4"
|
|
4812
4890
|
dependencies = [
|
|
4813
4891
|
"pem",
|
|
4814
4892
|
"ring",
|
|
@@ -5012,9 +5090,9 @@ dependencies = [
|
|
|
5012
5090
|
|
|
5013
5091
|
[[package]]
|
|
5014
5092
|
name = "russh"
|
|
5015
|
-
version = "0.62.
|
|
5093
|
+
version = "0.62.6"
|
|
5016
5094
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
5017
|
-
checksum = "
|
|
5095
|
+
checksum = "b41043523e0edcbd4e31d00903e26f12994f63b21bae9904f7405c1ed92752a5"
|
|
5018
5096
|
dependencies = [
|
|
5019
5097
|
"aes 0.9.1",
|
|
5020
5098
|
"aws-lc-rs",
|
|
@@ -5180,6 +5258,16 @@ dependencies = [
|
|
|
5180
5258
|
"windows-sys 0.52.0",
|
|
5181
5259
|
]
|
|
5182
5260
|
|
|
5261
|
+
[[package]]
|
|
5262
|
+
name = "rustix-linux-procfs"
|
|
5263
|
+
version = "0.1.1"
|
|
5264
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
5265
|
+
checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056"
|
|
5266
|
+
dependencies = [
|
|
5267
|
+
"once_cell",
|
|
5268
|
+
"rustix",
|
|
5269
|
+
]
|
|
5270
|
+
|
|
5183
5271
|
[[package]]
|
|
5184
5272
|
name = "rustls"
|
|
5185
5273
|
version = "0.23.41"
|
|
@@ -6231,6 +6319,17 @@ dependencies = [
|
|
|
6231
6319
|
"unicode-ident",
|
|
6232
6320
|
]
|
|
6233
6321
|
|
|
6322
|
+
[[package]]
|
|
6323
|
+
name = "syn"
|
|
6324
|
+
version = "3.0.4"
|
|
6325
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
6326
|
+
checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"
|
|
6327
|
+
dependencies = [
|
|
6328
|
+
"proc-macro2",
|
|
6329
|
+
"quote",
|
|
6330
|
+
"unicode-ident",
|
|
6331
|
+
]
|
|
6332
|
+
|
|
6234
6333
|
[[package]]
|
|
6235
6334
|
name = "sync_wrapper"
|
|
6236
6335
|
version = "1.0.2"
|
|
@@ -7368,6 +7467,16 @@ dependencies = [
|
|
|
7368
7467
|
"memchr",
|
|
7369
7468
|
]
|
|
7370
7469
|
|
|
7470
|
+
[[package]]
|
|
7471
|
+
name = "winx"
|
|
7472
|
+
version = "0.36.4"
|
|
7473
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
7474
|
+
checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d"
|
|
7475
|
+
dependencies = [
|
|
7476
|
+
"bitflags 2.13.0",
|
|
7477
|
+
"windows-sys 0.52.0",
|
|
7478
|
+
]
|
|
7479
|
+
|
|
7371
7480
|
[[package]]
|
|
7372
7481
|
name = "wit-bindgen"
|
|
7373
7482
|
version = "0.51.0"
|
data/DESIGN.md
CHANGED
|
@@ -184,7 +184,7 @@ extension.
|
|
|
184
184
|
|
|
185
185
|
`ext/microsandbox/Cargo.toml` depends on the core crate via a **pinned git tag**
|
|
186
186
|
(`microsandbox` / `microsandbox-network`, pinned to the same tag as
|
|
187
|
-
`Microsandbox::RUNTIME_VERSION` — currently `v0.6.
|
|
187
|
+
`Microsandbox::RUNTIME_VERSION` — currently `v0.6.14`), so the gem builds anywhere
|
|
188
188
|
— CI, `rake-compiler-dock` release containers, and end-user source installs —
|
|
189
189
|
without an adjacent checkout. For fast local development against a sibling
|
|
190
190
|
microsandbox checkout, copy `.cargo/config.toml.example` to `.cargo/config.toml`
|
data/README.md
CHANGED
|
@@ -524,8 +524,8 @@ change diverged the two numbers — the gem version is **not** a reliable indica
|
|
|
524
524
|
of the embedded runtime version. To learn which runtime a build wraps, ask it:
|
|
525
525
|
|
|
526
526
|
```ruby
|
|
527
|
-
Microsandbox::VERSION # => "0.
|
|
528
|
-
Microsandbox.runtime_version # => "v0.6.
|
|
527
|
+
Microsandbox::VERSION # => "0.15.0" (the gem's own version)
|
|
528
|
+
Microsandbox.runtime_version # => "v0.6.14" (the embedded upstream runtime tag)
|
|
529
529
|
```
|
|
530
530
|
|
|
531
531
|
The companion [`microsandbox-rb-binaries`](#the-runtime-binaries) gem is
|
|
@@ -557,6 +557,7 @@ stale.
|
|
|
557
557
|
| `0.12.0` | `v0.6.8` | adopts upstream `v0.6.8` (**breaking**): `Sandbox.list`/`.list_with` return a cursor-paginated `SandboxPage` (`limit:`/`cursor:` keywords), `UnsupportedError` re-keyed by structured operations with `#operation`/`#hint`; runtime adds a shared log registry for followed streams and cloud exec/ssh reconnects |
|
|
558
558
|
| `0.13.0` | `v0.6.9` | adopts upstream `v0.6.9` (**breaking**): a bare `MSB_API_KEY` no longer selects the cloud backend (explicit `MSB_BACKEND=cloud` or a cloud profile required; invalid cloud config fails closed with `InvalidConfigError`); snapshot payload integrity becomes opt-in (`record_integrity:`, `verify` can report `:not_recorded`). Parity: default-workload execution (`exec_default`/`exec_default_stream`/`attach_default`, `cmd:`), flat root disks (`RootDisk.flat`), `modify(root_disk_size:)`, `rate_limiter:`, `vsock:`, `default_backend_info`, `Volume.get_default` |
|
|
559
559
|
| `0.14.0` | `v0.6.9` | two-gem split: SDK-only gem (no build-time runtime download) + companion `microsandbox-rb-binaries` platform gems |
|
|
560
|
+
| `0.15.0` | `v0.6.14` | adopts upstream `v0.6.10`–`v0.6.14` step by step: bind-mount correctness, guest bootstrap off the kernel command line, DNS pins for deferred domain allows, Linux glibc 2.28 baseline for the prebuilt runtime, legacy ext4 upper-disk resize, `msb_krun` 0.1.32. Parity: `ssh.open_client`/`prepare_server` accept `inactivity_timeout:` (seconds; `0` disables, `nil` inherits the 600s global default) |
|
|
560
561
|
|
|
561
562
|
**Going forward** — the gem version moves on its own semver track and no longer
|
|
562
563
|
mirrors the upstream tag:
|
data/ext/microsandbox/Cargo.toml
CHANGED
|
@@ -6,8 +6,8 @@ name = "microsandbox_rb"
|
|
|
6
6
|
description = "Ruby SDK native extension for microsandbox — secure, fast microVM-based sandboxing."
|
|
7
7
|
# Must equal Microsandbox::VERSION (lib/microsandbox/version.rb) — Native.version
|
|
8
8
|
# returns this via env!("CARGO_PKG_VERSION") and version_spec.rb asserts equality.
|
|
9
|
-
# The core-crate dependency below stays pinned at its own tag (v0.6.
|
|
10
|
-
version = "0.
|
|
9
|
+
# The core-crate dependency below stays pinned at its own tag (v0.6.14).
|
|
10
|
+
version = "0.15.0"
|
|
11
11
|
authors = ["Super Rad Company <development@superrad.company>"]
|
|
12
12
|
repository = "https://github.com/superradcompany/microsandbox"
|
|
13
13
|
license = "Apache-2.0"
|
|
@@ -42,8 +42,8 @@ rb-sys = "0.9"
|
|
|
42
42
|
# first-use download into ~/.microsandbox (`setup::install`, which is not
|
|
43
43
|
# gated on "prebuilt"). "net"/"ssh"/"keyring" are the features the official
|
|
44
44
|
# SDKs ship with.
|
|
45
|
-
microsandbox = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.
|
|
46
|
-
microsandbox-network = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.
|
|
45
|
+
microsandbox = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.14", default-features = false, features = ["keyring", "net", "ssh"] }
|
|
46
|
+
microsandbox-network = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.14" }
|
|
47
47
|
# The *guest* agent (`agentd`, PID 1 inside every microVM) is embedded into the
|
|
48
48
|
# extension by microsandbox-filesystem's build.rs, which without its "prebuilt"
|
|
49
49
|
# feature demands a locally built `build/agentd` (workspace-only, `just
|
|
@@ -52,7 +52,7 @@ microsandbox-network = { git = "https://github.com/superradcompany/microsandbox"
|
|
|
52
52
|
# prebuilt agentd for the target arch is fetched (same behaviour as before)
|
|
53
53
|
# while the SDK-level msb download above stays off. Feature unification means
|
|
54
54
|
# this adds no new crates; keep it on the same tag as the deps above.
|
|
55
|
-
microsandbox-runtime = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.
|
|
55
|
+
microsandbox-runtime = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.14", default-features = false, features = ["prebuilt"] }
|
|
56
56
|
|
|
57
57
|
# Async core bridged to Ruby's synchronous API via a blocking tokio runtime.
|
|
58
58
|
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time"] }
|
|
@@ -866,11 +866,14 @@ impl Sandbox {
|
|
|
866
866
|
//----------------------------------------------------------------------
|
|
867
867
|
|
|
868
868
|
/// Open a native in-process SSH client to this sandbox. `opts`: user, term,
|
|
869
|
-
/// sftp (bool, default true).
|
|
869
|
+
/// sftp (bool, default true), inactivity_timeout (seconds, f64; 0 disables).
|
|
870
870
|
fn ssh_open_client(&self, opts: RHash) -> Result<crate::ssh::SshClient, Error> {
|
|
871
871
|
let user = conv::opt_string(opts, "user")?;
|
|
872
872
|
let term = conv::opt_string(opts, "term")?;
|
|
873
873
|
let sftp = conv::opt::<bool>(opts, "sftp")?.unwrap_or(true);
|
|
874
|
+
let inactivity_timeout = conv::opt_f64(opts, "inactivity_timeout")?
|
|
875
|
+
.map(secs_to_duration)
|
|
876
|
+
.transpose()?;
|
|
874
877
|
let ssh = self.inner.ssh();
|
|
875
878
|
let client = block_on(ssh.open_client_with(move |mut b| {
|
|
876
879
|
if let Some(u) = user {
|
|
@@ -879,6 +882,9 @@ impl Sandbox {
|
|
|
879
882
|
if let Some(t) = term {
|
|
880
883
|
b = b.term(t);
|
|
881
884
|
}
|
|
885
|
+
if let Some(t) = inactivity_timeout {
|
|
886
|
+
b = b.inactivity_timeout(t);
|
|
887
|
+
}
|
|
882
888
|
b.sftp(sftp)
|
|
883
889
|
}))
|
|
884
890
|
.map_err(error::to_ruby)?;
|
|
@@ -886,12 +892,16 @@ impl Sandbox {
|
|
|
886
892
|
}
|
|
887
893
|
|
|
888
894
|
/// Prepare a reusable SSH server endpoint. `opts`: host_key_path,
|
|
889
|
-
/// authorized_keys_path, user, sftp (bool, default true)
|
|
895
|
+
/// authorized_keys_path, user, sftp (bool, default true),
|
|
896
|
+
/// inactivity_timeout (seconds, f64; 0 disables).
|
|
890
897
|
fn ssh_prepare_server(&self, opts: RHash) -> Result<crate::ssh::SshServer, Error> {
|
|
891
898
|
let host_key_path = conv::opt_string(opts, "host_key_path")?;
|
|
892
899
|
let authorized_keys_path = conv::opt_string(opts, "authorized_keys_path")?;
|
|
893
900
|
let user = conv::opt_string(opts, "user")?;
|
|
894
901
|
let sftp = conv::opt::<bool>(opts, "sftp")?.unwrap_or(true);
|
|
902
|
+
let inactivity_timeout = conv::opt_f64(opts, "inactivity_timeout")?
|
|
903
|
+
.map(secs_to_duration)
|
|
904
|
+
.transpose()?;
|
|
895
905
|
let ssh = self.inner.ssh();
|
|
896
906
|
let server = block_on(ssh.prepare_server_with(move |mut b| {
|
|
897
907
|
if let Some(p) = host_key_path {
|
|
@@ -903,6 +913,9 @@ impl Sandbox {
|
|
|
903
913
|
if let Some(u) = user {
|
|
904
914
|
b = b.user(u);
|
|
905
915
|
}
|
|
916
|
+
if let Some(t) = inactivity_timeout {
|
|
917
|
+
b = b.inactivity_timeout(t);
|
|
918
|
+
}
|
|
906
919
|
b.sftp(sftp)
|
|
907
920
|
}))
|
|
908
921
|
.map_err(error::to_ruby)?;
|
data/lib/microsandbox/ssh.rb
CHANGED
|
@@ -231,11 +231,17 @@ module Microsandbox
|
|
|
231
231
|
# @param user [String] guest user to authenticate as (default "root")
|
|
232
232
|
# @param term [String, nil] TERM value for the session
|
|
233
233
|
# @param sftp [Boolean] enable the SFTP subsystem (default true)
|
|
234
|
+
# @param inactivity_timeout [Numeric, nil] per-session inactivity timeout in
|
|
235
|
+
# seconds; `nil` inherits the global config (default 600s), `0` disables it
|
|
234
236
|
# @yieldparam client [SshClient]
|
|
235
237
|
# @return [SshClient, Object]
|
|
236
|
-
def open_client(user: "root", term: nil, sftp: true)
|
|
238
|
+
def open_client(user: "root", term: nil, sftp: true, inactivity_timeout: nil)
|
|
237
239
|
opts = {"user" => user.to_s, "sftp" => sftp ? true : false}
|
|
238
240
|
opts["term"] = term.to_s if term
|
|
241
|
+
unless inactivity_timeout.nil?
|
|
242
|
+
opts["inactivity_timeout"] =
|
|
243
|
+
Sandbox.send(:coerce_duration, inactivity_timeout, "inactivity_timeout")
|
|
244
|
+
end
|
|
239
245
|
client = SshClient.new(@native.ssh_open_client(opts))
|
|
240
246
|
return client unless block_given?
|
|
241
247
|
|
|
@@ -251,12 +257,19 @@ module Microsandbox
|
|
|
251
257
|
# @param authorized_keys_path [String, nil] authorized_keys file path
|
|
252
258
|
# @param user [String, nil] guest user connections run as
|
|
253
259
|
# @param sftp [Boolean] enable the SFTP subsystem (default true)
|
|
260
|
+
# @param inactivity_timeout [Numeric, nil] per-session inactivity timeout in
|
|
261
|
+
# seconds; `nil` inherits the global config (default 600s), `0` disables it
|
|
254
262
|
# @return [SshServer]
|
|
255
|
-
def prepare_server(host_key_path: nil, authorized_keys_path: nil, user: nil, sftp: true
|
|
263
|
+
def prepare_server(host_key_path: nil, authorized_keys_path: nil, user: nil, sftp: true,
|
|
264
|
+
inactivity_timeout: nil)
|
|
256
265
|
opts = {"sftp" => sftp ? true : false}
|
|
257
266
|
opts["host_key_path"] = host_key_path.to_s if host_key_path
|
|
258
267
|
opts["authorized_keys_path"] = authorized_keys_path.to_s if authorized_keys_path
|
|
259
268
|
opts["user"] = user.to_s if user
|
|
269
|
+
unless inactivity_timeout.nil?
|
|
270
|
+
opts["inactivity_timeout"] =
|
|
271
|
+
Sandbox.send(:coerce_duration, inactivity_timeout, "inactivity_timeout")
|
|
272
|
+
end
|
|
260
273
|
SshServer.new(@native.ssh_prepare_server(opts))
|
|
261
274
|
end
|
|
262
275
|
end
|
data/lib/microsandbox/version.rb
CHANGED
|
@@ -8,12 +8,12 @@ module Microsandbox
|
|
|
8
8
|
# Versioning section of the README for the full gem-to-runtime map. Must equal
|
|
9
9
|
# the native ext's Cargo crate version (`Native.version`), enforced by
|
|
10
10
|
# spec/unit/version_spec.rb.
|
|
11
|
-
VERSION = "0.
|
|
11
|
+
VERSION = "0.15.0"
|
|
12
12
|
|
|
13
13
|
# The upstream microsandbox runtime release this gem build embeds — the `tag`
|
|
14
14
|
# pinned on the `microsandbox`/`microsandbox-network` git deps in
|
|
15
15
|
# ext/microsandbox/Cargo.toml. Exposed at runtime as
|
|
16
16
|
# {Microsandbox.runtime_version}. spec/unit/version_spec.rb asserts it stays in
|
|
17
17
|
# sync with the Cargo tag so it can't silently drift out of date.
|
|
18
|
-
RUNTIME_VERSION = "v0.6.
|
|
18
|
+
RUNTIME_VERSION = "v0.6.14"
|
|
19
19
|
end
|
data/sig/microsandbox.rbs
CHANGED
|
@@ -653,8 +653,9 @@ module Microsandbox
|
|
|
653
653
|
|
|
654
654
|
class SshOps
|
|
655
655
|
def initialize: (untyped native) -> void
|
|
656
|
-
def open_client: (?user: String, ?term: String?, ?sftp: bool
|
|
656
|
+
def open_client: (?user: String, ?term: String?, ?sftp: bool,
|
|
657
|
+
?inactivity_timeout: Numeric?) ?{ (SshClient) -> untyped } -> untyped
|
|
657
658
|
def prepare_server: (?host_key_path: String?, ?authorized_keys_path: String?,
|
|
658
|
-
?user: String?, ?sftp: bool) -> SshServer
|
|
659
|
+
?user: String?, ?sftp: bool, ?inactivity_timeout: Numeric?) -> SshServer
|
|
659
660
|
end
|
|
660
661
|
end
|