Accessing Settings

There are multiple ways to access SSLens settings:

Via VS Code Settings UI

  1. Open Settings (Cmd+, on macOS or Ctrl+, on Windows/Linux)
  2. Search for "SSLens"
  3. Modify settings using the UI controls

Via settings.json

  1. Open Command Palette (Cmd+Shift+P)
  2. Type "Preferences: Open Settings (JSON)"
  3. Add SSLens settings directly to the JSON file

All Settings Reference

Setting Type Default Description
sslens.defaultPort number 443 Default port to use when fetching certificates
sslens.timeout number 10000 Connection timeout in milliseconds
sslens.maxRecentItems number 10 Maximum number of recent certificates to keep
sslens.showExpiryWarnings boolean true Show warnings for certificates expiring within 30 days
sslens.autoRefresh boolean false Automatically refresh saved domains on startup
sslens.savedDomains array [] List of saved domains (managed by extension)
sslens.recentCertificates array [] Recently fetched certificates (managed by extension)

Connection Settings

sslens.defaultPort

The default port number to use when fetching certificates. Most HTTPS servers use port 443, but you might need to change this if you work with non-standard ports.

JSON
{
  "sslens.defaultPort": 443
}

When to change:

  • Working with development servers on non-standard ports
  • Testing internal services on custom ports (e.g., 8443, 9443)

sslens.timeout

Connection timeout in milliseconds. Increase this if you're working with slow or distant servers.

JSON
{
  "sslens.timeout": 10000
}

Recommended values:

  • 5000 (5 seconds) - Fast local or nearby servers
  • 10000 (10 seconds) - Default, suitable for most cases
  • 30000 (30 seconds) - Slow or overseas servers
⚠️

Timeout Too Short?

If you're getting timeout errors, try increasing this value. Very slow servers may need 30 seconds or more.

Display Settings

sslens.showExpiryWarnings

When enabled, SSLens will show warning indicators for certificates that are expiring soon (within 30 days).

JSON
{
  "sslens.showExpiryWarnings": true
}

Visual indicators:

  • Green - More than 30 days remaining
  • Yellow - Less than 30 days remaining
  • Red - Expired or less than 7 days remaining

sslens.maxRecentItems

The maximum number of recently fetched certificates to keep in the sidebar. Older items are automatically removed when this limit is reached.

JSON
{
  "sslens.maxRecentItems": 10
}

Set to a higher value if you frequently inspect many different domains.

Data Management Settings

sslens.autoRefresh

When enabled, SSLens will automatically refresh certificate information for all saved domains when VS Code starts.

JSON
{
  "sslens.autoRefresh": false
}
💡

Performance Note

Auto-refresh makes network requests on startup. If you have many saved domains, this might slow down VS Code startup slightly. Keep it disabled if startup performance is a priority.

sslens.savedDomains

This setting stores your saved domains. It's managed by the extension, but you can also edit it directly:

JSON
{
  "sslens.savedDomains": [
    {
      "hostname": "api.github.com",
      "port": 443,
      "alias": "GitHub API"
    },
    {
      "hostname": "stripe.com",
      "port": 443,
      "alias": "Stripe Production"
    }
  ]
}

Example Configurations

For Development Teams

If you work with multiple environments and need quick access to certificates:

JSON
{
  "sslens.defaultPort": 443,
  "sslens.timeout": 15000,
  "sslens.maxRecentItems": 25,
  "sslens.showExpiryWarnings": true,
  "sslens.autoRefresh": true,
  "sslens.savedDomains": [
    { "hostname": "api.example.com", "port": 443, "alias": "Production API" },
    { "hostname": "staging-api.example.com", "port": 443, "alias": "Staging API" },
    { "hostname": "dev-api.example.com", "port": 8443, "alias": "Dev API" }
  ]
}

For Mobile Developers

Optimized for generating SSL pinning code:

JSON
{
  "sslens.defaultPort": 443,
  "sslens.timeout": 10000,
  "sslens.maxRecentItems": 15,
  "sslens.showExpiryWarnings": true,
  "sslens.autoRefresh": false
}

For Security Auditing

Extended timeout and history for thorough analysis:

JSON
{
  "sslens.defaultPort": 443,
  "sslens.timeout": 30000,
  "sslens.maxRecentItems": 50,
  "sslens.showExpiryWarnings": true,
  "sslens.autoRefresh": false
}

Minimal Configuration

If you just want to use defaults with expiry warnings disabled:

JSON
{
  "sslens.showExpiryWarnings": false
}

Workspace Settings

You can also set SSLens configuration per-workspace by adding settings to .vscode/settings.json in your project. This is useful for team-shared configurations.