├── README.md ├── .github └── workflows │ └── php.yml ├── crawler.php └── list ├── ipv4.json ├── ipv6.json └── export.json /README.md: -------------------------------------------------------------------------------- 1 | # CF2DNS 2 | دریافت جدیدترین آی‌پی‌های تمیز از [اینجا](https://stock.hostmonit.com/CloudFlareYes) 3 | 4 | و گردآوری آن به‌صورت زیر : 5 | * [IPv4](https://github.com/ircfspace/cf2dns/blob/master/list/ipv4.json) 6 | * [IPv6](https://github.com/ircfspace/cf2dns/blob/master/list/ipv6.json) 7 | 8 | --- 9 | 10 | * لیست هر ۱۵ دقیقه خودکار بروزرسانی میشود 11 | --- 12 | 13 | [https://ircf.space/list.html](https://ircf.space/list.html) 14 | -------------------------------------------------------------------------------- /.github/workflows/php.yml: -------------------------------------------------------------------------------- 1 | name: "Collect IPs" 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [ "main" ] 7 | schedule: 8 | - cron: '*/15 * * * *' 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | defaults: 14 | run: 15 | shell: bash -e {0} 16 | steps: 17 | - name: Checkout Code 18 | uses: actions/checkout@v2 19 | with: 20 | token: ${{ secrets.GITHUB_TOKEN }} 21 | env: 22 | NODE_VERSION: '20' 23 | 24 | - name: Setup PHP 25 | uses: shivammathur/setup-php@v2 26 | with: 27 | php-version: '8.0' 28 | 29 | - name: Execute PHP script 30 | run: php crawler.php 31 | 32 | - name: Configure Git 33 | run: | 34 | git config --global user.email "ircfspace@gmail.com" 35 | git config --global user.name "ircfspace" 36 | 37 | - name: Commit changes 38 | run: | 39 | git add -A 40 | git diff --cached --quiet || git commit -m "💡 Automatic update - $(TZ='Asia/Tehran' date '+%Y-%m-%d %H:%M')" 41 | 42 | - name: Push changes 43 | uses: ad-m/github-push-action@master 44 | with: 45 | github_token: ${{ secrets.GITHUB_TOKEN }} 46 | -------------------------------------------------------------------------------- /crawler.php: -------------------------------------------------------------------------------- 1 | $KEY, "type" => $type); 8 | $ch = curl_init(); 9 | curl_setopt($ch, CURLOPT_URL, 'https://api.hostmonit.com/get_optimization_ip'); 10 | curl_setopt($ch, CURLOPT_POST, true); 11 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); 12 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 13 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 14 | curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'); 15 | $response = curl_exec($ch); 16 | $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); 17 | if ($http_status == 200) { 18 | return json_decode($response, true); 19 | } else { 20 | echo "CHANGE OPTIMIZATION IP ERROR: REQUEST STATUS CODE IS NOT 200\n"; 21 | return null; 22 | } 23 | curl_close($ch); 24 | } catch (Exception $e) { 25 | echo "CHANGE OPTIMIZATION IP ERROR: " . $e->getMessage() . "\n"; 26 | return null; 27 | } 28 | } 29 | 30 | $getListIpv4 = get_optimization_ip(); 31 | $ipv4 = []; 32 | if ( isset($getListIpv4['code'], $getListIpv4['total']) && 33 | $getListIpv4['code'] === 200 && $getListIpv4['total'] > 0 ) { 34 | foreach ($getListIpv4['info'] as $key => $l) { 35 | $ipv4 = array_merge($ipv4, $l); 36 | } 37 | file_put_contents("list/ipv4.json", json_encode(array_slice($ipv4, 0, 25), JSON_PRETTY_PRINT)); 38 | } 39 | 40 | $getListIpv6 = get_optimization_ip('v6'); 41 | $ipv6 = []; 42 | if ( isset($getListIpv6['code'], $getListIpv6['total']) && 43 | $getListIpv6['code'] === 200 && $getListIpv6['total'] > 0 ) { 44 | foreach ($getListIpv6['info'] as $key => $l) { 45 | $ipv6 = array_merge($ipv6, $l); 46 | } 47 | file_put_contents("list/ipv6.json", json_encode(array_slice($ipv6, 0, 25), JSON_PRETTY_PRINT)); 48 | } 49 | 50 | $ips = []; 51 | if ( !empty($ipv4) && !empty($ipv6) ) { 52 | $ips['ipv4'] = $ipv4; 53 | $ips['ipv6'] = $ipv6; 54 | file_put_contents("list/export.json", json_encode(array_slice($ips, 0, 25), JSON_PRETTY_PRINT)); 55 | } -------------------------------------------------------------------------------- /list/ipv4.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "colo": "HKG", 4 | "ip": "198.41.209.8", 5 | "latency": 52, 6 | "line": "CM", 7 | "loss": 0, 8 | "node": "CDCM", 9 | "speed": 270, 10 | "time": "2025-12-17 10:24:33" 11 | }, 12 | { 13 | "colo": "HKG", 14 | "ip": "198.41.208.134", 15 | "latency": 52, 16 | "line": "CM", 17 | "loss": 0, 18 | "node": "CDCM", 19 | "speed": 265, 20 | "time": "2025-12-17 11:45:51" 21 | }, 22 | { 23 | "colo": "HKG", 24 | "ip": "198.41.208.112", 25 | "latency": 51, 26 | "line": "CM", 27 | "loss": 0, 28 | "node": "CDCM", 29 | "speed": 255, 30 | "time": "2025-12-18 02:29:29" 31 | }, 32 | { 33 | "colo": "HKG", 34 | "ip": "198.41.208.234", 35 | "latency": 53, 36 | "line": "CM", 37 | "loss": 0, 38 | "node": "CDCM", 39 | "speed": 255, 40 | "time": "2025-12-17 10:54:48" 41 | }, 42 | { 43 | "colo": "HKG", 44 | "ip": "198.41.209.165", 45 | "latency": 52, 46 | "line": "CM", 47 | "loss": 0, 48 | "node": "CDCM", 49 | "speed": 255, 50 | "time": "2025-12-18 11:06:48" 51 | }, 52 | { 53 | "colo": "LAX", 54 | "ip": "104.18.113.53", 55 | "latency": 161, 56 | "line": "CT", 57 | "loss": 0, 58 | "node": "QYZJBGP", 59 | "speed": 300, 60 | "time": "2025-12-18 12:26:06" 61 | }, 62 | { 63 | "colo": "SJC", 64 | "ip": "104.17.225.4", 65 | "latency": 151, 66 | "line": "CT", 67 | "loss": 0, 68 | "node": "QYZJBGP", 69 | "speed": 235, 70 | "time": "2025-12-18 12:25:46" 71 | }, 72 | { 73 | "colo": "SJC", 74 | "ip": "104.19.126.15", 75 | "latency": 130, 76 | "line": "CT", 77 | "loss": 0, 78 | "node": "QYZJBGP", 79 | "speed": 235, 80 | "time": "2025-12-18 12:05:46" 81 | }, 82 | { 83 | "colo": "SJC", 84 | "ip": "104.18.249.136", 85 | "latency": 129, 86 | "line": "CT", 87 | "loss": 0, 88 | "node": "QYZJBGP", 89 | "speed": 220, 90 | "time": "2025-12-18 12:05:26" 91 | }, 92 | { 93 | "colo": "SJC", 94 | "ip": "104.17.181.81", 95 | "latency": 132, 96 | "line": "CT", 97 | "loss": 0, 98 | "node": "QYZJBGP", 99 | "speed": 220, 100 | "time": "2025-12-18 12:35:27" 101 | }, 102 | { 103 | "colo": "HKG", 104 | "ip": "198.41.209.8", 105 | "latency": 52, 106 | "line": "CU", 107 | "loss": 0, 108 | "node": "CDCM", 109 | "speed": 270, 110 | "time": "2025-12-17 10:24:33" 111 | }, 112 | { 113 | "colo": "HKG", 114 | "ip": "198.41.208.134", 115 | "latency": 52, 116 | "line": "CU", 117 | "loss": 0, 118 | "node": "CDCM", 119 | "speed": 265, 120 | "time": "2025-12-17 11:45:51" 121 | }, 122 | { 123 | "colo": "HKG", 124 | "ip": "198.41.208.112", 125 | "latency": 51, 126 | "line": "CU", 127 | "loss": 0, 128 | "node": "CDCM", 129 | "speed": 255, 130 | "time": "2025-12-18 02:29:29" 131 | }, 132 | { 133 | "colo": "HKG", 134 | "ip": "198.41.208.234", 135 | "latency": 53, 136 | "line": "CU", 137 | "loss": 0, 138 | "node": "CDCM", 139 | "speed": 255, 140 | "time": "2025-12-17 10:54:48" 141 | }, 142 | { 143 | "colo": "HKG", 144 | "ip": "198.41.209.165", 145 | "latency": 52, 146 | "line": "CU", 147 | "loss": 0, 148 | "node": "CDCM", 149 | "speed": 255, 150 | "time": "2025-12-18 11:06:48" 151 | } 152 | ] -------------------------------------------------------------------------------- /list/ipv6.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "colo": "Default", 4 | "ip": "2606:4700:8d95:cc07:2cc1:2f0b:a025:d72d", 5 | "latency": 9, 6 | "line": "CM", 7 | "loss": 0, 8 | "node": "NETCUP", 9 | "speed": 549, 10 | "time": "2025-12-18 13:19:17" 11 | }, 12 | { 13 | "colo": "Default", 14 | "ip": "2606:4700:8cac:c740:e3fd:f1a1:ea35:e992", 15 | "latency": 9, 16 | "line": "CM", 17 | "loss": 0, 18 | "node": "NETCUP", 19 | "speed": 494, 20 | "time": "2025-12-18 13:19:17" 21 | }, 22 | { 23 | "colo": "Default", 24 | "ip": "2606:4700:90c8:80a2:61f7:14d0:1c1b:e8f8", 25 | "latency": 8, 26 | "line": "CM", 27 | "loss": 0, 28 | "node": "NETCUP", 29 | "speed": 465, 30 | "time": "2025-12-18 13:19:17" 31 | }, 32 | { 33 | "colo": "Default", 34 | "ip": "2606:4700:8d95:1aa4:b6e3:942a:fb0a:81aa", 35 | "latency": 9, 36 | "line": "CM", 37 | "loss": 0, 38 | "node": "NETCUP", 39 | "speed": 403, 40 | "time": "2025-12-18 13:19:17" 41 | }, 42 | { 43 | "colo": "Default", 44 | "ip": "2606:4700:9a61:cbc4:3b8c:88b7:94e9:f4d7", 45 | "latency": 9, 46 | "line": "CM", 47 | "loss": 0, 48 | "node": "NETCUP", 49 | "speed": 400, 50 | "time": "2025-12-18 13:19:17" 51 | }, 52 | { 53 | "colo": "Default", 54 | "ip": "2606:4700:8d95:cc07:2cc1:2f0b:a025:d72d", 55 | "latency": 9, 56 | "line": "CT", 57 | "loss": 0, 58 | "node": "NETCUP", 59 | "speed": 549, 60 | "time": "2025-12-18 13:19:17" 61 | }, 62 | { 63 | "colo": "Default", 64 | "ip": "2606:4700:8cac:c740:e3fd:f1a1:ea35:e992", 65 | "latency": 9, 66 | "line": "CT", 67 | "loss": 0, 68 | "node": "NETCUP", 69 | "speed": 494, 70 | "time": "2025-12-18 13:19:17" 71 | }, 72 | { 73 | "colo": "Default", 74 | "ip": "2606:4700:90c8:80a2:61f7:14d0:1c1b:e8f8", 75 | "latency": 8, 76 | "line": "CT", 77 | "loss": 0, 78 | "node": "NETCUP", 79 | "speed": 465, 80 | "time": "2025-12-18 13:19:17" 81 | }, 82 | { 83 | "colo": "Default", 84 | "ip": "2606:4700:8d95:1aa4:b6e3:942a:fb0a:81aa", 85 | "latency": 9, 86 | "line": "CT", 87 | "loss": 0, 88 | "node": "NETCUP", 89 | "speed": 403, 90 | "time": "2025-12-18 13:19:17" 91 | }, 92 | { 93 | "colo": "Default", 94 | "ip": "2606:4700:9a61:cbc4:3b8c:88b7:94e9:f4d7", 95 | "latency": 9, 96 | "line": "CT", 97 | "loss": 0, 98 | "node": "NETCUP", 99 | "speed": 400, 100 | "time": "2025-12-18 13:19:17" 101 | }, 102 | { 103 | "colo": "Default", 104 | "ip": "2606:4700:8d95:cc07:2cc1:2f0b:a025:d72d", 105 | "latency": 9, 106 | "line": "CU", 107 | "loss": 0, 108 | "node": "NETCUP", 109 | "speed": 549, 110 | "time": "2025-12-18 13:19:17" 111 | }, 112 | { 113 | "colo": "Default", 114 | "ip": "2606:4700:8cac:c740:e3fd:f1a1:ea35:e992", 115 | "latency": 9, 116 | "line": "CU", 117 | "loss": 0, 118 | "node": "NETCUP", 119 | "speed": 494, 120 | "time": "2025-12-18 13:19:17" 121 | }, 122 | { 123 | "colo": "Default", 124 | "ip": "2606:4700:90c8:80a2:61f7:14d0:1c1b:e8f8", 125 | "latency": 8, 126 | "line": "CU", 127 | "loss": 0, 128 | "node": "NETCUP", 129 | "speed": 465, 130 | "time": "2025-12-18 13:19:17" 131 | }, 132 | { 133 | "colo": "Default", 134 | "ip": "2606:4700:8d95:1aa4:b6e3:942a:fb0a:81aa", 135 | "latency": 9, 136 | "line": "CU", 137 | "loss": 0, 138 | "node": "NETCUP", 139 | "speed": 403, 140 | "time": "2025-12-18 13:19:17" 141 | }, 142 | { 143 | "colo": "Default", 144 | "ip": "2606:4700:9a61:cbc4:3b8c:88b7:94e9:f4d7", 145 | "latency": 9, 146 | "line": "CU", 147 | "loss": 0, 148 | "node": "NETCUP", 149 | "speed": 400, 150 | "time": "2025-12-18 13:19:17" 151 | } 152 | ] -------------------------------------------------------------------------------- /list/export.json: -------------------------------------------------------------------------------- 1 | { 2 | "ipv4": [ 3 | { 4 | "colo": "HKG", 5 | "ip": "198.41.209.8", 6 | "latency": 52, 7 | "line": "CM", 8 | "loss": 0, 9 | "node": "CDCM", 10 | "speed": 270, 11 | "time": "2025-12-17 10:24:33" 12 | }, 13 | { 14 | "colo": "HKG", 15 | "ip": "198.41.208.134", 16 | "latency": 52, 17 | "line": "CM", 18 | "loss": 0, 19 | "node": "CDCM", 20 | "speed": 265, 21 | "time": "2025-12-17 11:45:51" 22 | }, 23 | { 24 | "colo": "HKG", 25 | "ip": "198.41.208.112", 26 | "latency": 51, 27 | "line": "CM", 28 | "loss": 0, 29 | "node": "CDCM", 30 | "speed": 255, 31 | "time": "2025-12-18 02:29:29" 32 | }, 33 | { 34 | "colo": "HKG", 35 | "ip": "198.41.208.234", 36 | "latency": 53, 37 | "line": "CM", 38 | "loss": 0, 39 | "node": "CDCM", 40 | "speed": 255, 41 | "time": "2025-12-17 10:54:48" 42 | }, 43 | { 44 | "colo": "HKG", 45 | "ip": "198.41.209.165", 46 | "latency": 52, 47 | "line": "CM", 48 | "loss": 0, 49 | "node": "CDCM", 50 | "speed": 255, 51 | "time": "2025-12-18 11:06:48" 52 | }, 53 | { 54 | "colo": "LAX", 55 | "ip": "104.18.113.53", 56 | "latency": 161, 57 | "line": "CT", 58 | "loss": 0, 59 | "node": "QYZJBGP", 60 | "speed": 300, 61 | "time": "2025-12-18 12:26:06" 62 | }, 63 | { 64 | "colo": "SJC", 65 | "ip": "104.17.225.4", 66 | "latency": 151, 67 | "line": "CT", 68 | "loss": 0, 69 | "node": "QYZJBGP", 70 | "speed": 235, 71 | "time": "2025-12-18 12:25:46" 72 | }, 73 | { 74 | "colo": "SJC", 75 | "ip": "104.19.126.15", 76 | "latency": 130, 77 | "line": "CT", 78 | "loss": 0, 79 | "node": "QYZJBGP", 80 | "speed": 235, 81 | "time": "2025-12-18 12:05:46" 82 | }, 83 | { 84 | "colo": "SJC", 85 | "ip": "104.18.249.136", 86 | "latency": 129, 87 | "line": "CT", 88 | "loss": 0, 89 | "node": "QYZJBGP", 90 | "speed": 220, 91 | "time": "2025-12-18 12:05:26" 92 | }, 93 | { 94 | "colo": "SJC", 95 | "ip": "104.17.181.81", 96 | "latency": 132, 97 | "line": "CT", 98 | "loss": 0, 99 | "node": "QYZJBGP", 100 | "speed": 220, 101 | "time": "2025-12-18 12:35:27" 102 | }, 103 | { 104 | "colo": "HKG", 105 | "ip": "198.41.209.8", 106 | "latency": 52, 107 | "line": "CU", 108 | "loss": 0, 109 | "node": "CDCM", 110 | "speed": 270, 111 | "time": "2025-12-17 10:24:33" 112 | }, 113 | { 114 | "colo": "HKG", 115 | "ip": "198.41.208.134", 116 | "latency": 52, 117 | "line": "CU", 118 | "loss": 0, 119 | "node": "CDCM", 120 | "speed": 265, 121 | "time": "2025-12-17 11:45:51" 122 | }, 123 | { 124 | "colo": "HKG", 125 | "ip": "198.41.208.112", 126 | "latency": 51, 127 | "line": "CU", 128 | "loss": 0, 129 | "node": "CDCM", 130 | "speed": 255, 131 | "time": "2025-12-18 02:29:29" 132 | }, 133 | { 134 | "colo": "HKG", 135 | "ip": "198.41.208.234", 136 | "latency": 53, 137 | "line": "CU", 138 | "loss": 0, 139 | "node": "CDCM", 140 | "speed": 255, 141 | "time": "2025-12-17 10:54:48" 142 | }, 143 | { 144 | "colo": "HKG", 145 | "ip": "198.41.209.165", 146 | "latency": 52, 147 | "line": "CU", 148 | "loss": 0, 149 | "node": "CDCM", 150 | "speed": 255, 151 | "time": "2025-12-18 11:06:48" 152 | } 153 | ], 154 | "ipv6": [ 155 | { 156 | "colo": "Default", 157 | "ip": "2606:4700:8d95:cc07:2cc1:2f0b:a025:d72d", 158 | "latency": 9, 159 | "line": "CM", 160 | "loss": 0, 161 | "node": "NETCUP", 162 | "speed": 549, 163 | "time": "2025-12-18 13:19:17" 164 | }, 165 | { 166 | "colo": "Default", 167 | "ip": "2606:4700:8cac:c740:e3fd:f1a1:ea35:e992", 168 | "latency": 9, 169 | "line": "CM", 170 | "loss": 0, 171 | "node": "NETCUP", 172 | "speed": 494, 173 | "time": "2025-12-18 13:19:17" 174 | }, 175 | { 176 | "colo": "Default", 177 | "ip": "2606:4700:90c8:80a2:61f7:14d0:1c1b:e8f8", 178 | "latency": 8, 179 | "line": "CM", 180 | "loss": 0, 181 | "node": "NETCUP", 182 | "speed": 465, 183 | "time": "2025-12-18 13:19:17" 184 | }, 185 | { 186 | "colo": "Default", 187 | "ip": "2606:4700:8d95:1aa4:b6e3:942a:fb0a:81aa", 188 | "latency": 9, 189 | "line": "CM", 190 | "loss": 0, 191 | "node": "NETCUP", 192 | "speed": 403, 193 | "time": "2025-12-18 13:19:17" 194 | }, 195 | { 196 | "colo": "Default", 197 | "ip": "2606:4700:9a61:cbc4:3b8c:88b7:94e9:f4d7", 198 | "latency": 9, 199 | "line": "CM", 200 | "loss": 0, 201 | "node": "NETCUP", 202 | "speed": 400, 203 | "time": "2025-12-18 13:19:17" 204 | }, 205 | { 206 | "colo": "Default", 207 | "ip": "2606:4700:8d95:cc07:2cc1:2f0b:a025:d72d", 208 | "latency": 9, 209 | "line": "CT", 210 | "loss": 0, 211 | "node": "NETCUP", 212 | "speed": 549, 213 | "time": "2025-12-18 13:19:17" 214 | }, 215 | { 216 | "colo": "Default", 217 | "ip": "2606:4700:8cac:c740:e3fd:f1a1:ea35:e992", 218 | "latency": 9, 219 | "line": "CT", 220 | "loss": 0, 221 | "node": "NETCUP", 222 | "speed": 494, 223 | "time": "2025-12-18 13:19:17" 224 | }, 225 | { 226 | "colo": "Default", 227 | "ip": "2606:4700:90c8:80a2:61f7:14d0:1c1b:e8f8", 228 | "latency": 8, 229 | "line": "CT", 230 | "loss": 0, 231 | "node": "NETCUP", 232 | "speed": 465, 233 | "time": "2025-12-18 13:19:17" 234 | }, 235 | { 236 | "colo": "Default", 237 | "ip": "2606:4700:8d95:1aa4:b6e3:942a:fb0a:81aa", 238 | "latency": 9, 239 | "line": "CT", 240 | "loss": 0, 241 | "node": "NETCUP", 242 | "speed": 403, 243 | "time": "2025-12-18 13:19:17" 244 | }, 245 | { 246 | "colo": "Default", 247 | "ip": "2606:4700:9a61:cbc4:3b8c:88b7:94e9:f4d7", 248 | "latency": 9, 249 | "line": "CT", 250 | "loss": 0, 251 | "node": "NETCUP", 252 | "speed": 400, 253 | "time": "2025-12-18 13:19:17" 254 | }, 255 | { 256 | "colo": "Default", 257 | "ip": "2606:4700:8d95:cc07:2cc1:2f0b:a025:d72d", 258 | "latency": 9, 259 | "line": "CU", 260 | "loss": 0, 261 | "node": "NETCUP", 262 | "speed": 549, 263 | "time": "2025-12-18 13:19:17" 264 | }, 265 | { 266 | "colo": "Default", 267 | "ip": "2606:4700:8cac:c740:e3fd:f1a1:ea35:e992", 268 | "latency": 9, 269 | "line": "CU", 270 | "loss": 0, 271 | "node": "NETCUP", 272 | "speed": 494, 273 | "time": "2025-12-18 13:19:17" 274 | }, 275 | { 276 | "colo": "Default", 277 | "ip": "2606:4700:90c8:80a2:61f7:14d0:1c1b:e8f8", 278 | "latency": 8, 279 | "line": "CU", 280 | "loss": 0, 281 | "node": "NETCUP", 282 | "speed": 465, 283 | "time": "2025-12-18 13:19:17" 284 | }, 285 | { 286 | "colo": "Default", 287 | "ip": "2606:4700:8d95:1aa4:b6e3:942a:fb0a:81aa", 288 | "latency": 9, 289 | "line": "CU", 290 | "loss": 0, 291 | "node": "NETCUP", 292 | "speed": 403, 293 | "time": "2025-12-18 13:19:17" 294 | }, 295 | { 296 | "colo": "Default", 297 | "ip": "2606:4700:9a61:cbc4:3b8c:88b7:94e9:f4d7", 298 | "latency": 9, 299 | "line": "CU", 300 | "loss": 0, 301 | "node": "NETCUP", 302 | "speed": 400, 303 | "time": "2025-12-18 13:19:17" 304 | } 305 | ] 306 | } --------------------------------------------------------------------------------