Files
goproxy/docs/dns_config.json
DarkiT 4ac5aab7a0 update: 2023-03-15
1. 移除URL重写器
2. 移除插件系统
2025-03-14 00:24:49 +08:00

83 lines
2.0 KiB
JSON

{
"records": {
"www.github.com": "140.82.121.3",
"github.com": "140.82.121.4",
"api.github.com": "140.82.121.5",
"assets-cdn.github.com": "185.199.108.153",
"collector.github.com": "140.82.121.6",
"codeload.github.com": "140.82.121.9",
"gist.github.com": "140.82.121.4",
"raw.githubusercontent.com": "185.199.108.133",
"s3.amazonaws.com": "52.216.162.69",
"www.google.com": "142.250.4.147",
"google.com": "142.250.4.139",
"ajax.googleapis.com": "142.250.4.95",
"fonts.googleapis.com": "142.250.4.95",
"www.baidu.com": "110.242.68.66",
"baidu.com": "39.156.66.10",
"custom-port-example.com": "192.168.1.10:8080",
"api.custom-port-example.com": "192.168.1.11:8443",
"dev.example.com": "127.0.0.1:3000",
"api.dev.example.com": "127.0.0.1:3001",
"db.dev.example.com": "127.0.0.1:5432"
},
"use_fallback": true,
"ttl": 300,
"rules": [
{
"id": "dns-rule-1",
"type": "dns",
"priority": 100,
"pattern": "example.com",
"match_type": "exact",
"enabled": true,
"targets": [
{
"ip": "192.168.1.100",
"port": 80
},
{
"ip": "192.168.1.101",
"port": 80
}
]
},
{
"id": "dns-rule-2",
"type": "dns",
"priority": 90,
"pattern": "*.example.com",
"match_type": "wildcard",
"enabled": true,
"targets": [
{
"ip": "192.168.1.102",
"port": 80
}
]
},
{
"id": "route-rule-1",
"type": "route",
"priority": 100,
"pattern": "/api/v1",
"match_type": "path",
"enabled": true,
"target": "http://api.example.com",
"header_modifier": {
"X-Forwarded-Host": "api.example.com",
"X-Real-IP": "${client_ip}"
}
},
{
"id": "rewrite-rule-1",
"type": "rewrite",
"priority": 90,
"pattern": "/old/(.*)",
"match_type": "regex",
"enabled": true,
"replacement": "/new/$1"
}
]
}