@qevxo/ip-geo
v1.0.2
Published
Utility functions for IP location and proxy detection.
Maintainers
Readme
@qevxo/ip-geo
A simple utility package for IP geolocation and proxy detection.
Features
- Geolocation Lookup: Easily check the country of a given IP address.
- Proxy Detection: Determine if an IP address belongs to a proxy server.
Installation
You can install the @qevxo/ip-geo package via npm:
npm install @qevxo/ip-geo
Usage
const { from, isProxy } = require('@qevxo/ip-geo');
(async () => {
const ipAddress = '8.8.8.8'; // The IP address to check
// Check if the IP address is in the United States
const isInCountry = await from('US', ipAddress);
console.log(`Is IP ${ipAddress} in the United States? ${isInCountry}`);
// Check if the IP address is a proxy
const proxyStatus = await isProxy(ipAddress);
console.log(`Is IP ${ipAddress} a proxy? ${proxyStatus}`);
})();API Documentation
from(countryCode, ipAddress); // Returns a boolean indicating if the IP belongs to the specified country.
isProxy(ipAddress); // Returns a boolean indicating if the IP is a proxy.Contact Me
If you have any questions, feedback, or need support regarding the @qevxo/ip-geo package, feel free to reach out via the following method:
- Discord: Feel free to message me directly at Qevxo#4977
I aim to respond to inquiries within 48 hours.
