Testing enterprise reverse proxy routing, TLS certificate handling, and API rate limiting locally on Windows 11 requires a secure, reproducible test environment. Windows Sandbox offers lightweight Hyper-V based desktop isolation that resets completely upon closure. By provisioning a local Traefik edge router inside Windows Sandbox using automated Windows Sandbox Configuration (.wsb) XML scripts, developers can benchmark dynamic rate limiting and TLS termination for Outline without altering host system networks.
Windows Sandbox WSB XML Architecture
Windows Sandbox environments are configured using declarative XML files with the .wsb file extension. The manifest enables virtualised GPU acceleration, sets networking modes, maps host directories into the container, and initiates automated provisioning scripts via LogonCommand.
Create a file named TraefikOutlineSandbox.wsb on your Windows 11 host workstation:
<Configuration>
<VGpu>Enable</VGpu>
<Networking>Default</Networking>
<MappedFolders>
<MappedFolder>
<HostFolder>C:SandboxSharedTraefikOutline</HostFolder>
<SandboxFolder>C:TraefikOutline</SandboxFolder>
<ReadOnly>false</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>powershell.exe -ExecutionPolicy Bypass -NoExit -File "C:TraefikOutlinesetup_environment.ps1"</Command>
</LogonCommand>
<MemoryInMB>8192</MemoryInMB>
</Configuration>
Configuring Dynamic RateLimit Middleware in Traefik
Within the mapped folder at C:SandboxSharedTraefikOutlinedynamic.yml, specify dynamic middlewares that restrict request bursts against sensitive Outline authentication endpoints:
http:
routers:
outline-router:
rule: "Host('outline.local')"
entryPoints:
- "websecure"
service: "outline-backend"
middlewares:
- "outline-ratelimit"
- "security-headers"
tls: {}
middlewares:
outline-ratelimit:
rateLimit:
average: 10
burst: 20
period: "1m"
sourceCriterion:
ipStrategy:
depth: 1
security-headers:
headers:
sslRedirect: true
stsSeconds: 315360000
browserXssFilter: true
contentTypeNosniff: true
frameDeny: true
services:
outline-backend:
loadBalancer:
servers:
- url: "http://127.0.0.1:8080"
Automating Sandbox Boot with PowerShell
In C:SandboxSharedTraefikOutlinesetup_environment.ps1, write the initialisation logic to generate local TLS certificates and start the Traefik daemon:
Write-Host "Initialising Traefik & Outline Sandbox Environment..." -ForegroundColor Cyan
$WorkingDir = "C:TraefikOutline"
Set-Location $WorkingDir
# Generate development self-signed certificate
if (-not (Test-Path "$WorkingDircertscert.pem")) {
New-Item -ItemType Directory -Force -Path "$WorkingDircerts"
$cert = New-SelfSignedCertificate -DnsName "outline.local" -CertStoreLocation "cert:LocalMachineMy"
Export-Certificate -Cert $cert -FilePath "$WorkingDircertscert.pem"
}
# Start Traefik reverse proxy
Write-Host "Starting Traefik Router..." -ForegroundColor Green
Start-Process -FilePath "C:TraefikOutline raefik.exe" -ArgumentList "--configFile=C:TraefikOutline raefik.yml" -NoNewWindow
Write-Host "Sandbox verification environment is online. Test endpoints via curl or browser." -ForegroundColor Yellow
Validating Rate Limit Rejections
Inside the running Windows Sandbox command shell, verify that repeated rapid requests trigger HTTP status 429 Too Many Requests:
1..30 | ForEach-Object {
$res = Invoke-WebRequest -Uri "https://outline.local/api/auth.info" -SkipCertificateCheck -Method Post -ErrorAction SilentlyContinue
[PSCustomObject]@{
Attempt = $_
StatusCode = $res.StatusCode
}
}
This automated Sandbox setup enables rapid iteration and security audits without leaving artefacts on the primary Windows 11 host operating system.