← 输入框|github.com|刷新
Skip to content

reqs: preserve IPv6 authorities and upstream authentication - #641

Open
omrzk wants to merge 1 commit into
tinyproxy:masterfrom
omrzk:fix/ipv6-upstream-requests
Open

omrzk wants to merge 1 commit into
tinyproxy:masterfrom
omrzk:fix/ipv6-upstream-requests

Conversation

@omrzk

@omrzk omrzk commented Oct 19, 2026

Copy link
Copy Markdown

Closes #408.

Format IPv6 literals with brackets in upstream HTTP URLs and CONNECT targets, using the same host formatting for the Host header. The IPv6 header path also bypassed upstream authentication; use the shared header path so configured Proxy-Authorization is sent for IPv6 destinations too.

Extend the existing loopback network tests to inspect requests echoed by the upstream: GET and CONNECT, authentication present/absent, default and non-default ports, long mixed IPv6/IPv4 literals, and IPv4/hostname controls. The initial regression cases fail on the original code and pass with the fix.

Validation:

  • ./autogen.sh --disable-manpage and make -j2 passed.
  • make test passed: 10 existing requests and 10 new upstream cases, zero errors.
  • make shellcheck, sh -n tests/scripts/run_tests.sh, and git diff --check passed.

Manpage/web documentation builds and Valgrind were not run locally.

Fixes tinyproxy#408. Format IPv6 literals consistently in upstream request targets and Host headers, and use the authentication path for IPv6 destinations too.
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.

Literal IPv6 addresses do not work with upstream HTTP proxies

1 participant