context -> servers
All checks were successful
Sync PIA Servers / docker (17, 3.8.5) (push) Successful in 28s
All checks were successful
Sync PIA Servers / docker (17, 3.8.5) (push) Successful in 28s
This commit is contained in:
parent
e4874da7bd
commit
103a5e7364
@ -37,7 +37,7 @@ jobs:
|
||||
run: |
|
||||
git config --global user.email "braydonrainnny@gmail.com"
|
||||
git config --global user.name "Braydon"
|
||||
git add context.json
|
||||
git add servers.json
|
||||
git add README.md
|
||||
git commit -m "Scheduled update"
|
||||
git push https://Rainnny:${{ secrets.AUTH_TOKEN }}@git.rainnny.club/Rainnny/PIA-ServerList
|
166
README.md
166
README.md
@ -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)
|
||||
![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
|
||||
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
|
||||
| Region | Servers |
|
||||
|----------------------|---------|
|
||||
| CA Toronto | 66 |
|
||||
| US Texas | 66 |
|
||||
| Netherlands | 63 |
|
||||
| CA Vancouver | 62 |
|
||||
| US West | 62 |
|
||||
| US Seattle | 61 |
|
||||
| US New York | 61 |
|
||||
| DE Berlin | 60 |
|
||||
| US Silicon Valley | 60 |
|
||||
| US Florida | 59 |
|
||||
| US Las Vegas | 59 |
|
||||
| UK London | 59 |
|
||||
| AU Melbourne | 59 |
|
||||
| CA Ontario | 59 |
|
||||
| CA Montreal | 59 |
|
||||
| US Atlanta | 59 |
|
||||
| Switzerland | 58 |
|
||||
| US California | 58 |
|
||||
| US Chicago | 58 |
|
||||
| US Washington DC | 58 |
|
||||
| US East | 57 |
|
||||
| UK Manchester | 57 |
|
||||
| US Denver | 57 |
|
||||
| DE Frankfurt | 57 |
|
||||
| New Zealand | 57 |
|
||||
| US Houston | 55 |
|
||||
| AU Perth | 54 |
|
||||
| Japan | 53 |
|
||||
| Singapore | 53 |
|
||||
| UK Southampton | 53 |
|
||||
| AU Sydney | 53 |
|
||||
| France | 51 |
|
||||
| Sweden | 50 |
|
||||
| Norway | 49 |
|
||||
| Israel | 49 |
|
||||
| Ireland | 49 |
|
||||
| Czech Republic | 47 |
|
||||
| Estonia | 46 |
|
||||
| Spain | 46 |
|
||||
| Denmark | 46 |
|
||||
| Mexico | 44 |
|
||||
| Luxembourg | 43 |
|
||||
| Bahamas | 43 |
|
||||
| Italy | 42 |
|
||||
| Argentina | 42 |
|
||||
| Brazil | 42 |
|
||||
| Latvia | 42 |
|
||||
| Finland | 41 |
|
||||
| Panama | 40 |
|
||||
| Poland | 39 |
|
||||
| Venezuela | 39 |
|
||||
| Ukraine | 39 |
|
||||
| Austria | 39 |
|
||||
| Romania | 39 |
|
||||
| Andorra | 36 |
|
||||
| Turkey | 36 |
|
||||
| Slovakia | 36 |
|
||||
| Vietnam | 35 |
|
||||
| Lithuania | 35 |
|
||||
| Greece | 35 |
|
||||
| Greenland | 34 |
|
||||
| CA Toronto | 76 |
|
||||
| Netherlands | 75 |
|
||||
| US West | 74 |
|
||||
| US Texas | 74 |
|
||||
| US Seattle | 72 |
|
||||
| CA Vancouver | 71 |
|
||||
| US Silicon Valley | 71 |
|
||||
| CA Ontario | 71 |
|
||||
| CA Montreal | 71 |
|
||||
| DE Berlin | 70 |
|
||||
| US California | 70 |
|
||||
| UK London | 70 |
|
||||
| US New York | 69 |
|
||||
| US Chicago | 69 |
|
||||
| AU Melbourne | 69 |
|
||||
| US Florida | 68 |
|
||||
| US Las Vegas | 68 |
|
||||
| US Washington DC | 67 |
|
||||
| DE Frankfurt | 67 |
|
||||
| US East | 66 |
|
||||
| UK Manchester | 66 |
|
||||
| US Atlanta | 66 |
|
||||
| Switzerland | 65 |
|
||||
| New Zealand | 65 |
|
||||
| Singapore | 63 |
|
||||
| US Denver | 63 |
|
||||
| US Houston | 63 |
|
||||
| Japan | 62 |
|
||||
| France | 62 |
|
||||
| AU Sydney | 62 |
|
||||
| AU Perth | 61 |
|
||||
| UK Southampton | 59 |
|
||||
| Sweden | 58 |
|
||||
| Israel | 56 |
|
||||
| Norway | 55 |
|
||||
| Ireland | 54 |
|
||||
| Czech Republic | 53 |
|
||||
| Spain | 51 |
|
||||
| Brazil | 51 |
|
||||
| Denmark | 51 |
|
||||
| Estonia | 50 |
|
||||
| Mexico | 49 |
|
||||
| Bahamas | 47 |
|
||||
| Argentina | 47 |
|
||||
| Ukraine | 46 |
|
||||
| Italy | 46 |
|
||||
| Latvia | 46 |
|
||||
| Austria | 45 |
|
||||
| Luxembourg | 45 |
|
||||
| Finland | 45 |
|
||||
| Romania | 43 |
|
||||
| Panama | 42 |
|
||||
| Venezuela | 41 |
|
||||
| Poland | 40 |
|
||||
| Greenland | 40 |
|
||||
| Turkey | 39 |
|
||||
| Lithuania | 39 |
|
||||
| Greece | 39 |
|
||||
| Slovakia | 39 |
|
||||
| Vietnam | 38 |
|
||||
| Andorra | 37 |
|
||||
| Belgium | 35 |
|
||||
| Taiwan | 34 |
|
||||
| Algeria | 33 |
|
||||
| Belgium | 33 |
|
||||
| Taiwan | 32 |
|
||||
| China | 31 |
|
||||
| Albania | 29 |
|
||||
| United Arab Emirates | 29 |
|
||||
| Malta | 29 |
|
||||
| Qatar | 29 |
|
||||
| Bangladesh | 29 |
|
||||
| China | 32 |
|
||||
| Albania | 31 |
|
||||
| United Arab Emirates | 31 |
|
||||
| Malta | 31 |
|
||||
| Qatar | 31 |
|
||||
| Bangladesh | 30 |
|
||||
| Liechtenstein | 28 |
|
||||
| Isle OF Man | 26 |
|
||||
| Philippines | 27 |
|
||||
| Isle OF Man | 27 |
|
||||
| Hungary | 26 |
|
||||
| Bulgaria | 26 |
|
||||
| India | 26 |
|
||||
| South Africa | 26 |
|
||||
| Montenegro | 26 |
|
||||
| Saudi Arabia | 25 |
|
||||
| Philippines | 25 |
|
||||
| Bulgaria | 25 |
|
||||
| South Africa | 25 |
|
||||
| Hungary | 24 |
|
||||
| Macao | 24 |
|
||||
| Morocco | 24 |
|
||||
| India | 24 |
|
||||
| Moldova | 23 |
|
||||
| Nigeria | 23 |
|
||||
| Kazakhstan | 23 |
|
||||
| Egypt | 23 |
|
||||
| Iceland | 23 |
|
||||
| Portugal | 22 |
|
||||
| Monaco | 22 |
|
||||
| Macao | 22 |
|
||||
| Egypt | 22 |
|
||||
| Cyprus | 21 |
|
||||
| Moldova | 20 |
|
||||
| Cyprus | 22 |
|
||||
| Macedonia | 22 |
|
||||
| Georgia | 21 |
|
||||
| Cambodia | 20 |
|
||||
| Georgia | 20 |
|
||||
| Macedonia | 20 |
|
||||
| Hong Kong | 16 |
|
||||
| Serbia | 15 |
|
||||
| Armenia | 12 |
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -30,23 +30,23 @@ public final class PIAServerList {
|
||||
.setPrettyPrinting()
|
||||
.create();
|
||||
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
|
||||
public static void main(@NonNull String[] args) {
|
||||
Set<PIAServer> servers = getNewServers(); // Get the new servers from PIA
|
||||
int before = servers.size();
|
||||
servers.addAll(loadServersFromContext()); // Load servers from context
|
||||
System.out.println("Loaded " + (servers.size() - before) + " server(s) from the context file");
|
||||
servers.addAll(loadServersFromFile()); // Load servers from the 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
|
||||
before = servers.size();
|
||||
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");
|
||||
|
||||
// Write the servers to the context file
|
||||
System.out.println("Writing context file...");
|
||||
try (FileWriter fileWriter = new FileWriter(SERVERS_CONTEXT_FILE)) {
|
||||
// Write the servers to the servers file
|
||||
System.out.println("Writing servers file...");
|
||||
try (FileWriter fileWriter = new FileWriter(SERVERS_FILE)) {
|
||||
GSON.toJson(servers, fileWriter);
|
||||
}
|
||||
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
|
||||
*/
|
||||
@SneakyThrows
|
||||
private static List<PIAServer> loadServersFromContext() {
|
||||
if (!SERVERS_CONTEXT_FILE.exists()) { // No context file to load
|
||||
private static List<PIAServer> loadServersFromFile() {
|
||||
if (!SERVERS_FILE.exists()) { // No servers file to load
|
||||
return new ArrayList<>();
|
||||
}
|
||||
try (FileReader fileReader = new FileReader(SERVERS_CONTEXT_FILE);
|
||||
try (FileReader fileReader = new FileReader(SERVERS_FILE);
|
||||
JsonReader jsonReader = new JsonReader(fileReader)
|
||||
) {
|
||||
return GSON.fromJson(jsonReader, new TypeToken<List<PIAServer>>() {}.getType());
|
||||
|
Loading…
x
Reference in New Issue
Block a user