Rammerhead exposes a set of HTTP endpoints for managing proxy sessions and retrieving runtime information. Most endpoints are plainDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/binary-person/rammerhead/llms.txt
Use this file to discover all available pages before exploring further.
GET requests that accept query parameters and return plain-text responses. The /syncLocalStorage endpoint uses POST with a JSON body.
All endpoints are served on the same port as the proxy itself (default 8080). No special headers are required.
Authentication
Whenconfig.password is set, endpoints that create, edit, or delete sessions require a pwd query parameter matching the configured password. The /needpassword endpoint lets clients check whether a password is required before prompting the user.
GET /needpassword
Returns whether the server requires a password to create sessions.true or false.
| Value | Meaning |
|---|---|
true | A password is required for session creation. |
false | No password is configured. |
GET /newsession
Creates a new proxy session and returns its ID.Required when
config.password is set. Must match the server-configured password exactly.a3f2c1d4e5b6a7f8c9d0e1f2a3b4c5d6.
The session is immediately persisted to the session store. If restrictSessionToIP is true in config.js, the session is bound to the IP address of the creating request and will reject proxied traffic from other IPs.
Store the returned session ID. It is required for all subsequent session operations and for constructing proxied URLs.
GET /editsession
Updates settings on an existing session.The session ID returned by
/newsession.An upstream HTTP proxy to route the session’s traffic through, in
host:port format. If you include an http:// prefix it is stripped automatically. Omit this parameter entirely (or leave it empty) to clear any previously set upstream proxy.Controls URL shuffling for the session. Pass
1 to enable (generates a new shuffle dictionary if one does not already exist) or 0 to disable (clears the existing dictionary).Success, or a 400 Bad Request if the session ID is missing or unknown.
When
httpProxy is omitted, the upstream proxy is set to null (disabled). If you want to leave an existing proxy unchanged while only toggling shuffling, you must re-supply the httpProxy value.GET /deletesession
Deletes a session from the session store.The session ID to delete.
Required when
config.password is set.Success if the session was found and deleted, or not found if no session with that ID exists.
GET /sessionexists
Checks whether a session ID is present in the session store.The session ID to check. Returns a
400 Bad Request if this parameter is absent.exists or not found.
GET /mainport
Returns the port number the proxy is listening on.8080.
This is useful in reverse-proxy setups where getServerInfo is overridden in config.js and the effective port may differ from the default.
GET /api/shuffleDict
Returns the URL shuffle dictionary for a session that is currently open (actively proxying).The session ID. The session must be currently open in memory (i.e. a proxied tab is actively using it). Returns a
400 Bad Request if the session is not open.This endpoint queries
openSessions, not the persistent session store. A session only appears in openSessions while a proxied page is actively connected. Sessions that have been created but not yet used will not be found here.POST /syncLocalStorage
SynchroniseslocalStorage data between the client and server for a given session and origin. This endpoint powers Rammerhead’s cross-tab localStorage persistence feature.
Disable this endpoint by setting disableLocalStorageSync: true in config.js. When disabled, the endpoint returns 404.
The session ID. The session must be open. Returns
400 if missing or not found.The proxied origin whose
localStorage is being synced, URL-encoded (e.g. https%3A%2F%2Fexample.com). Returns 400 if absent.type field determines the operation:
type: “sync”
Synchronises the client’slocalStorage snapshot with the server.
- Initial fetch (fetch: true)
- Merge sync (fetch: false)
Request the server’s current snapshot for an origin. Use this when a page first loads.Response: the server’s stored data and its timestamp. If the server has no record for this origin yet, an empty object is stored and returned.
Unix millisecond timestamp of the stored snapshot.
The full
localStorage contents for this origin, as { key: string } pairs.type: “update”
Applies a partial update to the server’s stored snapshot without replacing it. The origin must have been synced at least once before usingupdate.
A partial
localStorage object. Keys are merged into the existing server-side data. All values must be non-empty strings.The new server-side timestamp after the update was applied.
GET /rammerhead.js
Serves the compiled Rammerhead client-side script. This route is registered automatically byRammerheadProxy — you do not need to configure it.
application/x-javascript). In development mode (DEVELOPMENT=1), the unminified build is served; otherwise the minified build is used.
Include this script in your proxy UI page to enable client-side URL rewriting: