FxEmbed / FxEmbed

FxEmbed / FxEmbed

FxEmbed is the home of FxTwitter, FixupX, and FxBluesky. It allows you to embed videos, polls, quotes, translations, and more on platforms like Discord, Telegram, and others! FxEmbed 是 FxTwitter、FixupX 和 FxBluesky 的主页。它允许你在 Discord、Telegram 等平台上嵌入视频、投票、引用、翻译等内容!

  • twitter.com: Add fx before your twitter.com link.
  • x.com: Add fixup before your x.com link.
  • bsky.app: Add fx before your bsky.app link.
  • twitter.com:在你的 twitter.com 链接前添加 fx。
  • x.com:在你的 x.com 链接前添加 fixup。
  • bsky.app:在你的 bsky.app 链接前添加 fx。

Documentation

文档

Docker

FxEmbed is a Cloudflare Worker, so the Docker image runs the local Workers runtime through Wrangler rather than starting a plain Node.js server. The image uses node:24-bookworm-slim because Wrangler’s workerd binary is glibc-linked and does not run reliably on Alpine/musl. FxEmbed 是一个 Cloudflare Worker,因此 Docker 镜像通过 Wrangler 运行本地 Workers 运行时,而不是启动一个普通的 Node.js 服务器。该镜像使用 node:24-bookworm-slim,因为 Wrangler 的 workerd 二进制文件是基于 glibc 链接的,在 Alpine/musl 上无法稳定运行。

Before building, copy and edit the local configuration files if you need custom domains, branding, or credentials: 在构建之前,如果你需要自定义域名、品牌标识或凭据,请复制并编辑本地配置文件:

cp .env.example .env
cp wrangler.example.toml wrangler.toml
cp branding.example.json branding.json

Build and run with Docker Compose: 使用 Docker Compose 构建并运行:

docker compose up -d --build

The worker listens on http://localhost:8787. Because FxEmbed routes by the Host header, test a specific realm like this: 该 Worker 监听 http://localhost:8787。由于 FxEmbed 通过 Host 标头进行路由,请按如下方式测试特定领域:

curl -H "Host: fxtwitter.com" -H "User-Agent: Discordbot/2.0" "http://localhost:8787/user/status/123"

You can also open http://localhost:8787/ without a Host header to see the local realm prefixes. 你也可以在不带 Host 标头的情况下打开 http://localhost:8787/ 来查看本地领域前缀。

Environment variables from .env are bundled during the Docker build, so rebuild the image after changing domain lists or other build-time configuration: 来自 .env 的环境变量会在 Docker 构建期间被打包,因此在更改域名列表或其他构建时配置后,请重新构建镜像:

docker compose up -d --build

Runtime secrets such as CREDENTIAL_KEY and EXCEPTION_DISCORD_WEBHOOK can be supplied through your shell or Compose .env file. Stop the service with: 运行时密钥(如 CREDENTIAL_KEY 和 EXCEPTION_DISCORD_WEBHOOK)可以通过你的 shell 或 Compose 的 .env 文件提供。停止服务请使用:

docker compose down

Licensed under the permissive MIT license. Feel free to send a pull request! 采用宽松的 MIT 许可证。欢迎提交 Pull Request!

Additional Credits

额外致谢

  • Mosaic: Multi-image combiner by Antonio32A and improved by Syfaro, Deer Spangle, and dangered wolf.
  • Everyone else who has contributed to the main project!
  • Mosaic:由 Antonio32A 开发,并由 Syfaro、Deer Spangle 和 dangered wolf 改进的多图合并工具。
  • 所有其他为该主项目做出贡献的人!

Disclaimer

免责声明

Twitter, Tweet, and X are trademarks of X Corp. This project is not affiliated in any way with X Corp or Twitter. Twitter、Tweet 和 X 是 X Corp 的商标。本项目与 X Corp 或 Twitter 没有任何关联。