anomalyco / anomalyco/opencode
Loopback server URLs are misclassified as remote
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Explicit HTTP server connections are classified as local by slicing the URL string. Loopback URLs using uppercase LOCALHOST, IPv6 [::1], or user-info such as user@localhost are therefore treated as remote. This disables desktop-only local actions such as opening paths even though the server is on the local machine.
Plugins
None
OpenCode version
1.18.31
Steps to reproduce
- Call
ServerConnection.local(...)for:http://LOCALHOST:4096http://user@localhost:4096http://[::1]:4096
- Inspect each result.
Expected: all three loopback connections are local.
Actual: all three return false.
Screenshot and/or share link
Not applicable; focused classifier calls reproduce the result.
Operating System
All
Terminal
All
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ServerConnection.local(...) entry point and reproduce the three loopback URL cases from the issue: uppercase LOCALHOST, user-info, and IPv6 [::1]. Done means each connection is classified as local and the existing focused classifier checks confirm the expected results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100