Skip to main content

A minimal HTTP server with Cross-Origin isolation headers for high-resolution timers

Project description

orz.http.server

test

A minimal HTTP server that sends Cross-Origin isolation headers, enabling high-resolution timers (performance.now() at microsecond precision) in the browser. Useful for Unity Profiler and other tools that depend on accurate timing.

Tested on Linux / Windows / macOS with Python 3.8+. MCP tools require Python 3.10+.

Install

python -m pip install -e .

Usage

python -m orz.http.server port

Android

Forward the port via adb, then open in Chrome:

adb reverse tcp:port tcp:port
adb shell am start -a android.intent.action.VIEW -d "http://localhost:port"

Note

Always access via localhost:port, not ip:port.

MCP Server

For AI assistants (Claude Code, Cursor, etc.):

pip install -e ".[mcp]"

Claude Code config:

{
  "mcpServers": {
    "orz.http.server": {
      "command": "python",
      "args": ["-m", "mcp", "run", "orz.http.mcp:mcp"]
    }
  }
}

Tools: start_server, stop_server, server_status, adb_reverse, adb_open_browser

FAQ

Can I achieve this without code using the built-in http.server?

No. The built-in http.server has no option to add custom headers or MIME type mappings.

Does the MIME type mapping introduce security risks?

No. It only tells the browser the correct file type. Correct MIME types actually help browser security policies work properly.

Does enabling high-resolution timers expose me to attacks?

No. The precision only applies to your own pages. COOP/COEP headers are opt-in — you're trusting your own pages, not opening access to others.

Does this server work as a file server?

Yes, it inherits http.server and serves directory contents. By default it serves the current directory, so use -d path to avoid exposing unwanted files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orz_http_server-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orz_http_server-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file orz_http_server-0.1.1.tar.gz.

File metadata

  • Download URL: orz_http_server-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orz_http_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b7743beeae2579f92baabec5202451316baeda54b30331ebdd7408d7235c1286
MD5 0511c85abdf1f102ea272eb6df0fd818
BLAKE2b-256 6f48bb779fd0c1fc9dd76486e96b67197a70de2aac9cfe92b0331d7b11df55e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for orz_http_server-0.1.1.tar.gz:

Publisher: release.yml on universaltechnologies/orz.http.server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orz_http_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for orz_http_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 255f35cb63807c90a5360f9becf67ff9be183ba5b3280195fddafb2a572d5ebb
MD5 cf4d0be92d6f240abbf7b0d457853358
BLAKE2b-256 8ecb5d85740aa8191c4b21a8a855a9b2569109de42b342f025f8a1b64239956e

See more details on using hashes here.

Provenance

The following attestation bundles were made for orz_http_server-0.1.1-py3-none-any.whl:

Publisher: release.yml on universaltechnologies/orz.http.server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page