Skip to content

Commit cd2268c

Browse files
Adjust source from ipverse.net to Github (hestiacp#2429)
* Adjust source from ipverse.net to Github See https://github.com/ipverse/rir-ip * Add 2x missing $ * Remove obsolete line break Co-authored-by: Raphael <rs@scit.ch>
1 parent 74c2780 commit cd2268c

File tree

1 file changed

+11
-29
lines changed

1 file changed

+11
-29
lines changed

web/templates/pages/add_firewall_ipset.html

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -112,37 +112,19 @@
112112

113113
<script>
114114
var country_iplists = [
115-
// Define IPv4 country lists
116-
{ name: "[IPv4] Country - Canada", source: "http://ipverse.net/ipblocks/data/countries/ca.zone" },
117-
{ name: "[IPv4] Country - China", source: "http://ipverse.net/ipblocks/data/countries/cn.zone" },
118-
{ name: "[IPv4] Country - France", source: "http://ipverse.net/ipblocks/data/countries/fr.zone" },
119-
{ name: "[IPv4] Country - Germany", source: "http://ipverse.net/ipblocks/data/countries/de.zone" },
120-
{ name: "[IPv4] Country - India", source: "http://ipverse.net/ipblocks/data/countries/in.zone" },
121-
{ name: "[IPv4] Country - Netherlands", source: "http://ipverse.net/ipblocks/data/countries/nl.zone" },
122-
{ name: "[IPv4] Country - Romania", source: "http://ipverse.net/ipblocks/data/countries/ro.zone" },
123-
{ name: "[IPv4] Country - Russia", source: "http://ipverse.net/ipblocks/data/countries/ru.zone" },
124-
{ name: "[IPv4] Country - Spain", source: "http://ipverse.net/ipblocks/data/countries/es.zone" },
125-
{ name: "[IPv4] Country - Switzerland", source: "http://ipverse.net/ipblocks/data/countries/ch.zone" },
126-
{ name: "[IPv4] Country - Turkey", source: "http://ipverse.net/ipblocks/data/countries/tr.zone" },
127-
{ name: "[IPv4] Country - Ukraine", source: "http://ipverse.net/ipblocks/data/countries/ua.zone" },
128-
{ name: "[IPv4] Country - United Kingdom", source: "http://ipverse.net/ipblocks/data/countries/gb.zone" },
129-
{ name: "[IPv4] Country - United States", source: "http://ipverse.net/ipblocks/data/countries/us.zone" },
130-
115+
<?php
116+
$country = array('ca' => 'Canada', 'cn' => 'China', 'fr' => 'French', 'de' => 'Germany', 'in' => 'India', 'nl' => 'Netherlands', 'ro' => 'Romania', 'ru' => 'Russia', 'es' => 'Spain', 'ch' => 'Switzerland', 'tr' => 'Turkey', 'ua' => 'Ukraine', 'uk' => 'United Kingdom', 'us' => 'United States');
117+
foreach($country as $iso =>$name){
118+
echo '{name: "[IPV] Country - '.$name.'", source:"https://raw.githubusercontent.com/ipverse/rir-ip/master/country/'.$iso.'/ipv4-aggregated.txt"},'."\n";
119+
}
120+
?>
131121
// Define IPv6 country lists
132122
/*
133-
{name: "[IPv6] Country - China", source:"http://ipverse.net/ipblocks/data/countries/cn-ipv6.zone"},
134-
{name: "[IPv6] Country - Canada", source:"http://ipverse.net/ipblocks/data/countries/ca-ipv6.zone"},
135-
{name: "[IPv6] Country - France", source:"http://ipverse.net/ipblocks/data/countries/fr-ipv6.zone"},
136-
{name: "[IPv6] Country - Germany", source:"http://ipverse.net/ipblocks/data/countries/de-ipv6.zone"},
137-
{name: "[IPv6] Country - India", source:"http://ipverse.net/ipblocks/data/countries/in-ipv6.zone"},
138-
{name: "[IPv6] Country - Netherlands", source:"http://ipverse.net/ipblocks/data/countries/nl-ipv6.zone"},
139-
{name: "[IPv6] Country - Romania", source:"http://ipverse.net/ipblocks/data/countries/ro-ipv6.zone"},
140-
{name: "[IPv6] Country - Russia", source:"http://ipverse.net/ipblocks/data/countries/ru-ipv6.zone"},
141-
{name: "[IPv6] Country - Spain", source:"http://ipverse.net/ipblocks/data/countries/es-ipv6.zone"},
142-
{name: "[IPv6] Country - Switzerland", source:"http://ipverse.net/ipblocks/data/countries/ch-ipv6.zone"},
143-
{name: "[IPv6] Country - Ukraine", source:"http://ipverse.net/ipblocks/data/countries/ua-ipv6.zone"},
144-
{name: "[IPv6] Country - United Kingdom", source:"http://ipverse.net/ipblocks/data/countries/gb-ipv6.zone"},
145-
{name: "[IPv6] Country - United States", source:"http://ipverse.net/ipblocks/data/countries/us-ipv6.zone"},
123+
<?php
124+
foreach($country as $iso =>$name){
125+
echo '{name: "[IPV] Country - '.$name.'", source:"https://raw.githubusercontent.com/ipverse/rir-ip/master/country/'.$iso.'/ipv4-aggregated.txt"},'."\n";
126+
}
127+
?>
146128
*/
147129
];
148130

0 commit comments

Comments
 (0)