Automatic-Routing

智能域名路由系统 · 提升网站访问体验

当前状态

当前域名:

最佳域名: 正在检测...

即将分析的域名列表:

使用方法

将以下两个文件添加到您的网站中:

  1. redirect.js - 自动路由的核心脚本
  2. 在HTML的<head>部分添加域名配置和脚本引用:
<meta name="automatic-routing-domains" content="example.com,cdn.example.com">
<script src="redirect.js"></script>

手动测试

您可以使用控制台手动初始化或配置自动路由:

// 配置并初始化
AutomaticRouting.init({
  domains: ['example.com', 'cdn.example.com'],
  priorityFactor: 'latency', // 'latency', 'ttfb', 或 'combined'
  forceRedirect: true // 强制重定向,即使已有Cookie
});

高级功能