Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

Bare server requests to /bare (without trailing slash) were falling through to Fastify, returning HTML 404 pages instead of JSON. This broke Ultraviolet and Scramjet proxy clients.

Changes

Server routing logic (server/index.ts)

  • Added 301 redirect from /bare/bare/ before shouldRoute check
  • Ensures all bare paths reach the bare server, which returns JSON
.on("request", (req, res) => {
    if (req.url === "/bare") {
        res.writeHead(301, { Location: "/bare/" });
        res.end();
    } else if (bareServer.shouldRoute(req)) {
        bareServer.routeRequest(req, res);
    } else {
        handler(req, res);
    }
})

Results

Endpoint Before After
/bare 302 → HTML 404 301 → JSON
/bare/ JSON ✓ JSON ✓

Working application

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: node server/index.js (dns block)
    • Triggering command: nslookup example.com (dns block)
  • telemetry.astro.build
    • Triggering command: node /home/REDACTED/work/Radius/Radius/node_modules/.bin/astro build (dns block)
  • www.google.com
    • Triggering command: node server/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

the bare server isint running properley, and awalys sends a html message to the web proxy being used (ie ultravilot and scramjet) on localhost. be shure to look into the bare servers inner workings and diagnose the issue.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@codesandbox
Copy link

codesandbox bot commented Nov 11, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link

vercel bot commented Nov 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
radius Error Error Nov 13, 2025 10:31am

Copilot AI changed the title [WIP] Investigate and fix bare server operational problems Fix bare server routing for requests without trailing slash Nov 11, 2025
Copilot AI requested a review from sriail November 11, 2025 11:02
Copilot finished work on behalf of sriail November 11, 2025 11:02
Copy link
Owner

@sriail sriail left a comment

Choose a reason for hiding this comment

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

When the bare server is running after one user query, the console and the running proxy display the message (to many keepalive connections from this Ip address) and after that the recourses fail to load (is in the proxied URLs) it also says too many keepalive connections from this ip address at clientV3.readBareResponse

@sriail sriail marked this pull request as ready for review November 12, 2025 21:01
Added connection limiter settings to bare server.
Added HTTP and HTTPS agents with keep-alive settings and updated connection limits.
Added HTTP and HTTPS agents with keep-alive settings and connection limits. Updated Fastify server configuration to include new agents and adjusted server timeout settings.
Updated server configuration to disable keep-alive for HTTP and HTTPS agents, addressing the 'too many keepalive requests' error. Adjusted server timeout settings accordingly.
Refactor server configuration to completely disable keep-alive connections and connection pooling.
Refactor server to implement a semaphore for throttling requests and adjust connection handling.
Refactor server to implement a semaphore for scramjet requests, removing connection pooling and timeout settings.
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.

2 participants