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

fix: Allow binding IPv6 addresses for web #650

Merged
merged 2 commits into from
Jan 14, 2024

Conversation

n-thumann
Copy link
Contributor

Summary

This PR fixes #532.

According to https://docs.gofiber.io/api/fiber#config, Fiber listens on IPv4-only by default. This is the reason why no IPv6 addresses can be bound.

This PR changes the Network from NetworkTCP4 to NetworkTCP, allowing both IPv4 and IPv6 (see https://pkg.go.dev/net#Listen).
Binding to the unspecified IPv4 or IPv6 address (0.0.0.0 or [::]) will make it listen on both IPv4 and IPv6. Binding a specific IPv4 or IPv6 address will make it listen on that specific address only.

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f76be6d) 78.49% compared to head (71a854a) 78.49%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #650   +/-   ##
=======================================
  Coverage   78.49%   78.49%           
=======================================
  Files          58       58           
  Lines        4705     4705           
=======================================
  Hits         3693     3693           
  Misses        827      827           
  Partials      185      185           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TwiN TwiN merged commit 9119023 into TwiN:master Jan 14, 2024
2 checks passed
@TwiN
Copy link
Owner

TwiN commented Jan 14, 2024

@n-thumann Thank you for your contribution!

github-merge-queue bot pushed a commit to chezmoi-sh/atlas that referenced this pull request Mar 23, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [TwiN/gatus](https://togithub.com/TwiN/gatus) | minor | `v5.7.0` ->
`v5.8.0` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/TwiN/gatus/badge)](https://securityscorecards.dev/viewer/?uri=github.com/TwiN/gatus)
|

---

### Release Notes

<details>
<summary>TwiN/gatus (TwiN/gatus)</summary>

### [`v5.8.0`](https://togithub.com/TwiN/gatus/releases/tag/v5.8.0)

[Compare
Source](https://togithub.com/TwiN/gatus/compare/v5.7.0...v5.8.0)

##### What's Changed

- feat(client): Add Google's Identity-Aware-Proxy in client config by
[@&#8203;Kloox](https://togithub.com/Kloox) in
[TwiN/gatus#600
- feat(client): Add client network configuration for ICMP endpoint
clients by [@&#8203;n-thumann](https://togithub.com/n-thumann) in
[TwiN/gatus#661
- feat(http): enhance HTTP client configuration with proxy support by
[@&#8203;appleboy](https://togithub.com/appleboy) in
[TwiN/gatus#668
- feat: add ability to delay startup by
[@&#8203;vax-r](https://togithub.com/vax-r) in
[TwiN/gatus#631
- feat: shields.io endpoint badge by
[@&#8203;buroa](https://togithub.com/buroa) in
[TwiN/gatus#652
- fix(web): Allow configuration of read-buffer-size by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[TwiN/gatus#675
- fix: Allow binding IPv6 addresses for web by
[@&#8203;n-thumann](https://togithub.com/n-thumann) in
[TwiN/gatus#650
- build: refine Makefile targets and build command by
[@&#8203;appleboy](https://togithub.com/appleboy) in
[TwiN/gatus#666
- refactor(alerting): Use pointer for receiver in
AlertProvider.GetDefaultAlert method by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[TwiN/gatus#676
- docs(alerting): Fix wrong gitlab terminology (alert key vs. PAT) by
[@&#8203;salim-b](https://togithub.com/salim-b) in
[TwiN/gatus#694
- chore(deps): bump actions/setup-go from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#634
- chore(deps): bump golang.org/x/crypto from 0.14.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#649
- chore(deps): bump modernc.org/sqlite from 1.26.0 to 1.28.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#654
- chore(deps): bump codecov/codecov-action from 3.1.4 to 3.1.6 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#669
- chore(deps): bump codecov/codecov-action from 3.1.6 to 4.0.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#671
- chore(deps): bump github.com/prometheus/client_golang from 1.17.0 to
1.18.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#658
- chore(deps): bump github.com/gofiber/fiber/v2 from 2.49.2 to 2.52.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#682
- chore(deps): bump github.com/TwiN/deepmerge from 0.2.0 to 0.2.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#684
- chore(deps): bump golang.org/x/oauth2 from 0.13.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#701

##### New Contributors

- [@&#8203;Kloox](https://togithub.com/Kloox) made their first
contribution in
[TwiN/gatus#600
- [@&#8203;n-thumann](https://togithub.com/n-thumann) made their first
contribution in
[TwiN/gatus#650
- [@&#8203;buroa](https://togithub.com/buroa) made their first
contribution in
[TwiN/gatus#652

**Full Changelog**:
TwiN/gatus@v5.7.0...v5.8.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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/nex.rpi).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI2MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
xunleii pushed a commit to chezmoi-sh/atlas that referenced this pull request May 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [TwiN/gatus](https://togithub.com/TwiN/gatus) | minor | `v5.7.0` ->
`v5.8.0` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/TwiN/gatus/badge)](https://securityscorecards.dev/viewer/?uri=github.com/TwiN/gatus)
|

---

### Release Notes

<details>
<summary>TwiN/gatus (TwiN/gatus)</summary>

### [`v5.8.0`](https://togithub.com/TwiN/gatus/releases/tag/v5.8.0)

[Compare
Source](https://togithub.com/TwiN/gatus/compare/v5.7.0...v5.8.0)

##### What's Changed

- feat(client): Add Google's Identity-Aware-Proxy in client config by
[@&#8203;Kloox](https://togithub.com/Kloox) in
[TwiN/gatus#600
- feat(client): Add client network configuration for ICMP endpoint
clients by [@&#8203;n-thumann](https://togithub.com/n-thumann) in
[TwiN/gatus#661
- feat(http): enhance HTTP client configuration with proxy support by
[@&#8203;appleboy](https://togithub.com/appleboy) in
[TwiN/gatus#668
- feat: add ability to delay startup by
[@&#8203;vax-r](https://togithub.com/vax-r) in
[TwiN/gatus#631
- feat: shields.io endpoint badge by
[@&#8203;buroa](https://togithub.com/buroa) in
[TwiN/gatus#652
- fix(web): Allow configuration of read-buffer-size by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[TwiN/gatus#675
- fix: Allow binding IPv6 addresses for web by
[@&#8203;n-thumann](https://togithub.com/n-thumann) in
[TwiN/gatus#650
- build: refine Makefile targets and build command by
[@&#8203;appleboy](https://togithub.com/appleboy) in
[TwiN/gatus#666
- refactor(alerting): Use pointer for receiver in
AlertProvider.GetDefaultAlert method by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[TwiN/gatus#676
- docs(alerting): Fix wrong gitlab terminology (alert key vs. PAT) by
[@&#8203;salim-b](https://togithub.com/salim-b) in
[TwiN/gatus#694
- chore(deps): bump actions/setup-go from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#634
- chore(deps): bump golang.org/x/crypto from 0.14.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#649
- chore(deps): bump modernc.org/sqlite from 1.26.0 to 1.28.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#654
- chore(deps): bump codecov/codecov-action from 3.1.4 to 3.1.6 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#669
- chore(deps): bump codecov/codecov-action from 3.1.6 to 4.0.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#671
- chore(deps): bump github.com/prometheus/client_golang from 1.17.0 to
1.18.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#658
- chore(deps): bump github.com/gofiber/fiber/v2 from 2.49.2 to 2.52.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#682
- chore(deps): bump github.com/TwiN/deepmerge from 0.2.0 to 0.2.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#684
- chore(deps): bump golang.org/x/oauth2 from 0.13.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#701

##### New Contributors

- [@&#8203;Kloox](https://togithub.com/Kloox) made their first
contribution in
[TwiN/gatus#600
- [@&#8203;n-thumann](https://togithub.com/n-thumann) made their first
contribution in
[TwiN/gatus#650
- [@&#8203;buroa](https://togithub.com/buroa) made their first
contribution in
[TwiN/gatus#652

**Full Changelog**:
TwiN/gatus@v5.7.0...v5.8.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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/nex.rpi).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI2MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
xunleii pushed a commit to chezmoi-sh/atlas that referenced this pull request May 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [TwiN/gatus](https://togithub.com/TwiN/gatus) | minor | `v5.7.0` ->
`v5.8.0` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/TwiN/gatus/badge)](https://securityscorecards.dev/viewer/?uri=github.com/TwiN/gatus)
|

---

### Release Notes

<details>
<summary>TwiN/gatus (TwiN/gatus)</summary>

### [`v5.8.0`](https://togithub.com/TwiN/gatus/releases/tag/v5.8.0)

[Compare
Source](https://togithub.com/TwiN/gatus/compare/v5.7.0...v5.8.0)

##### What's Changed

- feat(client): Add Google's Identity-Aware-Proxy in client config by
[@&#8203;Kloox](https://togithub.com/Kloox) in
[TwiN/gatus#600
- feat(client): Add client network configuration for ICMP endpoint
clients by [@&#8203;n-thumann](https://togithub.com/n-thumann) in
[TwiN/gatus#661
- feat(http): enhance HTTP client configuration with proxy support by
[@&#8203;appleboy](https://togithub.com/appleboy) in
[TwiN/gatus#668
- feat: add ability to delay startup by
[@&#8203;vax-r](https://togithub.com/vax-r) in
[TwiN/gatus#631
- feat: shields.io endpoint badge by
[@&#8203;buroa](https://togithub.com/buroa) in
[TwiN/gatus#652
- fix(web): Allow configuration of read-buffer-size by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[TwiN/gatus#675
- fix: Allow binding IPv6 addresses for web by
[@&#8203;n-thumann](https://togithub.com/n-thumann) in
[TwiN/gatus#650
- build: refine Makefile targets and build command by
[@&#8203;appleboy](https://togithub.com/appleboy) in
[TwiN/gatus#666
- refactor(alerting): Use pointer for receiver in
AlertProvider.GetDefaultAlert method by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[TwiN/gatus#676
- docs(alerting): Fix wrong gitlab terminology (alert key vs. PAT) by
[@&#8203;salim-b](https://togithub.com/salim-b) in
[TwiN/gatus#694
- chore(deps): bump actions/setup-go from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#634
- chore(deps): bump golang.org/x/crypto from 0.14.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#649
- chore(deps): bump modernc.org/sqlite from 1.26.0 to 1.28.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#654
- chore(deps): bump codecov/codecov-action from 3.1.4 to 3.1.6 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#669
- chore(deps): bump codecov/codecov-action from 3.1.6 to 4.0.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#671
- chore(deps): bump github.com/prometheus/client_golang from 1.17.0 to
1.18.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#658
- chore(deps): bump github.com/gofiber/fiber/v2 from 2.49.2 to 2.52.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#682
- chore(deps): bump github.com/TwiN/deepmerge from 0.2.0 to 0.2.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#684
- chore(deps): bump golang.org/x/oauth2 from 0.13.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#701

##### New Contributors

- [@&#8203;Kloox](https://togithub.com/Kloox) made their first
contribution in
[TwiN/gatus#600
- [@&#8203;n-thumann](https://togithub.com/n-thumann) made their first
contribution in
[TwiN/gatus#650
- [@&#8203;buroa](https://togithub.com/buroa) made their first
contribution in
[TwiN/gatus#652

**Full Changelog**:
TwiN/gatus@v5.7.0...v5.8.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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/nex.rpi).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI2MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
xunleii pushed a commit to chezmoi-sh/atlas that referenced this pull request May 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [TwiN/gatus](https://togithub.com/TwiN/gatus) | minor | `v5.7.0` ->
`v5.8.0` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/TwiN/gatus/badge)](https://securityscorecards.dev/viewer/?uri=github.com/TwiN/gatus)
|

---

### Release Notes

<details>
<summary>TwiN/gatus (TwiN/gatus)</summary>

### [`v5.8.0`](https://togithub.com/TwiN/gatus/releases/tag/v5.8.0)

[Compare
Source](https://togithub.com/TwiN/gatus/compare/v5.7.0...v5.8.0)

##### What's Changed

- feat(client): Add Google's Identity-Aware-Proxy in client config by
[@&#8203;Kloox](https://togithub.com/Kloox) in
[TwiN/gatus#600
- feat(client): Add client network configuration for ICMP endpoint
clients by [@&#8203;n-thumann](https://togithub.com/n-thumann) in
[TwiN/gatus#661
- feat(http): enhance HTTP client configuration with proxy support by
[@&#8203;appleboy](https://togithub.com/appleboy) in
[TwiN/gatus#668
- feat: add ability to delay startup by
[@&#8203;vax-r](https://togithub.com/vax-r) in
[TwiN/gatus#631
- feat: shields.io endpoint badge by
[@&#8203;buroa](https://togithub.com/buroa) in
[TwiN/gatus#652
- fix(web): Allow configuration of read-buffer-size by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[TwiN/gatus#675
- fix: Allow binding IPv6 addresses for web by
[@&#8203;n-thumann](https://togithub.com/n-thumann) in
[TwiN/gatus#650
- build: refine Makefile targets and build command by
[@&#8203;appleboy](https://togithub.com/appleboy) in
[TwiN/gatus#666
- refactor(alerting): Use pointer for receiver in
AlertProvider.GetDefaultAlert method by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[TwiN/gatus#676
- docs(alerting): Fix wrong gitlab terminology (alert key vs. PAT) by
[@&#8203;salim-b](https://togithub.com/salim-b) in
[TwiN/gatus#694
- chore(deps): bump actions/setup-go from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#634
- chore(deps): bump golang.org/x/crypto from 0.14.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#649
- chore(deps): bump modernc.org/sqlite from 1.26.0 to 1.28.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#654
- chore(deps): bump codecov/codecov-action from 3.1.4 to 3.1.6 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#669
- chore(deps): bump codecov/codecov-action from 3.1.6 to 4.0.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#671
- chore(deps): bump github.com/prometheus/client_golang from 1.17.0 to
1.18.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#658
- chore(deps): bump github.com/gofiber/fiber/v2 from 2.49.2 to 2.52.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#682
- chore(deps): bump github.com/TwiN/deepmerge from 0.2.0 to 0.2.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#684
- chore(deps): bump golang.org/x/oauth2 from 0.13.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[TwiN/gatus#701

##### New Contributors

- [@&#8203;Kloox](https://togithub.com/Kloox) made their first
contribution in
[TwiN/gatus#600
- [@&#8203;n-thumann](https://togithub.com/n-thumann) made their first
contribution in
[TwiN/gatus#650
- [@&#8203;buroa](https://togithub.com/buroa) made their first
contribution in
[TwiN/gatus#652

**Full Changelog**:
TwiN/gatus@v5.7.0...v5.8.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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/nex.rpi).

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

Binding to IPv6 fails or binds to the wrong address
3 participants