get-real-client-ip
v1.0.0
Published
This package will get a real client ip address when access by browser or to server
Downloads
8
Maintainers
Readme
THIS PACKAGE IS NOT USED FOR COMMERCIAL PURPOSE
Usage:
Case 1:
When using inCommonJS (Node environment)
(async function () {
return await (await import('get-real-client-ip')).getClientInformation();
})();
Case 2:
When using inESM
import { getClientInformation } from 'get-real-client-ip'
getClientInformation()
.then(ip => console.log(ip))
.catch(e => console.error(e))
Result:
{
"ip": "x.x.x.x",
"registry": "<registry-name>",
"countrycode": "DE",
"countryname": "Germany",
"asn": {
"code": "X",
"name": "<isp-name>",
"route": "X.X.X.X/24",
"start": "X.X.X.X",
"end": "X.X.X.X",
"count": "X"
},
"spam": false,
"tor": false
}