Skip to content
GitHubXDiscordRSS

WarpDefaultProfile

Manage the Cloudflare WARP default device profile settings that apply when no custom profile matches.

The Cloudflare WARP Default Device Profile defines the account-wide default WARP client settings that apply when no custom profile matches a device. The default profile always exists and cannot be deleted.

Update the default WARP settings:

import { WarpDefaultProfile } from "alchemy/cloudflare";
const defaultProfile = await WarpDefaultProfile("default", {
serviceModeV2: { mode: "warp" },
autoConnect: 0,
captivePortal: 180,
supportUrl: "https://support.example.com"
});

Configure default split tunnel behavior:

import { WarpDefaultProfile } from "alchemy/cloudflare";
const defaultProfile = await WarpDefaultProfile("default", {
serviceModeV2: { mode: "warp" },
splitTunnel: {
mode: "exclude",
entries: [
{ address: "10.0.0.0/8", description: "Internal network" },
{ address: "192.168.0.0/16", description: "Local network" }
]
}
});

Only route specific networks through WARP by default:

import { WarpDefaultProfile } from "alchemy/cloudflare";
const defaultProfile = await WarpDefaultProfile("default", {
serviceModeV2: { mode: "warp" },
splitTunnel: {
mode: "include",
entries: [
{ address: "10.0.0.0/8", description: "Company network" },
{ address: "company.com", description: "Company domain" }
]
}
});

Create a locked-down default configuration:

import { WarpDefaultProfile } from "alchemy/cloudflare";
const defaultProfile = await WarpDefaultProfile("default", {
serviceModeV2: { mode: "warp" },
switchLocked: true,
allowedToLeave: false,
disableAutoFallback: true,
tunnelProtocol: "wireguard"
});

Configure all default WARP client settings:

import { WarpDefaultProfile } from "alchemy/cloudflare";
const defaultProfile = await WarpDefaultProfile("default", {
serviceModeV2: { mode: "warp" },
disableAutoFallback: false,
allowModeSwitch: false,
switchLocked: true,
tunnelProtocol: "wireguard",
autoConnect: 0,
allowedToLeave: false,
captivePortal: 180,
supportUrl: "https://support.example.com",
excludeOfficeIps: true,
lanAllowMinutes: 5,
lanAllowSubnetSize: 24
});
PropertyTypeDescription
serviceModeV2{ mode: "warp" | "proxy" | "doh_only" | "warp_tunnel_only"; port?: number }WARP client operational mode
disableAutoFallbackbooleanDisable automatic fallback to direct connection
allowModeSwitchbooleanAllow users to manually switch WARP modes
switchLockedbooleanLock the WARP toggle switch
tunnelProtocol"wireguard" | "masque"Tunnel protocol to use
autoConnectnumberAuto-connect timeout in seconds (0 to disable)
allowedToLeavebooleanAllow users to disconnect from WARP
captivePortalnumberCaptive portal timeout in seconds
supportUrlstringSupport URL for feedback button
excludeOfficeIpsbooleanExclude office IPs from WARP tunnel
lanAllowMinutesnumberLAN allow duration in minutes
lanAllowSubnetSizenumberLAN subnet size for local network access
splitTunnelSplitTunnelConfigSplit tunnel configuration

The SplitTunnelConfig includes:

  • mode: "include" (only specified routes use WARP) or "exclude" (all routes except specified ones use WARP)
  • entries: Array of routes with address (IP/CIDR or domain) and optional description