Proxy Core Detection Helpers (proxySubscription/needsCore.ts)

omniroute95 · src/lib/proxySubscription/needsCore.ts · typescript · MIT
integration, infra, lang:typescript, tag:routing, tag:utilities

Dependency-free utility functions to detect proxy nodes requiring a local proxy core such as sing-box or clash.

// Source: https://github.com/ChrisStack95/omniroute95 | License: MIT | Copyright 2026 diegosouzapw
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Pure, dependency-free helpers for detecting proxy nodes that require a
 * local proxy core (sing-box / clash).
 *
 * Extracted from the SubscriptionTab UI so the rule is unit-testable without
 * React / DOM. The redacted node summary (from `parse.redactedNodeSummary`)
 * carries `type` for directly-usable nodes (http/https/socks5) and only
 * `rawProtocol` for nodes that need a local core.
 */

export const NEEDS_CORE_PROTOCOLS = new Set<string>([
  "ss",
  "vmess",
  "trojan",
  "vless",
  "tuic",
  "hysteria",
  "wireguard",
]);

/**
 * Whether a redacted node summary represents a node that OmniRoute cannot
 * forward 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key