Skip to content

Add HTTP(S) proxy support for OUI file download#4142

Open
adobloug wants to merge 1 commit into
Uninett:masterfrom
adobloug:feature/oui-download-proxy
Open

Add HTTP(S) proxy support for OUI file download#4142
adobloug wants to merge 1 commit into
Uninett:masterfrom
adobloug:feature/oui-download-proxy

Conversation

@adobloug

Copy link
Copy Markdown

Scope and purpose

Fixes #4141.

NAV installations behind a firewall with no direct outbound internet access could not download the IEEE OUI file, causing navoui to fail with [Errno 113] No route to host.

This PR adds an OuiConfig parser reading a new update_ouis.conf. When its [oui] proxy option is set, navoui routes the download through that HTTP(S) proxy. The option is empty by default, so direct connections are unaffected. The config file lives in NAV's config directory and survives upgrades, unlike proxy settings placed in the regenerated navoui cron entry.

This pull request

  • changes the database — no
  • changes the API — no
  • adds/changes/removes a dependency — no

To try it, set in /etc/nav/update_ouis.conf:

[oui]
proxy = http://proxy.example.org:3128

then run navoui; the download goes through the proxy.

Contributor Checklist

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation — config file is self-documenting; no separate docs page for navoui config
  • Linted/formatted the code with ruff
  • Wrote the commit message per https://cbea.ms/git-commit/
  • Based this pull request on the correct upstream branch (master, new feature)
  • Created new issues if this PR does not fix the issue completely — N/A, fully fixes
  • Described how to interact with NAV to observe the effects
  • Screenshots — N/A, no UI changes
  • Boilerplate header on new Python file — N/A, test module follows existing test convention (docstring only)

NAV installations behind a firewall with no direct outbound access could
not download the IEEE OUI file, causing navoui to fail with a "No route
to host" error.

Add an OuiConfig parser reading a new update_ouis.conf. When its [oui]
proxy option is set, navoui routes the download through that proxy. The
option is empty by default, so direct connections are unaffected.

The config file lives in NAV's config directory and survives upgrades,
unlike proxy settings placed in the regenerated navoui cron entry.

Fixes Uninett#4141

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support HTTP(S) proxy for OUI file download in navoui

2 participants