Terms of Service
Welcome to VelocityLayer! These Terms of Service ("Terms") govern your access to and use of the VelocityLayer website and services ("Services"). By accessing or using our Services, you agree to be bound by these Terms.
1. Acceptance of Terms
By accessing or using our Services, you agree to comply with these Terms and all applicable laws and regulations. If you do not agree with these Terms, you may not access or use our Services.
2. Use of Services
You must be at least 13 years old to use our Services. By accessing or using our Services, you represent and warrant that you are at least 13 years old.
You agree to use our Services only for lawful purposes and in accordance with these Terms. You may not use our Services in any way that violates any applicable laws or regulations.
3. Intellectual Property
All content and materials available on our Services, including but not limited to text, graphics, logos, icons, images, audio clips, and software, are the property of VelocityLayer or its licensors and are protected by copyright, trademark, and other intellectual property laws.
You may not reproduce, modify, distribute, display, perform, or otherwise use any content or materials from our Services without the prior written consent of VelocityLayer.
4. User Content
You may have the opportunity to submit or post content, such as comments or feedback, on our Services. By submitting or posting any content, you grant VelocityLayer a non-exclusive, royalty-free, perpetual, irrevocable, and fully sublicensable right to use, reproduce, modify, adapt, publish, translate, create derivative works from, distribute, and display such content throughout the world in any media.
You represent and warrant that you have the necessary rights and permissions to submit or post any content on our Services and that such content does not violate any third party rights or applicable laws.
5. Limitation of Liability
To the fullest extent permitted by law, VelocityLayer shall not be liable for any indirect, incidental, special, consequential, or punitive damages, including but not limited to loss of profits, revenue, data, or goodwill, arising out of or in connection with your use of our Services.
6. Indemnification
You agree to indemnify, defend, and hold harmless VelocityLayer and its officers, directors, employees, and agents from and against any and all claims, liabilities, damages, losses, costs, expenses, or fees (including reasonable attorneys' fees) arising out of or in connection with your use of our Services or your violation of these Terms.
7. Modification of Terms
VelocityLayer reserves the right to modify or revise these Terms at any time, and such modifications or revisions will be effective immediately upon posting on our Services. Your continued use of our Services after any such modifications or revisions constitutes your acceptance of the updated Terms.
8. Governing Law
These Terms shall be governed by and construed in accordance with the laws of [Your Jurisdiction], without regard to its conflict of law principles.
9. Contact Us
If you have any questions or concerns about these Terms, please contact us at contact@velocitylayer.com.
Privacy Policy
At VelocityLayer, we prioritize the security and privacy of our users. This Privacy Policy outlines how we collect, use, and protect your personal information when you use our services.
Information We Collect
We may collect personal information, such as your name, email address, and contact details, when you interact with our website or use our services. We may also gather non-personal information, such as browser type, IP address, and usage data, to improve our services and analyze trends.
How We Use Your Information
We use the information we collect to provide and improve our services, communicate with you, and personalize your experience. We may also use your information to analyze usage patterns, detect and prevent fraudulent activities, and comply with legal obligations.
Data Security
We take data security seriously and implement measures to protect your information from unauthorized access, disclosure, alteration, or destruction. However, no method of transmission over the internet or electronic storage is 100% secure, and we cannot guarantee absolute security.
Sharing of Information
We do not sell, trade, or rent your personal information to third parties without your consent. We may share your information with trusted third-party service providers who assist us in operating our website, conducting our business, or servicing you, as long as those parties agree to keep this information confidential.
Your Choices
You have the right to access, update, or delete your personal information at any time. You may also opt out of receiving promotional communications from us by following the instructions provided in the communication.
Changes to This Privacy Policy
We reserve the right to update or modify this Privacy Policy at any time. Any changes will be effective immediately upon posting the revised policy on this page.
Contact Us
If you have any questions or concerns about this Privacy Policy or our data practices, please contact us at contact@velocitylayer.com.
API Documentation
POST v.velocitylayer.com/api/v2/checkIP
DescriptionThis endpoint allows you to check the verification status of a given IP address.
Headers:
{"Content-Type": "application/json"}
Body:
{"iphash": "MD5_hash"}
IP
(required): The IP hash address to check.
ResponseContent-Type: application/json
Body:
{"v": true}
v
(boolean): Indicates whether the user has verified (true
) or not (false
).
API ExampleRequest
POST /api/v2/checkIP HTTP/1.1
Host: v.velocitylayer.com
Content-Type: application/json
{
"iphash": "f528764d624db129b32c21fbca0cb8d6"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"v": true
}
Java Code Example
...
private final Set verifiedPlayers = ConcurrentHashMap.newKeySet();
private final Set notVerifiedPlayers = ConcurrentHashMap.newKeySet();
...
scheduler.scheduleAtFixedRate(notVerifiedPlayers::clear, 0, 30, TimeUnit.SECONDS);
...
private static String VERIFY_KICK_MSG = "Please verify your account at v.velocitylayer.com";
...
private void verifyPlayerIP(String ipHash, AsyncPlayerPreLoginEvent event) {
// If player IP is already verified, return
if (verifiedPlayers.contains(ipHash)) {
return;
}
// If player IP is not verified, kick the player with a message
if (notVerifiedPlayers.contains(ipHash)) {
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, VERIFY_KICK_MSG);
return;
}
try {
// Create connection to VelocityLayer API
HttpURLConnection connection = (HttpURLConnection) new URL(VERIFY_URL).openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "application/json");
connection.setDoOutput(true);
// Send IP hash to the API
try (DataOutputStream wr = new DataOutputStream(connection.getOutputStream())) {
wr.writeBytes("{\"iphash\": \"" + ipHash + "\"}");
}
// Get response from the API
int responseCode = connection.getResponseCode();
StringBuilder response = new StringBuilder();
try (BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
String inputLine;
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
}
// Parse JSON response
JsonObject jsonResponse = JsonParser.parseString(response.toString()).getAsJsonObject();
boolean playerVerifyBool = jsonResponse.get("v").getAsBoolean();
// If player is verified, add IP to verified players list
if (playerVerifyBool) {
verifiedPlayers.add(ipHash);
} else {
// If player is not verified, add IP to not verified players list and kick the player
notVerifiedPlayers.add(ipHash);
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, VERIFY_KICK_MSG);
}
} catch (Exception e) {
// Handle exceptions
plugin.getLogger().severe("[*] Failed to communicate with VelocityLayer API, Not accepting new connections.");
e.printStackTrace();
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, "[VelocityLayer] Internal API error has occurred, new connections are not possible at the moment, please try again later.");
}
}
@EventHandler
public void onAsyncPreLogin(AsyncPlayerPreLoginEvent event) {
String playerIp = event.getAddress().getHostAddress();
// Check if player IP needs verification
if (!verifiedPlayers.containsKey(playerIp)) {
verifyPlayerIP(md5Hash(playerIp), event);
return;
}
}
private String md5Hash(String input) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] messageDigest = md.digest(input.getBytes());
StringBuilder hexString = new StringBuilder();
for (byte b : messageDigest) {
String hex = Integer.toHexString(0xff & b);
if (hex.length() == 1) hexString.append('0');
hexString.append(hex);
}
return hexString.toString();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return null;
}
}
Status Codes- 200 OK: The request was successful, and the verification status is returned in the response.
- 400 Bad Request: The request body is missing or invalid.
- 500 Internal Server Error: An unexpected error occurred on the server.