Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement IPv6 capability #826

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Conversation

itz-Jana
Copy link
Contributor

I've been wanting to start using linkding and installed it into my Kubernetes cluster, but couldn't access it.

My cluster runs only using IPv6 addresses and I noticed that the default configuration for uWSGI that is used in this project, defaults to binding only to an IPv4 socket and there is no config option to change this behaviour.

In the current year, with IPv4 addresses becoming more scarce and often an addon that needs to be paid extra, I think it's reasonable to change the default to also allow for IPv6 connections.

This does not break any existing configurations, as this creates a dual stack socket, which will respond to requests on both protocols (IPv4 addresses are displayed as IPv4-mapped IPv6 addresses and look like this: "::ffff:x.x.x.x".
Yet I have also provided a configuration option to change the behaviour, if a user were to desire it for whatever reason.

If you don't like changing the default, we could swap it back to 0.0.0.0 and only allow overwriting it, if desired, but as I have outlined I think changing the default is reasonable and doesn't harm existing setups.

I have tested these changes on my IPv6-only cluster, as well as on Docker Desktop on Windows with port mapping (which uses IPv4 addressing) and tried it on both the normal default and alpine image and it worked in all cases.

Enables uWSGI to listen for IPv6 requests also.
This is done by defaulting to [::] as the listen address, which creates a dual stack socket, which can respond to IPv4 and IPv6 requests simultaneously.
Furthermore a config option is adden to overwrite this default, if a user so desires.
Additionally fix the default name of the LD_SERVER_PORT variable, which was falsely LD_HOST_PORT here.
@sissbruecker
Copy link
Owner

Thanks, makes sense I guess. Seems to work fine for me. If people are having issues I might revert it, then we can try the alternative option-only approach you suggested.

@sissbruecker
Copy link
Owner

Reverted the changes to the env sample. LD_HOST_PORT was actually correct, it's the port that is bound on the host system, whereas LD_SERVER_PORT is the one that uwsgi runs on. This is customizable for container runtimes that use a shared port range. Also removed the new variable from the sample, people should rarely need to customize this, so no need to confuse people with that option.

@sissbruecker sissbruecker merged commit c22e30c into sissbruecker:master Sep 16, 2024
2 checks passed
truecharts-admin referenced this pull request in truecharts/public Sep 16, 2024
…95c21ae by renovate (#26529)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[sissbruecker/linkding](https://redirect.github.com/sissbruecker/linkding)
| minor | `1.33.0` -> `1.34.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>sissbruecker/linkding (sissbruecker/linkding)</summary>

###
[`v1.34.0`](https://redirect.github.com/sissbruecker/linkding/blob/HEAD/CHANGELOG.md#v1340-16092024)

[Compare
Source](https://redirect.github.com/sissbruecker/linkding/compare/v1.33.0...v1.34.0)

##### What's Changed

- Fix several issues around browser back navigation by
[@&#8203;sissbruecker](https://redirect.github.com/sissbruecker) in
[https://github.com/sissbruecker/linkding/pull/825](https://redirect.github.com/sissbruecker/linkding/pull/825)
- Speed up response times for certain actions by
[@&#8203;sissbruecker](https://redirect.github.com/sissbruecker) in
[https://github.com/sissbruecker/linkding/pull/829](https://redirect.github.com/sissbruecker/linkding/pull/829)
- Implement IPv6 capability by
[@&#8203;itz-Jana](https://redirect.github.com/itz-Jana) in
[https://github.com/sissbruecker/linkding/pull/826](https://redirect.github.com/sissbruecker/linkding/pull/826)

##### New Contributors

- [@&#8203;itz-Jana](https://redirect.github.com/itz-Jana) made their
first contribution in
[https://github.com/sissbruecker/linkding/pull/826](https://redirect.github.com/sissbruecker/linkding/pull/826)

**Full Changelog**:
sissbruecker/linkding@v1.33.0...v1.34.0

***

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MS4wIiwidXBkYXRlZEluVmVyIjoiMzguODEuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJhdXRvbWVyZ2UiLCJ1cGRhdGUvZG9ja2VyL2dlbmVyYWwvbm9uLW1ham9yIl19-->
spiceratops referenced this pull request in spiceratops/k8s-gitops Sep 16, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[sissbruecker/linkding](https://redirect.github.com/sissbruecker/linkding)
| minor | `1.33.0` -> `1.34.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>sissbruecker/linkding (sissbruecker/linkding)</summary>

###
[`v1.34.0`](https://redirect.github.com/sissbruecker/linkding/blob/HEAD/CHANGELOG.md#v1340-16092024)

[Compare
Source](https://redirect.github.com/sissbruecker/linkding/compare/v1.33.0...v1.34.0)

##### What's Changed

- Fix several issues around browser back navigation by
[@&#8203;sissbruecker](https://redirect.github.com/sissbruecker) in
[https://github.com/sissbruecker/linkding/pull/825](https://redirect.github.com/sissbruecker/linkding/pull/825)
- Speed up response times for certain actions by
[@&#8203;sissbruecker](https://redirect.github.com/sissbruecker) in
[https://github.com/sissbruecker/linkding/pull/829](https://redirect.github.com/sissbruecker/linkding/pull/829)
- Implement IPv6 capability by
[@&#8203;itz-Jana](https://redirect.github.com/itz-Jana) in
[https://github.com/sissbruecker/linkding/pull/826](https://redirect.github.com/sissbruecker/linkding/pull/826)

##### New Contributors

- [@&#8203;itz-Jana](https://redirect.github.com/itz-Jana) made their
first contribution in
[https://github.com/sissbruecker/linkding/pull/826](https://redirect.github.com/sissbruecker/linkding/pull/826)

**Full Changelog**:
sissbruecker/linkding@v1.33.0...v1.34.0

***

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MS4wIiwidXBkYXRlZEluVmVyIjoiMzguODEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUvY29udGFpbmVyIiwidHlwZS9taW5vciJdfQ==-->
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.

2 participants