$ProxyIP = "192.168.40.211"
$PoolDomains = @(
"viabtc.com", "viabtc.top", "viabtc.io",
"binance.com", "btc.com", "poolin.com",
"antpool.com", "f2pool.com", "emcd.io",
"foundryusa.com", "braiins.com", "slushpool.com"
)
foreach ($Domain in $PoolDomains) {
# 1. Проверяем, существует ли зона, и создаем её при отсутствии
$ZoneExists = Get-DnsServerZone -Name $Domain -ErrorAction SilentlyContinue
if (-not $ZoneExists) {
Add-DnsServerPrimaryZone -Name $Domain -ZoneFile "$Domain.dns"
Write-Host "Создана новая зона: $Domain" -ForegroundColor Yellow
}
# 2. Очищаем все старые A-записи в этой зоне
Get-DnsServerResourceRecord -ZoneName $Domain -RRType "A" -ErrorAction SilentlyContinue |
Remove-DnsServerResourceRecord -ZoneName $Domain -Force -ErrorAction SilentlyContinue
# 3. Добавляем правильный IP-адрес вашего Stratum-прокси
Add-DnsServerResourceRecordA -ZoneName $Domain -Name "@" -IPv4Address $ProxyIP -ErrorAction SilentlyContinue
Add-DnsServerResourceRecordA -ZoneName $Domain -Name "*" -IPv4Address $ProxyIP -ErrorAction SilentlyContinue
}
# 4. Очищаем кэш DNS-сервера
Clear-DnsServerCache -Force
Write-Host "`nВсе зоны (включая viabtc.io) успешно настроены на $ProxyIP!" -ForegroundColor Green