Update dependencies, enhance database handling, and improve request parsing

This commit is contained in:
skidoodle 2025-01-29 12:49:09 +01:00
parent bc9f481717
commit a36241f263
No known key found for this signature in database
7 changed files with 157 additions and 162 deletions

View file

@ -8,7 +8,6 @@
- **ASN Information**: Includes autonomous system number and organization.
- **Hostname Lookup**: Retrieves the hostname associated with the IP address.
- **Automatic Database Updates**: Keeps GeoIP databases up-to-date daily.
- **JSONP Support**: Allows JSONP responses for cross-domain requests.
## Example Endpoints
@ -39,33 +38,6 @@ $ curl https://ip.albert.lol/9.9.9.9/city
}
```
### Use JSONP callback function
```sh
$ curl https://test.albert.lol/9.9.9.9?callback=Quad9
/**/ typeof Quad9 === 'function' && Quad9({
"ip": "9.9.9.9",
"hostname": "dns9.quad9.net",
"asn": "19281",
"org": "QUAD9-AS-1",
"city": "Berkeley",
"region": "California",
"country": "United States",
"continent": "North America",
"timezone": "America/Los_Angeles",
"loc": "37.8767,-122.2676"
});
```
```html
<script>
let Quad9 = function(data) {
alert("Quad9's ASN is " + data.asn);
}
</script>
<script src="https://test.albert.lol/9.9.9.9?callback=Quad9"></script>
```
## Running Locally
### With Docker