sandboxedjs 0.1.73 → 0.1.75
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.
- package/README.md +40 -2
- package/dist/agent.d.cts +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/{container-BxEoVOmX.d.cts → container-NoLUp_fd.d.cts} +98 -5
- package/dist/{container-B5X6stfx.d.ts → container-X8yZRFvW.d.ts} +98 -5
- package/dist/{contracts-CVgctitO.d.cts → contracts-C2_dTgk3.d.cts} +30 -1
- package/dist/{contracts-CVgctitO.d.ts → contracts-C2_dTgk3.d.ts} +30 -1
- package/dist/index.cjs +5264 -2852
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +175 -9
- package/dist/index.d.ts +175 -9
- package/dist/index.js +5252 -2854
- package/dist/index.js.map +1 -1
- package/dist/{memory-volume-CWuWScIs.d.ts → memory-volume-CG56p660.d.ts} +1 -1
- package/dist/{memory-volume-DlMSAh-K.d.cts → memory-volume-DqEWFo7t.d.cts} +1 -1
- package/dist/python-abi.cjs +13 -0
- package/dist/python-abi.cjs.map +1 -1
- package/dist/python-abi.d.cts +3 -3
- package/dist/python-abi.d.ts +3 -3
- package/dist/python-abi.js +13 -0
- package/dist/python-abi.js.map +1 -1
- package/dist/rolldown-wasi-worker.js +5 -1
- package/dist/rolldown-wasi-worker.js.map +1 -1
- package/dist/worker-entry.js +861 -55
- package/dist/worker-entry.js.map +1 -1
- package/package.json +2 -2
package/dist/python-abi.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { V as Vfs, C as Cred, a as VirtualTcpNetwork } from './contracts-
|
|
2
|
-
export { m as ROOT_CRED, v as makeCred } from './contracts-
|
|
3
|
-
export { M as MemoryVolume } from './memory-volume-
|
|
1
|
+
import { V as Vfs, C as Cred, a as VirtualTcpNetwork } from './contracts-C2_dTgk3.cjs';
|
|
2
|
+
export { m as ROOT_CRED, v as makeCred } from './contracts-C2_dTgk3.cjs';
|
|
3
|
+
export { M as MemoryVolume } from './memory-volume-DqEWFo7t.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Open-file descriptions: the thing a descriptor points *at*.
|
package/dist/python-abi.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { V as Vfs, C as Cred, a as VirtualTcpNetwork } from './contracts-
|
|
2
|
-
export { m as ROOT_CRED, v as makeCred } from './contracts-
|
|
3
|
-
export { M as MemoryVolume } from './memory-volume-
|
|
1
|
+
import { V as Vfs, C as Cred, a as VirtualTcpNetwork } from './contracts-C2_dTgk3.js';
|
|
2
|
+
export { m as ROOT_CRED, v as makeCred } from './contracts-C2_dTgk3.js';
|
|
3
|
+
export { M as MemoryVolume } from './memory-volume-CG56p660.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Open-file descriptions: the thing a descriptor points *at*.
|
package/dist/python-abi.js
CHANGED
|
@@ -1137,6 +1137,12 @@ var VirtualTcpSocket = class _VirtualTcpSocket {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
connect(port, address = "127.0.0.1") {
|
|
1139
1139
|
if (this.listenerValue || this.connectionValue) throw new PosixError(Errno.EISCONN);
|
|
1140
|
+
if (!isLoopback(address)) {
|
|
1141
|
+
throw new PosixError(
|
|
1142
|
+
Errno.ENETUNREACH,
|
|
1143
|
+
`cannot reach ${address}:${port}: outbound network access is not available through raw sockets in this container; only loopback is routed`
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
1140
1146
|
this.connectionValue = this.network.connect(port, this.boundPort, this.boundAddress);
|
|
1141
1147
|
this.boundPort = this.connectionValue.local.port;
|
|
1142
1148
|
this.boundAddress = this.connectionValue.local.address;
|
|
@@ -1273,6 +1279,11 @@ var SocketDescription = class _SocketDescription {
|
|
|
1273
1279
|
return peer;
|
|
1274
1280
|
}
|
|
1275
1281
|
};
|
|
1282
|
+
function isLoopback(address) {
|
|
1283
|
+
if (address === "" || address === "localhost" || address === "0.0.0.0") return true;
|
|
1284
|
+
if (address === "::1" || address === "::" || address === "[::1]") return true;
|
|
1285
|
+
return /^127\./.test(address);
|
|
1286
|
+
}
|
|
1276
1287
|
|
|
1277
1288
|
// src/python/syscall-server.ts
|
|
1278
1289
|
var MAX_TRANSFER = 8 * 1024 * 1024;
|
|
@@ -1981,6 +1992,7 @@ var ERRNO = {
|
|
|
1981
1992
|
ECONNRESET: 104,
|
|
1982
1993
|
ENOTCONN: 107,
|
|
1983
1994
|
ETIMEDOUT: 110,
|
|
1995
|
+
ENETUNREACH: 101,
|
|
1984
1996
|
ECONNREFUSED: 111,
|
|
1985
1997
|
EHOSTUNREACH: 113,
|
|
1986
1998
|
ENOTSUP: 95
|
|
@@ -2034,6 +2046,7 @@ var STRERROR = {
|
|
|
2034
2046
|
ECONNRESET: "Connection reset by peer",
|
|
2035
2047
|
ENOTCONN: "Transport endpoint is not connected",
|
|
2036
2048
|
ETIMEDOUT: "Connection timed out",
|
|
2049
|
+
ENETUNREACH: "Network is unreachable",
|
|
2037
2050
|
ECONNREFUSED: "Connection refused",
|
|
2038
2051
|
EHOSTUNREACH: "No route to host",
|
|
2039
2052
|
ENOTSUP: "Operation not supported"
|