mirror of
https://github.com/funkemunky/AntiVPN.git
synced 2026-06-06 03:42:20 +00:00
Implementing database and allowlist system
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package dev.brighten.antivpn.database;
|
||||
|
||||
import dev.brighten.antivpn.utils.VPNResponse;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public interface VPNDatabase {
|
||||
Optional<VPNResponse> getStoredResponse(String ip);
|
||||
|
||||
void cacheResponse(VPNResponse toCache);
|
||||
|
||||
boolean isWhitelisted(UUID uuid);
|
||||
|
||||
void setWhitelisted(UUID uuid, boolean whitelisted);
|
||||
|
||||
List<UUID> getAllWhitelisted();
|
||||
|
||||
void getStoredResponseAsync(String ip, Consumer<Optional<VPNResponse>> result);
|
||||
|
||||
void isWhitelistedAsync(UUID uuid, Consumer<Boolean> result);
|
||||
|
||||
void init();
|
||||
|
||||
void shutdown();
|
||||
}
|
||||
Reference in New Issue
Block a user