Encap.txt

From 44Net Wiki
Revision as of 17:35, 8 February 2020 by Ki4cuw (talk | contribs) (provide details on creating encap.txt from portal's json outside)
Jump to navigation Jump to search

The encap.txt file

The encap.txt file is a file listing all the AMPRNet gateways.

Originally formatted for JNOS systems, it is often parsed with a "munge script" to update Linux system routing tables.

The file can be obtained via the portal and private HTTP.

Portal

You can create an API key on the portal by visiting your profile page. Since it needs to be 32 characters I recommend using md5sum of any random data to generate it. The encap endpoint produces json format which you will need to format. You can then use the command line utilities curl and jq to turn this data into routes to ingest into about anything. For example for JNOS encap.txt format:

curl -s https://user:key@portal.ampr.org/api/v1/encap | jq -r '.[] | "route addprivate \(.network)/\(.maskLength) encap \(.gatewayIP)"'

HTTP

This is still available on private HTTP but it is deprecated and also removed from the anonymous FTP. 44net list members can find the details in the mailman Archive in this thread:

private gateway stats