Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions scripts/start-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ do_start() {

command -v node >/dev/null || fail "node not found. Install Node.js first."

# WSL2 ships with broken IPv6 routing. Node.js resolves dual-stack DNS results
# and tries IPv6 first (ENETUNREACH) then IPv4 (ETIMEDOUT), causing bridge
# connections to api.telegram.org and gateway.discord.gg to fail from the host.
# Force IPv4-first DNS result ordering for all bridge Node.js processes.
if [ -n "${WSL_DISTRO_NAME:-}" ] || [ -n "${WSL_INTEROP:-}" ] || grep -qi microsoft /proc/version 2>/dev/null; then
export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--dns-result-order=ipv4first"
info "WSL2 detected — setting --dns-result-order=ipv4first for Node.js bridge processes"
fi

# Verify sandbox is running
if command -v openshell >/dev/null 2>&1; then
if ! openshell sandbox list 2>&1 | grep -q "Ready"; then
Expand Down