Deno
NOTE: The documentation below assumes either
FIXIE_URLorFIXIE_SOCKS_HOSTEnvironment Variables are set. If your application is deployed on either Heroku or Vercel via our official integration, these environments will be set for you. Otherwise, see the setup guide for the platform you are using in the Platforms section below for how to set them manually.
Deno is not just Node with TypeScript built in. It has its own HTTP client, its own permission model, and different assumptions about how outbound connections get made. Fixie's setup on Deno reflects those differences rather than reusing the Node.js snippets.
Deno's secure-by-default permission model blocks network access unless explicitly granted. Any script making outbound requests through Fixie needs
--allow-net(or a scoped--allow-net=your-fixie-host.usefixie.com) at runtime, or the connection will fail with a permission error before it ever reaches the proxy.
Using fetch with Deno.createHttpClient
Deno's global fetch doesn't read proxy environment variables the way some other runtimes do. Instead, build an HTTP client bound to the proxy and pass it explicitly on each request:
Deno.createHttpClient is stable as of Deno 1.x and requires no third-party dependency. This is the idiomatic way to proxy fetch in Deno, unlike Node where fetch needs an agent shim from npm.
Using a proxy agent from npm
Deno's npm compatibility layer can load select npm packages directly, which is useful if you're porting an existing Node integration or prefer axios's proxy config shape over Deno.createHttpClient:
npm compatibility in Deno keeps improving but isn't universal. Some packages that rely on Node-specific internals, such as raw net/tls socket manipulation or certain native addons, won't load cleanly. If a package fails under npm:, check whether it has a native Deno equivalent before assuming Fixie is the problem. The Deno.createHttpClient approach above has no such dependency risk since it uses only Deno's own APIs.
Connecting to a database over Fixie Socks
For Postgres, the postgres client (published for both Node and Deno, and loadable via npm:postgres) accepts a custom socket function, so you can hand it a SOCKS connection through Fixie without a sidecar process:
This keeps everything in one process: no separate binary to run alongside your app. It works for Postgres specifically because postgres's socket option exists for this exact use case. For other databases or arbitrary TCP services without an equivalent option, Fixie-Wrench is the simpler fallback: run it as a sidecar process, and your Deno code just connects to localhost on the forwarded port, no SOCKS client code required.
See Connecting to a Database for the general Fixie Socks pattern this builds on.
See the full list of static IP guides for every supported language, platform, and destination.
Is this guide useful?
Having issues? Please reach out to our team here.