microsandbox-rb 0.16.0 → 0.17.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 +98 -0
- data/Cargo.lock +194 -158
- data/DESIGN.md +1 -1
- data/README.md +46 -3
- data/ext/microsandbox/Cargo.toml +4 -4
- data/ext/microsandbox/src/error.rs +7 -0
- data/ext/microsandbox/src/sandbox.rs +82 -0
- data/lib/microsandbox/outbound_proxy.rb +332 -0
- data/lib/microsandbox/sandbox.rb +20 -1
- data/lib/microsandbox/version.rb +2 -2
- data/lib/microsandbox.rb +1 -0
- data/sig/microsandbox.rbs +40 -1
- metadata +2 -1
data/sig/microsandbox.rbs
CHANGED
|
@@ -261,8 +261,9 @@ module Microsandbox
|
|
|
261
261
|
?volumes: Hash[untyped, untyped]?, ?network: untyped?,
|
|
262
262
|
?dns: Hash[untyped, untyped]?, ?tls: Hash[untyped, untyped]?,
|
|
263
263
|
?ipv4_pool: String?, ?ipv6_pool: String?,
|
|
264
|
-
?max_connections: Integer?, ?trust_host_cas: bool?,
|
|
264
|
+
?max_connections: Integer?, ?trust_host_cas: bool?, ?strict: bool?,
|
|
265
265
|
?rate_limiter: Hash[untyped, untyped]?,
|
|
266
|
+
?proxy: (OutboundProxy | Hash[untyped, untyped])?,
|
|
266
267
|
?vsock: (Hash[untyped, untyped] | Array[Hash[untyped, untyped]])?,
|
|
267
268
|
?patches: Array[Hash[untyped, untyped]]?, ?from_snapshot: String?,
|
|
268
269
|
?fstype: String?, ?init: (String | Symbol | Hash[untyped, untyped])?, ?ephemeral: bool,
|
|
@@ -576,6 +577,44 @@ module Microsandbox
|
|
|
576
577
|
def cloud?: () -> bool
|
|
577
578
|
end
|
|
578
579
|
|
|
580
|
+
# Host-side secret source (runtime v0.6.17): only `env` exists.
|
|
581
|
+
class SecretSource
|
|
582
|
+
KINDS: Array[String]
|
|
583
|
+
attr_reader kind: String
|
|
584
|
+
attr_reader var: String
|
|
585
|
+
def self.env: ((String | Symbol) variable) -> SecretSource
|
|
586
|
+
def self.coerce: (untyped value, ?String context) -> SecretSource
|
|
587
|
+
def initialize: ((String | Symbol) kind, (String | Symbol) var) -> void
|
|
588
|
+
def to_h: () -> Hash[String, String]
|
|
589
|
+
def ==: (untyped other) -> bool
|
|
590
|
+
def eql?: (untyped other) -> bool
|
|
591
|
+
def hash: () -> Integer
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Outbound SOCKS4/SOCKS5 proxy for the `proxy:` create option (runtime
|
|
595
|
+
# v0.6.17). Immutable: `credentials` returns a new proxy.
|
|
596
|
+
class OutboundProxy
|
|
597
|
+
PROTOCOLS: Array[String]
|
|
598
|
+
attr_reader protocol: String
|
|
599
|
+
attr_reader address: String
|
|
600
|
+
attr_reader user_id: String?
|
|
601
|
+
attr_reader username: String?
|
|
602
|
+
attr_reader password: SecretSource?
|
|
603
|
+
def self.socks4: (String address, ?user_id: String?) -> OutboundProxy
|
|
604
|
+
def self.socks5: (String address) -> OutboundProxy
|
|
605
|
+
def self.coerce: (untyped value) -> Hash[String, untyped]
|
|
606
|
+
def self.from_hash: (Hash[untyped, untyped] hash) -> OutboundProxy
|
|
607
|
+
def initialize: (protocol: (String | Symbol), address: String, ?user_id: String?,
|
|
608
|
+
?username: String?, ?password: SecretSource?) -> void
|
|
609
|
+
def credentials: (String username, (SecretSource | Hash[untyped, untyped]) password) -> OutboundProxy
|
|
610
|
+
def socks4?: () -> bool
|
|
611
|
+
def socks5?: () -> bool
|
|
612
|
+
def to_h: () -> Hash[String, untyped]
|
|
613
|
+
def ==: (untyped other) -> bool
|
|
614
|
+
def eql?: (untyped other) -> bool
|
|
615
|
+
def hash: () -> Integer
|
|
616
|
+
end
|
|
617
|
+
|
|
579
618
|
class NetworkPolicy
|
|
580
619
|
PROFILES: Array[String]
|
|
581
620
|
PRESET_ALIASES: Hash[String, String]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: microsandbox-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ya-luotao
|
|
@@ -71,6 +71,7 @@ files:
|
|
|
71
71
|
- lib/microsandbox/metrics.rb
|
|
72
72
|
- lib/microsandbox/modification.rb
|
|
73
73
|
- lib/microsandbox/network.rb
|
|
74
|
+
- lib/microsandbox/outbound_proxy.rb
|
|
74
75
|
- lib/microsandbox/patch.rb
|
|
75
76
|
- lib/microsandbox/root_disk.rb
|
|
76
77
|
- lib/microsandbox/sandbox.rb
|