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(daemon): webui URL when RPC listener is 0.0.0.0 #10520

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

lidel
Copy link
Member

@lidel lidel commented Sep 18, 2024

Closes #10515

Before

$ ipfs daemon
Initializing daemon...
...
RPC API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui

After

$ ipfs daemon
Initializing daemon...
...
RPC API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://127.0.0.1:5001/webui

@lidel lidel added the skip/changelog This change does NOT require a changelog entry label Sep 18, 2024
@lidel lidel changed the title fix(daemon): webui URL when rpc is catch-all fix(daemon): webui URL when RPC listener is 0.0.0.0 Sep 18, 2024
@lidel lidel marked this pull request as ready for review September 18, 2024 15:44
@lidel lidel requested a review from a team as a code owner September 18, 2024 15:44
// https://github.com/ipfs/kubo/issues/10515
if strings.Contains(rpc, "0.0.0.0:") {
rpc = strings.Replace(rpc, "0.0.0.0:", "127.0.0.1:", 1)
} else if strings.Contains(rpc, "[::]:") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be done in a separate case "tcp6":?

Copy link
Member Author

Choose a reason for hiding this comment

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

probably not worth refactoring, this only executes once on daemon start

@lidel lidel merged commit 6305932 into master Oct 3, 2024
18 checks passed
@lidel lidel deleted the fix/webui-url-daemon-stdout branch October 3, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does NOT require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not connect to the IPFS API from WebUI at http://0.0.0.0:5001/webui
2 participants