teapawt
A privacy-focused Twitter/X frontend written in Rust.
Public instances: nitter.cf, nitter.gq, xitter.cf, xitter.gq, teapaw.org, teapawt.net, and teapawt.org.
Live status for those instances: status.d420.net. Scraping is allowed on them. Ask the operator before scraping any other Nitter instance.
Features
- Privacy-focused: No third-party JavaScript (unless optional Cloudflare Turnstile gates are configured), tracking, ads, or remote fonts
- RSS feeds: Subscribe to user timelines, articles (
/{username}/articles/rss), threads, lists, and search results
- Followers and following:
/{username}/followers and /{username}/following, linked from the counts on every profile
- Communities: Top, Latest, Media and About, plus members (
/i/communities/{id}/members), moderators (/moderators) and the posts under a hashtag (/hashtag/{tag})
- Spaces:
/i/spaces/{id} shows a Space’s host, speakers and state, and plays a live room or its recording
- Embeds for other sites: a drop-in replacement for X’s
widgets.js, see Embedding posts on other sites
- Browser-impersonating HTTP/3 & HTTP/2 client (
koon-core): Each account deterministically presents a real desktop browser’s TLS, HTTP/2, and HTTP/3 (QUIC) fingerprint (Chrome, Edge, Firefox, Safari, or Opera), including HTTP/3 over SOCKS5 UDP ASSOCIATE with automatic TCP/HTTP/2 fallback
- Separate
search and view account pools: Search accounts stay isolated from profile and tweet reads, with per-account cookie jars, background NSFW/search-safety filter sync, search auditing, and live imports without restarts
- SOCKS5 exit pool: Stable session-to-port pinning, per-port edge-block circuit breaking, and optional fallback exits for HTML 429s
- Account auto-buy (optional): when the search budget ceiling stays under a threshold, buys X accounts from a configured seller and splits each delivery between the public search pool and the search-pass pool, see Account auto-buy
- Anti-DDoS gate (optional): a Cloudflare Turnstile check that goes up by itself while a flood drains the view accounts, and is tuned, switched off, or lifted from the admin panel without a restart, see Anti-DDoS gate
- PostgreSQL-backed state: Account inventory, cookie jars, per-account rate limits, sharded screen-name-to-numeric-id directory, plus optional operational telemetry (
/admin/stats) and paid search passes (/search-pass). HTML pages themselves are not cached in the process
- FxEmbed-style Discord embeds:
- Multiple images displayed in carousel on mobile
- Videos play directly in the embed
- Optional GIF transcoding (
ffmpeg locally or an external transcoding domain)
- Proper image dimensions for better layout
- ActivityPub JSON endpoint for rich embeds
Requirements
- Rust 1.96.1+ (edition 2024), plus a C/C++ toolchain,
cmake, and clang/libclang (required to compile BoringSSL via koon-core and tikv-jemallocator)
- PostgreSQL (required — stores accounts, cookie jars, and rate limits;
teapot will refuse to start if PostgreSQL cannot be reached or before the initial account migration has been run)
- Twitter/X session tokens for API access (browser cookies
auth_token + ct0, or OAuth tokens)
- Optional:
ffmpeg on PATH for local GIF transcoding (gifTranscoding.mode = "local", the default; falls back to "off" if missing)
- Optional: SOCKS5 or HTTP proxy exits if X blocks or throttles the server’s own IP
Building
cargo build --release
The crate and main server binary stay named teapot so existing configs and process managers keep working. The build produces three binaries in target/release/:
teapot — the web server
import-accounts — offline PostgreSQL account migration and import CLI
scrape-socks — optional local SOCKS5 (TCP + UDP ASSOCIATE) forwarder for WireGuard/Mullvad exits
Configuration and Setup
1. Create config/teapot.toml
cp config/teapot.example.toml config/teapot.toml
Edit config/teapot.toml:
- Set
config.hmacKey to a unique secret of at least 32 characters (e.g. openssl rand -hex 32). Startup refuses empty, default, or shorter keys.
- Set
server.title (e.g. "teapawt" or whatever you want shown in the navbar).
- Behind nginx or another reverse proxy / TLS terminator, set
https = true, publicPort = 443, and config.trustedProxies = ["127.0.0.1"] (or your proxy’s IP) so generated links omit the listen port and per-visitor budgets read X-Forwarded-For correctly.
- If
ffmpeg is not installed and you do not want local GIF transcoding, set mode = "off" under [gifTranscoding] (otherwise startup logs an error and falls back to "off").
2. Set up PostgreSQL
PostgreSQL is required for accounts, cookie jars, and rate limits. By default both teapot and import-accounts connect via peer auth on the local Unix socket:
host=/var/run/postgresql user=teapot dbname=teapot
Create the role and database:
CREATE ROLE teapot LOGIN;
CREATE DATABASE teapot OWNER teapot;
If you run teapot as an OS user other than teapot, either map that user in PostgreSQL’s pg_ident.conf, or override the connection string with TEAPOT_LIMITS_DATABASE_URL (standard libpq key=value or postgres:// URI, without TLS):
# Example using TCP + password auth
export TEAPOT_LIMITS_DATABASE_URL="postgres://teapot:[email protected]/teapot"
# Or using local peer auth as your current OS user (after `createdb teapot`)
export TEAPOT_LIMITS_DATABASE_URL="host=/var/run/postgresql user=$USER dbname=teapot"
All tables are created automatically on connect. See PostgreSQL below for the full schema breakdown.
3. Seed and migrate accounts into PostgreSQL
teapot never reads sessions.jsonl at runtime — accounts live in PostgreSQL, and the server refuses to start until the one-time offline migration has completed.
- Create
sessions.jsonl with your initial Twitter/X credentials (or create an empty file if you plan to import accounts with import-accounts import in step 3):
cp sessions.example.jsonl sessions.jsonl
# Edit sessions.jsonl with your auth_token and ct0 from browser cookies
Cookie sessions use kind = "cookie" with auth_token and ct0; OAuth sessions use kind = "oauth" with oauth_token and oauth_secret (give each line in sessions.jsonl a unique numeric id). Add "pool": "search" to any line that should belong to the dedicated search pool; omitting "pool" puts the account in the view pool.
- Run the one-time migration (with
TEAPOT_LIMITS_DATABASE_URL set if you are not using the default socket/role):
./target/release/import-accounts migrate
This reads TEAPOT_SESSIONS_FILE (default: sessions.jsonl) and optional TEAPOT_COOKIES_FILE (default: session-cookies.json), loads the accounts and cookie jars into PostgreSQL, and records the legacy-v1 migration marker so teapot can start.
- To add more accounts later without editing
sessions.jsonl:
# Import into the view pool (profiles, tweets, threads, lists)
./target/release/import-accounts import view-accounts.txt view
# Import into the dedicated search pool
./target/release/import-accounts import search-accounts.txt search
# Show total / search / view account counts
./target/release/import-accounts stats
# Restore a previously demoted batch back to the search pool
./target/release/import-accounts restore-search search-accounts.txt
import-accounts import (and the live admin upload form at /admin/import) accepts:
username:...:ct0:auth_token, username|...|auth_token|ct0|..., or username----...----auth_token----ct0 lines (40-hex auth_token, 160-hex ct0)
Cookie: auth_token=...; ct0=... headers (or bare semicolon-separated cookie pairs)
- JSON objects or arrays (
{ "auth_token": "...", "ct0": "..." }, { "cookies": ... }, or browser cookie-editor JSON exports)
- Netscape HTTP cookie files
The running teapot process automatically reconciles newly imported accounts from PostgreSQL without needing a restart.
Never commit a real sessions.jsonl, config/teapot.toml, proxies.txt, session-proxies.json, or donations.json. Those paths are gitignored.
Account Pools, Rate Limits, and Cache
- Separate
search and view pools:
view accounts serve profiles, timelines, tweets, threads, lists, and communities. They are never used for search.
search accounts ("pool": "search" or imported into search) serve SearchTimeline only and are kept out of profile/view reads, except for self-service settings writes that turn off X’s sensitive-media and search-safety filters.
- Newly added search accounts are verified by a background audit before visitor traffic uses them, so you need at least one account in the
view pool for profiles/tweets and at least one in the search pool if you want search to work.
maxConcurrentReqs is per account, not global (default: 2). An account already at its cap is skipped and another account is used immediately.
clientBudget caps how fast one visitor IP can spend upstream X calls. Media and static assets are free.
- No in-process HTML cache: Pages are fetched fresh from X and cached downstream by your CDN (
s-maxage), while identical concurrent upstream calls are coalesced in flight.
- Search refusals, suspensions, and denylist:
- An empty search 404 briefly rests the account instead of permanently banning it; confirmed search refusals demote the account to the
view pool, and a periodic background probe can reinstate demoted accounts if X allows them to search again.
- Dead credentials are HTTP
401 or 403 with code 326. Confirmed suspensions (403 code 64) leave search and retire if view reads also fail. Stale ct0 tokens are refreshed from CSRF rejections or can be replaced from /admin/stats.
- X refuses a suspended account every community call and still shows it profiles. A suspended account is never handed a community call or a list call. A community or list call X refuses (
403 code 64) marks the account suspended without retiring it, and the request goes to another account. A refused settings write is not that mark: X refuses the write to accounts it still answers lists and communities for.
- Queries rejected by X’s Search Content Control denylist (
QueryDenylistedFailure) are recorded in search-denylist.json (TEAPOT_SEARCH_DENYLIST) and automatically retried with include:nativeretweets.
- Live GraphQL query IDs:
teapot fetches current GraphQL query IDs and feature flags from X’s web client bundles and persists them to graphql-ops.json (TEAPOT_GRAPHQL_OPS_FILE).
- Queries sent as POST: cookie sessions send
SearchTimeline and ListLatestTweetsTimeline (a list’s posts) as a POST. X does not answer a GET for either. For a list’s posts the GET comes back as an empty 404, whichever account asks.
Account auto-buy
Search accounts wear out, and the search budget ceiling on /admin/stats falls with them: it is the number of verified search accounts times X’s documented 50 calls per 15 minutes. With a seller configured, teapot refills the pools by itself.
# config/teapot.toml
[autobuy]
apiKey = "tsa_live_..."
baseUrl = "http://203.0.113.7:5000"
The seller has to speak the “Twitter Seller API v1”: X-Api-Key authentication, /wallet/balance, /stock, and /orders with an Idempotency-Key. Everything else is set on /admin/stats/autobuy (Account auto-buy in the admin sidebar) and stored in PostgreSQL:
- When: the ceiling has to stay under Buy under (default 2,000 searches/min) for Stay under for minutes. Accounts are then bought until the pools hold enough for Refill to (2,300). Accounts already in the pools count towards that while they wait to be verified, for up to three hours, so nothing is bought twice.
- What: the cheapest X accounts in stock (
web, android, ios) under Highest price each. Microsoft mailboxes (email) are never bought. A product never bought before gets a small trial order first; if its lines do not import as accounts it is blocked until an operator allows it again.
- How much: each order is cut to the stock, Largest order, the Daily budget (any 24 hours) and the wallet balance above Keep in wallet.
- Where: Public pool share of each delivery (default 3%) goes to the public
search pool, the rest to search-pass. The share is exact over time: fractions of an account carry over to the next delivery.
The page also shows the wallet balance, the seller’s stock, what was spent and bought over 24 hours, 7 days and 30 days, and every order. Buy places an order by hand under the same caps, and switching Buy automatically off leaves the buyer watching and saying what it would do.
Orders are safe to interrupt. Each is written to PostgreSQL with its idempotency key before the seller hears of it, and a request that got no clear answer is repeated under the same key, so it is charged at most once. A delivery is kept until it is imported, and accounts already in the pool are skipped. An order whose outcome stays unknown stops all buying until an operator dismisses it on the dashboard.
X Login — signing accounts in
The same page has an X Login tool for accounts you already hold. Paste username:password:2fa_secret lines and the seller’s X Login service (/x-login/*, same X-Api-Key) signs each into X and returns its auth_token and ct0, which are imported into the pools under the same Public pool share split. The seller charges only for logins that succeed or definitely fail (wrong password, suspended, locked, 2FA failed); our-side errors and invalid 2FA secrets are free, and the up-front reservation is refunded down to what was billed.
Each job is written to PostgreSQL with its idempotency key and the pasted lines before the seller hears of it, so a job is created at most once and survives a restart; its lines are dropped as soon as the seller has them. A job polls until the seller is done, then its successful sessions are downloaded and imported. Cancel stops a running job: lines already signed in are still charged and imported, the rest is refunded. The page shows the price, how many sessions have been signed in, what was captured and refunded, and every recent job.
Anti-DDoS gate
Every profile page costs a call on one of the view accounts. When a flood spends them, the first page of a timeline has to leave UserTweets for a fallback timeline, and the share of first pages that had to is what the gate watches. With both keys set under [turnstile], a Cloudflare check goes up in front of every visitor without a search pass while that share is at or over the trigger, and comes down again by itself.
# config/teapot.toml
[antiDdos]
enabled = true
automatic = true
floodPercent = 50 # this share of first pages off UserTweets...
floodWindowMinutes = 15 # ...over this many minutes puts the check up
floodHoldMinutes = 15 # and it stays up this long after the last flooded report
The share is taken over floodWindowMinutes, and 15 is X’s rate-limit window. A pool that is being spent gets its calls back on that beat, and in the minute before it does every account is spent: judged alone, that one minute reads 99% with no flood at all. sustainedPercent for sustainedMinutes in a row is a second, lower trigger (0 turns it off). Networks in blockedAsns are asked on every page, and a country in watchedCountries while it loads more than surgePerMinute pages a minute. One solved check lets an address through for passMinutes.
[antiDdos] is only where these start. They are changed on /admin/stats/antiddos (Anti-DDoS in the admin sidebar) while the site runs, and nothing there takes a restart:
- Every setting above is in force from the next request, the switch that turns the whole gate off included.
- Lift the check now takes down a check that went up by itself, for a flood or for a surging country, and starts the readings over, so the same minutes cannot put it straight back.
- What is saved is stored in PostgreSQL and stays in force across restarts, over the file. Use the configuration file forgets it.
Proxies
SOCKS5 exit pool
When socksProxiesFile is configured, API calls, script-chunk fetches, and media fetches (/pic, /video, /gif, round-robin across healthy exits) all leave through those exits so no upstream request uses the server’s own IP. Without socksProxiesFile, media uses the optional HTTP proxy / proxyAuth setting (or direct).
cp proxies.example.txt proxies.txt
# one host:port:user:pass per line
# config/teapot.toml
socksProxiesFile = "proxies.txt"
sessionProxiesFile = "session-proxies.json"
All lines in proxies.txt must share one hostname (different ports are the rotating exits). On startup teapot probes that host’s A records (when there is more than one) and picks the lowest-ping IP. Each account stays on a stable port: existing pins in sessionProxiesFile ({ "sessionId": port }) are read if present (read-only), and all other or newly imported sessions deterministically map to a port from the sorted port list.
An exit that gets throttled at X’s edge (HTML 429) or responds far slower than the rest of the fleet is parked temporarily with exponential backoff while traffic continues through the remaining healthy ports. Cloudflare IP blocks are written to disabled-proxies.txt (TEAPOT_DISABLED_PROXIES_FILE) and lapse automatically after 3 hours.
Fallback proxies (direct mode)
When running directly without socksProxiesFile:
apiProxy (with proxyAuth) is an HTTP proxy tried only after a direct request gets an HTML 429.
fallbackProxiesFile accepts a list of http://user:pass@host:port, socks5h://user:pass@host:port, or host:port:user:pass (HTTP) exits sharing one gateway hostname. At startup teapot probes the gateway (requiring ≤20 ms RTT) and rotates through those exits on HTML 429s.
Transport (koon-core & scrape-socks)
Outbound requests use koon-core with per-account browser profiles (Chrome, Edge, Firefox, Safari, Opera). At startup teapot handshakes with x.com to pick the newest version per engine that X accepts. API calls pre-seed Alt-Svc for x.com and api.x.com to negotiate HTTP/3 (QUIC) — including over SOCKS5 UDP ASSOCIATE — with automatic TCP/HTTP/2 fallback when UDP is unavailable on a proxy. Media fetches use HTTP/1.1.
The repo also includes scrape-socks, a local SOCKS5 forwarder supporting both TCP CONNECT and UDP ASSOCIATE (including chaining through Mullvad’s in-tunnel SOCKS5 relay):
./target/release/scrape-socks /path/to/map-file
Map lines have the form <port> <user> <password> <bind_ip> [via]. It listens on 127.0.0.1 plus any addresses listed in SCRAPE_SOCKS_LISTEN.
PostgreSQL
All tables are created automatically in the target database (default: host=/var/run/postgresql user=teapot dbname=teapot, overridden by TEAPOT_LIMITS_DATABASE_URL). There is no JSON fallback for accounts or rate limits — PostgreSQL must be reachable when teapot starts.
| Tables |
Required? |
Purpose |
account_sessions, account_cookies, account_migrations, account_import_batches |
Yes |
Account inventory, pool assignments, per-account cookie jars, migration markers, and import history |
session_limits |
Yes |
One JSONB row per account for rate limits, refusals, suspensions, and filter flags (batched upserts) |
user_ids |
Best-effort |
Lowercase screen name ↔ numeric id directory so profiles can request header and posts in parallel; loaded in the background into sharded maps (stays in-memory only if unavailable) |
stats_minute_buckets, stats_restrictions, stats_account_events, stats_search_account_minutes |
Best-effort |
30-day operational telemetry for /admin/stats (optional separate DB via TEAPOT_STATS_DATABASE_URL) |
pass_accounts, pass_orders, pass_sessions, pass_ips |
Best-effort |
Optional paid search passes (/search-pass), whitelisted IPs, and the admin login used for /admin/import and /admin/stats |
autobuy_settings, autobuy_orders, autobuy_products, autobuy_login_jobs |
Only with [autobuy] |
Account auto-buy settings, the ledger of every order, which seller products import, and X Login jobs. Nothing is bought while this cannot be written |
anti_ddos_settings |
Best-effort |
The Anti-DDoS settings saved on /admin/stats/antiddos, one JSONB row, read over [antiDdos] at start. Without it the gate runs on the configuration file |
Running
# Development
cargo run --bin teapot
# Production
./target/release/teapot
The server listens on http://0.0.0.0:8080 by default (server.address / server.port in config/teapot.toml).
Environment variables
| Variable |
Default |
Purpose |
TEAPOT_CONF_FILE |
config/teapot.toml |
Path to configuration file |
TEAPOT_LIMITS_DATABASE_URL |
host=/var/run/postgresql user=teapot dbname=teapot |
PostgreSQL connection string for accounts, limits, user IDs, and passes (and stats unless overridden) |
TEAPOT_STATS_DATABASE_URL |
(falls back to TEAPOT_LIMITS_DATABASE_URL) |
Optional separate PostgreSQL connection string for telemetry |
TEAPOT_SESSIONS_FILE |
sessions.jsonl |
Legacy sessions file read by import-accounts migrate |
TEAPOT_COOKIES_FILE |
session-cookies.json |
Optional legacy cookies file read by import-accounts migrate |
TEAPOT_GRAPHQL_OPS_FILE |
graphql-ops.json |
Persisted GraphQL query IDs and feature switches |
TEAPOT_SEARCH_DENYLIST |
search-denylist.json |
Persisted denylisted search query rewrites |
TEAPOT_DISABLED_PROXIES_FILE |
disabled-proxies.txt |
Temporarily disabled (Cloudflare-banned) SOCKS5 exit ports |
RUST_LOG |
teapot=info,tower_http=info |
Tracing log filter |
SCRAPE_SOCKS_LISTEN |
127.0.0.1 |
Additional listen IPs for scrape-socks |
Donation providers can also be configured via environment variables instead of config/teapot.toml: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, NOWPAYMENTS_API_KEY, NOWPAYMENTS_IPN_SECRET, LZT_ACCESS_TOKEN, LZT_MERCHANT_ID, LZT_SECRET_KEY, and LZT_CURRENCY.
Admin and operational routes
/import — public pool totals and recent import batch counts (/pool-counts returns JSON)
/admin/import — live account upload form (requires signing in via /search-pass/login as the admin account in pass_accounts)
/admin/stats — operational dashboard, search account health, out/unverified account inspector, live probes, pool switching, and ct0 replacement (same admin login)
/admin/stats/autobuy — account auto-buy: wallet balance, seller stock, spend, orders, its settings, and the X Login tool for signing username:password:2fa_secret lines into auth_token/ct0 (same admin login)
/admin/stats/antiddos — Anti-DDoS gate: what it is doing and why, every setting, the switch that turns it off, and the lift of a check that is up, all without a restart (same admin login)
/.health, /.sessions — JSON debug endpoints when config.enableDebug = true and config.debugToken (≥32 chars) is sent as Authorization: Bearer <token>
To use the Twitter/X API, you need session tokens from a logged-in account:
- Log into Twitter/X in your browser
- Open Developer Tools (F12) → Application (or Storage) → Cookies
- Copy the values of
auth_token and ct0
- Add them to
sessions.jsonl and run ./target/release/import-accounts migrate (for initial setup), or import them later with ./target/release/import-accounts import <file> <search|view> or /admin/import
Project Structure
teapawt/
├── src/
│ ├── main.rs # Server entry point and middleware stack
│ ├── config.rs # Configuration loading and validation
│ ├── accounts.rs # PostgreSQL account store, cookie jars, import parser
│ ├── account_repair.rs # One-time startup state repairs
│ ├── stats.rs # PostgreSQL operational telemetry store
│ ├── passes/ # Paid search pass store, checkout, IP whitelist
│ ├── autobuy/ # Buys search accounts from a seller when the pools run low
│ ├── donations.rs # Stripe / NOWPayments / LZT donation ledger
│ ├── pressure.rs # Pool-pressure detector for automatic Anti-DDoS gate
│ ├── gate.rs # Anti-DDoS settings in force: config file, admin-panel overrides in Postgres
│ ├── transcode.rs # Local/external GIF transcoding
│ ├── translation.rs # Kagi Translate integration
│ ├── error.rs # Error types and HTTP error pages
│ ├── types/ # Data structures (User, Tweet, Timeline, Session, Prefs)
│ ├── api/ # X API client, koon-core HTTP/3 client, SOCKS5 pool, parsers
│ ├── cache/ # Sharded Postgres-backed user-id store and GIF cache
│ ├── routes/ # HTTP route handlers (pages, search, RSS, embeds, admin)
│ ├── views/ # Maud HTML templates
│ ├── utils/ # Utilities (HMAC, host routing, formatters)
│ └── bin/
│ ├── import-accounts.rs # Offline PostgreSQL account migration/import CLI
│ └── scrape-socks.rs # Local SOCKS5 (TCP + UDP ASSOCIATE) forwarder
├── vendor/
│ └── xitter-txid/ # Patched transaction-id crate
├── public/ # Static assets (CSS, JS, fonts, icons, logo)
├── config/ # teapot.example.toml
├── proxies.example.txt # Dummy SOCKS5 list
├── sessions.example.jsonl # Example session JSONL
└── Cargo.toml
Embed Improvements
teapawt includes FxEmbed-style improvements for Discord embeds:
Multiple Images
Discord can display all images from a tweet in a carousel. This works via an ActivityPub JSON endpoint at /users/{username}/statuses/{id} that returns media attachments.
Video and GIF Playback
Videos can be played directly in Discord embeds using twitter:player meta tags:
twitter:player - Embed URL
twitter:player:stream - Direct MP4 URL
twitter:player:width/height - Dimensions
Twitter MP4 “GIFs” can also be transcoded to real GIFs for inline Discord playback via [gifTranscoding] (local ffmpeg with disk cache, or an external transcoding domain).
Image Dimensions
All images include og:image:width and og:image:height meta tags for proper layout.
Embedding posts on other sites
/js/widgets.js stands in for X’s platform.twitter.com/widgets.js. A page that already carries X’s embed markup only has to load the script from an instance instead, and every <blockquote class="twitter-tweet"> on it becomes a frame of that instance. X’s script is not loaded and nothing is requested from x.com. Images and video inside the frame still come from X’s media CDN (twimg.com): media proxying is a per-visitor preference, off by default, and a frame on another site does not carry the visitor’s preferences.
<blockquote class="twitter-tweet" data-theme="dark">
<a href="https://twitter.com/jack/status/20"></a>
</blockquote>
<script async src="https://your.instance/js/widgets.js" charset="utf-8"></script>
/oembed?url=https://your.instance/jack/status/20 returns this markup, already pointed at the instance.
class="twitter-video" frames only the post’s video. data-width and data-align are honoured. data-theme takes light, dark, or the name of any theme from Preferences.
twttr.widgets.load(), twttr.widgets.createTweet(id, element, options), twttr.widgets.createVideo(…), twttr.ready(…) and twttr.events.bind("rendered", …) work as they do with X’s script.
- Without the script, frame
/{username}/status/{id}/embed or /i/videos/tweet/{id} in an <iframe> directly. Add ?theme= to choose the theme. The frame reports its height to the parent page with postMessage(["resizeIframe", { h }], "*").
Those two embed pages are the only ones sent with frame-ancestors *. Every other page still refuses to be framed.
Spaces and stream relaying
X’s stream CDN refuses any request that carries another site’s Origin, so a browser on an instance cannot load a Space’s audio from it. The Space page therefore plays through the instance: /video/hls/{sig}/{url} fetches the playlist and rewrites every address in it to a signed /video/… link, and the segments are relayed through that route. Links are signed with config.hmacKey, so only playlists and segments the instance itself named can be requested.
Two things follow for operators. Space audio counts against the instance’s bandwidth: about 50 MB for each hour a visitor listens. And a live playlist is answered with Cache-Control: no-store, which a CDN in front of the instance has to respect, or listeners stop receiving new segments. A finished recording’s playlist is cacheable for an hour.
Donate
Running the public instance costs money for servers, bandwidth and the
accounts and exits that keep it working. If nitter.cf is useful to you,
donations help keep it online. Nothing is required.
| Coin |
Address |
| BTC |
bc1qtm4rep7kyp2p28hlkfktpnd0j7uew47vnt2mev |
| LTC |
ltc1q9xlaysse0mpfwf025esd69kt9zu3md22gh23du |
| ETH |
0x6abA18D203520c8F90ca63eE7426a7bC345D98e6 |
| SOL |
E5ekoiauCR8yiNp451dmuPzhUxo84P5x3m9WJBK5kxZe |
| XRP |
r3jYXNdMk2Vz5hXhKCKE9re8uz93JQFG1r |
| DOGE |
DSBq5jRWkiwmEh1G7zBwmQDgRkvRr61fmb |
| XMR |
85CTwq5wGjWZw5GgzgwZPrHyZxpLXMK5oZSSSk5j4x9w1bpqzisaWAUZYaAPfh6rP2MZJcaFqF1XmEzkw6YCqJSS2Txu6Z8 |
License
GNU Affero General Public License v3.0
评论