Skip to content

Use X-API-Key in Gluetun client and remove non-existing WireGuard endpoints#53

Open
Rehpotsirhc-z wants to merge 1 commit into
Shoshuo:mainfrom
Rehpotsirhc-z:fix/gluetun-api-key-and-endpoints
Open

Use X-API-Key in Gluetun client and remove non-existing WireGuard endpoints#53
Rehpotsirhc-z wants to merge 1 commit into
Shoshuo:mainfrom
Rehpotsirhc-z:fix/gluetun-api-key-and-endpoints

Conversation

@Rehpotsirhc-z

Copy link
Copy Markdown

What does this PR do?

The Gluetun client authenticated with Authorization: Bearer <key>, but Gluetun reads the API key from the X-API-Key header. Thus, the VPN card only worked when there was no key.

Also removed the /v1/wireguard/status and /v1/wireguard/portforwarded endpoints, which do not exist. The WireGuard and OpenVPN were both underneath the /v1/openvpn endpoint in the older versions. Since they were both under one endpoint anyway, the protocol selector is redundant and was removed.

Type of change

Definition of Done checklist

See CONTRIBUTING.md for the full list.

  • The feature works end-to-end, tested manually in a running container
  • No console.log, dd(), var_dump, TODO, FIXME leftover
  • Comments are in English
  • Zero credentials in code, commits, logs, or docs
  • At least one unit test for new business logic (N/A)
  • If this is a bug fix: a regression test that reproduces the bug is included
  • make check passes locally
  • If an entity was modified: a new migration is committed (N/A)
  • CHANGELOG.md updated under [Unreleased]
  • README.md updated if user-facing behaviour changed (N/A)

Notes for the reviewer

  • Sorry if the test file is bad.
  • I tested manually on the latest Gluetun container, but not on any older versions.

The Gluetun client authenticated with `Authorization: Bearer <key>`, but
Gluetun reads the API key from the `X-API-Key` header. Thus the VPN card
only worked when there was no key.

Removed the `/v1/wireguard/status` and `/v1/wireguard/portforwarded`
endpoints, which do not exist. The now-redundant Gluetun protocol
selector is removed from the setup wizard and settings page.
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.

1 participant