replicas-engine 0.1.629 → 0.1.631

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.
Files changed (2) hide show
  1. package/dist/src/index.js +28 -7
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -798,7 +798,8 @@ var WORKSPACE_SIZES = ["small", "large"];
798
798
  var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
799
799
 
800
800
  // ../shared/src/egress.ts
801
- var EGRESS_CIPHER = "aes-256-gcm";
801
+ var EGRESS_CIPHER = "2022-blake3-aes-256-gcm";
802
+ var EGRESS_KEY_BYTES = 32;
802
803
  var EGRESS_SHADOWSOCKS_MODE = "tcp_and_udp";
803
804
  var EGRESS_SHADOWSOCKS_VERSION = "1.24.0";
804
805
  var EGRESS_SHADOWSOCKS_SHA256 = "0d84f5f350ec99396867d718f146fc3810975b2a7cd06192f158d96bdef460e7";
@@ -816,24 +817,44 @@ var EGRESS_DIRECT_ROUTES = [
816
817
  "169.254.0.0/16",
817
818
  "100.64.0.0/10"
818
819
  ];
820
+ var EGRESS_NEW_CONN_RATE = 100;
821
+ var EGRESS_NEW_CONN_BURST = 200;
822
+ var EGRESS_UDP_RATE = 500;
823
+ var EGRESS_UDP_BURST = 1e3;
824
+ var EGRESS_OUT_CONN_RATE = 1e3;
825
+ var EGRESS_OUT_CONN_BURST = 2e3;
819
826
  var EGRESS_SHELL_CONFIG = [
820
827
  `EGRESS_PORT_RANGE_START=${EGRESS_PORT_RANGE_START}`,
821
828
  `EGRESS_PORT_RANGE_END=${EGRESS_PORT_RANGE_END}`,
822
829
  `EGRESS_SHADOWSOCKS_VERSION=${EGRESS_SHADOWSOCKS_VERSION}`,
823
830
  `EGRESS_SHADOWSOCKS_SHA256=${EGRESS_SHADOWSOCKS_SHA256}`,
824
831
  `EGRESS_CIPHER=${EGRESS_CIPHER}`,
832
+ `EGRESS_KEY_BYTES=${EGRESS_KEY_BYTES}`,
825
833
  `EGRESS_MODE=${EGRESS_SHADOWSOCKS_MODE}`,
826
834
  `EGRESS_EXIT_IP_ENDPOINTS="${EGRESS_EXIT_IP_ENDPOINTS.join(" ")}"`,
827
- `EGRESS_DIRECT_ROUTES="${EGRESS_DIRECT_ROUTES.join(" ")}"`
835
+ `EGRESS_DIRECT_ROUTES="${EGRESS_DIRECT_ROUTES.join(" ")}"`,
836
+ `EGRESS_NEW_CONN_RATE=${EGRESS_NEW_CONN_RATE}`,
837
+ `EGRESS_NEW_CONN_BURST=${EGRESS_NEW_CONN_BURST}`,
838
+ `EGRESS_UDP_RATE=${EGRESS_UDP_RATE}`,
839
+ `EGRESS_UDP_BURST=${EGRESS_UDP_BURST}`,
840
+ `EGRESS_OUT_CONN_RATE=${EGRESS_OUT_CONN_RATE}`,
841
+ `EGRESS_OUT_CONN_BURST=${EGRESS_OUT_CONN_BURST}`
828
842
  ].join("\n");
829
843
  var EGRESS_TUNNEL_SERVICE = "replicas-egress.service";
830
844
  var EGRESS_TUNNEL_INTERFACE = "rpxtun0";
831
845
  var EGRESS_DNS_SERVERS = ["1.1.1.1", "8.8.8.8"];
832
846
  var EGRESS_PATHS = {
833
- CONFIG_DIR: "/etc/replicas/egress",
834
- /** Root-only (0600). Holds the customer's proxy password never baked into the image. */
835
- CONFIG_FILE: "/etc/replicas/egress/config.json",
836
- RESOLV_BACKUP: "/etc/replicas/egress/resolv.conf.orig",
847
+ /**
848
+ * Under /run, which is tmpfs. The key therefore never touches disk and cannot
849
+ * be carried into a filesystem snapshot or a paused sandbox's disk image. It
850
+ * does not survive a reboot either, which is correct: the monolith rewrites
851
+ * it on every resume, so a revoked credential cannot come back with the
852
+ * workspace.
853
+ */
854
+ CONFIG_DIR: "/run/replicas-egress",
855
+ CONFIG_FILE: "/run/replicas-egress/config.json",
856
+ /** Persistent: this records the workspace's original resolver so the tunnel can put it back, and must outlive a reboot. */
857
+ RESOLV_BACKUP: "/var/lib/replicas-egress-resolv.conf.orig",
837
858
  UNIT_FILE: `/etc/systemd/system/${EGRESS_TUNNEL_SERVICE}`,
838
859
  UP_SCRIPT: "/usr/local/lib/replicas-egress-up",
839
860
  DOWN_SCRIPT: "/usr/local/lib/replicas-egress-down"
@@ -11052,7 +11073,7 @@ var DEFAULT_CODEX_ARGS = [
11052
11073
  var MIN_CODEX_CLI_VERSION = "0.144.6";
11053
11074
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
11054
11075
  var codexCliVersionEnsured = null;
11055
- var ENGINE_PACKAGE_VERSION = "0.1.629";
11076
+ var ENGINE_PACKAGE_VERSION = "0.1.631";
11056
11077
  var INITIALIZE_METHOD = "initialize";
11057
11078
  var INITIALIZED_NOTIFICATION = "initialized";
11058
11079
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.629",
3
+ "version": "0.1.631",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",