context -> servers
All checks were successful
Sync PIA Servers / docker (17, 3.8.5) (push) Successful in 28s

This commit is contained in:
Braydon 2024-04-27 18:48:43 -04:00
parent e4874da7bd
commit 103a5e7364
4 changed files with 3482 additions and 1162 deletions

View File

@ -37,7 +37,7 @@ jobs:
run: | run: |
git config --global user.email "braydonrainnny@gmail.com" git config --global user.email "braydonrainnny@gmail.com"
git config --global user.name "Braydon" git config --global user.name "Braydon"
git add context.json git add servers.json
git add README.md git add README.md
git commit -m "Scheduled update" git commit -m "Scheduled update"
git push https://Rainnny:${{ secrets.AUTH_TOKEN }}@git.rainnny.club/Rainnny/PIA-ServerList git push https://Rainnny:${{ secrets.AUTH_TOKEN }}@git.rainnny.club/Rainnny/PIA-ServerList

166
README.md
View File

@ -1,6 +1,6 @@
![Servers](https://img.shields.io/badge/Servers-3,916-darkgreen) ![Servers](https://img.shields.io/badge/Servers-4,380-darkgreen)
![Total Regions](https://img.shields.io/badge/Total_Regions-97-darkgreen) ![Total Regions](https://img.shields.io/badge/Total_Regions-97-darkgreen)
![Last Updated](https://img.shields.io/badge/Last_Updated-April_27_2024_18:01_EDT-darkgreen) ![Last Updated](https://img.shields.io/badge/Last_Updated-April_27_2024_18:48_EDT-darkgreen)
# PIA-ServerList # PIA-ServerList
An automatically updated list of IPs for PIA servers, this list is updated every hour, and servers in this list will be removed in they have not been seen in the last week. An automatically updated list of IPs for PIA servers, this list is updated every hour, and servers in this list will be removed in they have not been seen in the last week.
@ -10,98 +10,98 @@ Wanna see the IP list? [Click Here](./context.json)
## Servers ## Servers
| Region | Servers | | Region | Servers |
|----------------------|---------| |----------------------|---------|
| CA Toronto | 66 | | CA Toronto | 76 |
| US Texas | 66 | | Netherlands | 75 |
| Netherlands | 63 | | US West | 74 |
| CA Vancouver | 62 | | US Texas | 74 |
| US West | 62 | | US Seattle | 72 |
| US Seattle | 61 | | CA Vancouver | 71 |
| US New York | 61 | | US Silicon Valley | 71 |
| DE Berlin | 60 | | CA Ontario | 71 |
| US Silicon Valley | 60 | | CA Montreal | 71 |
| US Florida | 59 | | DE Berlin | 70 |
| US Las Vegas | 59 | | US California | 70 |
| UK London | 59 | | UK London | 70 |
| AU Melbourne | 59 | | US New York | 69 |
| CA Ontario | 59 | | US Chicago | 69 |
| CA Montreal | 59 | | AU Melbourne | 69 |
| US Atlanta | 59 | | US Florida | 68 |
| Switzerland | 58 | | US Las Vegas | 68 |
| US California | 58 | | US Washington DC | 67 |
| US Chicago | 58 | | DE Frankfurt | 67 |
| US Washington DC | 58 | | US East | 66 |
| US East | 57 | | UK Manchester | 66 |
| UK Manchester | 57 | | US Atlanta | 66 |
| US Denver | 57 | | Switzerland | 65 |
| DE Frankfurt | 57 | | New Zealand | 65 |
| New Zealand | 57 | | Singapore | 63 |
| US Houston | 55 | | US Denver | 63 |
| AU Perth | 54 | | US Houston | 63 |
| Japan | 53 | | Japan | 62 |
| Singapore | 53 | | France | 62 |
| UK Southampton | 53 | | AU Sydney | 62 |
| AU Sydney | 53 | | AU Perth | 61 |
| France | 51 | | UK Southampton | 59 |
| Sweden | 50 | | Sweden | 58 |
| Norway | 49 | | Israel | 56 |
| Israel | 49 | | Norway | 55 |
| Ireland | 49 | | Ireland | 54 |
| Czech Republic | 47 | | Czech Republic | 53 |
| Estonia | 46 | | Spain | 51 |
| Spain | 46 | | Brazil | 51 |
| Denmark | 46 | | Denmark | 51 |
| Mexico | 44 | | Estonia | 50 |
| Luxembourg | 43 | | Mexico | 49 |
| Bahamas | 43 | | Bahamas | 47 |
| Italy | 42 | | Argentina | 47 |
| Argentina | 42 | | Ukraine | 46 |
| Brazil | 42 | | Italy | 46 |
| Latvia | 42 | | Latvia | 46 |
| Finland | 41 | | Austria | 45 |
| Panama | 40 | | Luxembourg | 45 |
| Poland | 39 | | Finland | 45 |
| Venezuela | 39 | | Romania | 43 |
| Ukraine | 39 | | Panama | 42 |
| Austria | 39 | | Venezuela | 41 |
| Romania | 39 | | Poland | 40 |
| Andorra | 36 | | Greenland | 40 |
| Turkey | 36 | | Turkey | 39 |
| Slovakia | 36 | | Lithuania | 39 |
| Vietnam | 35 | | Greece | 39 |
| Lithuania | 35 | | Slovakia | 39 |
| Greece | 35 | | Vietnam | 38 |
| Greenland | 34 | | Andorra | 37 |
| Belgium | 35 |
| Taiwan | 34 |
| Algeria | 33 | | Algeria | 33 |
| Belgium | 33 | | China | 32 |
| Taiwan | 32 | | Albania | 31 |
| China | 31 | | United Arab Emirates | 31 |
| Albania | 29 | | Malta | 31 |
| United Arab Emirates | 29 | | Qatar | 31 |
| Malta | 29 | | Bangladesh | 30 |
| Qatar | 29 |
| Bangladesh | 29 |
| Liechtenstein | 28 | | Liechtenstein | 28 |
| Isle OF Man | 26 | | Philippines | 27 |
| Isle OF Man | 27 |
| Hungary | 26 |
| Bulgaria | 26 |
| India | 26 |
| South Africa | 26 |
| Montenegro | 26 | | Montenegro | 26 |
| Saudi Arabia | 25 | | Saudi Arabia | 25 |
| Philippines | 25 | | Macao | 24 |
| Bulgaria | 25 |
| South Africa | 25 |
| Hungary | 24 |
| Morocco | 24 | | Morocco | 24 |
| India | 24 | | Moldova | 23 |
| Nigeria | 23 | | Nigeria | 23 |
| Kazakhstan | 23 | | Kazakhstan | 23 |
| Egypt | 23 |
| Iceland | 23 | | Iceland | 23 |
| Portugal | 22 | | Portugal | 22 |
| Monaco | 22 | | Monaco | 22 |
| Macao | 22 | | Cyprus | 22 |
| Egypt | 22 | | Macedonia | 22 |
| Cyprus | 21 | | Georgia | 21 |
| Moldova | 20 |
| Cambodia | 20 | | Cambodia | 20 |
| Georgia | 20 |
| Macedonia | 20 |
| Hong Kong | 16 | | Hong Kong | 16 |
| Serbia | 15 | | Serbia | 15 |
| Armenia | 12 | | Armenia | 12 |

File diff suppressed because it is too large Load Diff

View File

@ -30,23 +30,23 @@ public final class PIAServerList {
.setPrettyPrinting() .setPrettyPrinting()
.create(); .create();
private static final String OPENVPN_FILES_ENDPOINT = "https://www.privateinternetaccess.com/openvpn/openvpn.zip"; private static final String OPENVPN_FILES_ENDPOINT = "https://www.privateinternetaccess.com/openvpn/openvpn.zip";
private static final File SERVERS_CONTEXT_FILE = new File("context.json"); private static final File SERVERS_FILE = new File("servers.json");
@SneakyThrows @SneakyThrows
public static void main(@NonNull String[] args) { public static void main(@NonNull String[] args) {
Set<PIAServer> servers = getNewServers(); // Get the new servers from PIA Set<PIAServer> servers = getNewServers(); // Get the new servers from PIA
int before = servers.size(); int before = servers.size();
servers.addAll(loadServersFromContext()); // Load servers from context servers.addAll(loadServersFromFile()); // Load servers from the file
System.out.println("Loaded " + (servers.size() - before) + " server(s) from the context file"); System.out.println("Loaded " + (servers.size() - before) + " server(s) from the servers file");
// Delete servers that haven't been seen in more than a week // Delete servers that haven't been seen in more than a week
before = servers.size(); before = servers.size();
servers.removeIf(server -> (System.currentTimeMillis() - server.getLastSeen()) >= TimeUnit.DAYS.toMillis(7L)); servers.removeIf(server -> (System.currentTimeMillis() - server.getLastSeen()) >= TimeUnit.DAYS.toMillis(7L));
System.out.println("Removed " + (before - servers.size()) + " server(s) that haven't been seen in more than a week"); System.out.println("Removed " + (before - servers.size()) + " server(s) that haven't been seen in more than a week");
// Write the servers to the context file // Write the servers to the servers file
System.out.println("Writing context file..."); System.out.println("Writing servers file...");
try (FileWriter fileWriter = new FileWriter(SERVERS_CONTEXT_FILE)) { try (FileWriter fileWriter = new FileWriter(SERVERS_FILE)) {
GSON.toJson(servers, fileWriter); GSON.toJson(servers, fileWriter);
} }
System.out.println("Done, wrote " + servers.size() + " servers to the file"); System.out.println("Done, wrote " + servers.size() + " servers to the file");
@ -123,16 +123,16 @@ public final class PIAServerList {
} }
/** /**
* Load the servers from the context file. * Load the servers from the json file.
* *
* @return the loaded servers * @return the loaded servers
*/ */
@SneakyThrows @SneakyThrows
private static List<PIAServer> loadServersFromContext() { private static List<PIAServer> loadServersFromFile() {
if (!SERVERS_CONTEXT_FILE.exists()) { // No context file to load if (!SERVERS_FILE.exists()) { // No servers file to load
return new ArrayList<>(); return new ArrayList<>();
} }
try (FileReader fileReader = new FileReader(SERVERS_CONTEXT_FILE); try (FileReader fileReader = new FileReader(SERVERS_FILE);
JsonReader jsonReader = new JsonReader(fileReader) JsonReader jsonReader = new JsonReader(fileReader)
) { ) {
return GSON.fromJson(jsonReader, new TypeToken<List<PIAServer>>() {}.getType()); return GSON.fromJson(jsonReader, new TypeToken<List<PIAServer>>() {}.getType());