Skip to content

Match snikket-server default for internal http#29

Open
Zash wants to merge 1 commit into
mainfrom
internal_localhost
Open

Match snikket-server default for internal http#29
Zash wants to merge 1 commit into
mainfrom
internal_localhost

Conversation

@Zash
Copy link
Copy Markdown
Contributor

@Zash Zash commented Mar 2, 2026

Snikket-Server currently defaults to 127.0.0.1, without ::1.

The proxy defaulting to 'localhost' means it has to resolve that name, which would give it both 127.0.0.1 and ::1 in many environments from this century. That lookup and failed attempt to connect to ::1 adds latency and errors to the log.

Example error:

[error] 16#16: *1 connect() failed (111: Connection refused) while connecting to upstream, client: ::1, server: chat.example.org, request: "GET /login HTTP/1.1", upstream: "http://[::1]:5765/login", host: "chat.example.org"

Some alternative ways this could be fixed:

  • Somehow support specifying multiple interfaces.
  • Add a way to mark a service as 'private' in Prosody

Snikket-Server currently defaults to 127.0.0.1, without ::1.

The proxy defaulting to 'localhost' means it has to resolve that name,
which would give it both 127.0.0.1 and ::1 in many environments from
this century. That lookup and failed attempt to connect to ::1 adds
latency and errors to the log.

Example error:

[error] 16#16: *1 connect() failed (111: Connection refused) while
connecting to upstream, client: ::1, server: chat.example.org, request:
"GET /login HTTP/1.1", upstream: "http://[::1]:5765/login", host:
"chat.example.org"

Some alternative ways this could be fixed:
- Somehow support specifying multiple interfaces.
- Add a way to mark a service as 'private' in Prosody
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