This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
* Worker Function for ASN prefix parsing | |
* Will query the BigIP API for a given ASN and return a plain-text representation of the ASN prefixes | |
* (IP ranges) that can be used in either OPNsense or pfSense URL Tables (Firewall alias). | |
* | |
* See https://docs.opnsense.org/manual/aliases.html (OPNsense) and https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html (pfSense) for details of their use. | |
* | |
* You can deploy this worker for example on the free tier of CloudFlare (Up to 100'000 requests a day) or | |
* any other serverless platform that supports JavaScript | |
* |