Skip to content

fix(android): manual gateway entry for IPv6 hosts#63838

Closed
MayankSharma-ops wants to merge 2 commits into
openclaw:mainfrom
MayankSharma-ops:fix/ipv6-manual-gateway-v2
Closed

fix(android): manual gateway entry for IPv6 hosts#63838
MayankSharma-ops wants to merge 2 commits into
openclaw:mainfrom
MayankSharma-ops:fix/ipv6-manual-gateway-v2

Conversation

@MayankSharma-ops

Copy link
Copy Markdown

Summary

  • bracket raw IPv6 literals when building manual Android gateway URLs
  • fix manual gateway entry for hosts like ::1
  • add regression coverage for manual IPv6 input

Testing

  • added focused tests in GatewayConfigResolverTest
  • attempted the Android unit test locally, but full Gradle verification was blocked by local SDK/toolchain setup in this environment

@greptile-apps

greptile-apps Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a URL construction bug in composeGatewayManualUrl where raw IPv6 literals (e.g. ::1) were passed directly into the URL string without the brackets required by RFC 3986, resulting in malformed URLs like http://::1:18789. The fix correctly normalizes the host before concatenation, and the new tests cover both the isolated helper and the full resolveGatewayConnectConfig flow.

Confidence Score: 5/5

Safe to merge — targeted one-liner fix with correct logic and adequate test coverage.

The bracketing logic is correct: contains(':') reliably identifies raw IPv6 literals (colons are not valid in hostnames or IPv4), the already-bracketed guard prevents double-wrapping, and parseGatewayEndpointResult already strips brackets when extracting the host. All findings are P2 or lower.

No files require special attention.

Vulnerabilities

No security concerns identified.

Reviews (1): Last reviewed commit: "fix(android): normalize IPv6 host input ..." | Re-trigger Greptile

@MayankSharma-ops
MayankSharma-ops force-pushed the fix/ipv6-manual-gateway-v2 branch from 801f9d8 to fc24e32 Compare April 10, 2026 15:52
@MayankSharma-ops

Copy link
Copy Markdown
Author

Hi @maintainers 👋

Just a gentle follow-up on this PR. All checks are passing and bot review looks good.

Would appreciate a quick review whenever you get time. Happy to make any changes if needed!

Thanks 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant