Simple tool that does the following steps:
- Clones the specified git repo.
- Downloads the latest OUI database from
http://standards-oui.ieee.org/oui/oui.txt. - Parses and converts it to JSON.
- If anything changed compared to what is already in the repo, it commits and pushes:
ouidb.json— the parsed JSON (plusouidb.json.gzandouidb.json.bz2).oui.txt— the raw IEEE file verbatim, so the repo also acts as a mirror (plusoui.txt.gzandoui.txt.bz2).
Parameters can be passed as CLI flags or as environment variables (dashes become underscores,
e.g. -repo-url → REPO_URL).
| Parameter | Env var | Required | Description |
|---|---|---|---|
-data |
DATA |
yes | Local folder for the git working copy |
-repo-url |
REPO_URL |
yes | Remote git repository URI |
-repo-username |
REPO_USERNAME |
no | Git username (on GitHub, the token goes here) |
-repo-password |
REPO_PASSWORD |
no | Git password / token |
-git-author-name |
GIT_AUTHOR_NAME |
no | Commit author name |
-git-author-email |
GIT_AUTHOR_EMAIL |
no | Commit author email |
java -jar ouidb-to-json-publisher-jar-with-dependencies.jar \
-data /path/to/data-folder \
-repo-url https://github.com/jfisbein/ouidb-json \
-repo-username {YOUR_GITHUB_USER_TOKEN}
docker run \
-e "REPO_URL=https://github.com/jfisbein/ouidb-json" \
-e "REPO_USERNAME={YOUR_GITHUB_USER_TOKEN}" \
jfisbein/ouidb-to-json-publisher
note: on GitHub, when using a GitHub user token, you don't have to set the password.
standards-oui.ieee.org sits behind an anti-bot WAF that drops connections from datacenter /
cloud IP ranges (you get ConnectException / ClosedChannelException, not an HTTP error). This
makes the download fail intermittently from CI runners such as GitHub Actions.
To cope with this:
- The downloader sends browser-like headers and retries up to 5 times with exponential backoff
plus connect/request timeouts (see
OUIDBDownloader). This handles momentary blips but cannot defeat a sustained IP-level block — the connection never reaches the HTTP layer. - Therefore the scheduled publisher should run from a host whose IP the WAF does not block
(e.g. a home/residential or otherwise "clean" server), not from GitHub-hosted runners. The
published
oui.txtmirror in the output repo also gives downstream consumers a reliable, WAF-free source.