Skip to content

sensdata/idb-website

Repository files navigation

iDB Website

Official website and resource proxy for iDB — a lightweight self-hosted DevOps platform.

Architecture

idb.net / www.idb.net        ← Website (Astro + Tailwind, static)
dl.idb.net                   ← Resource proxy (Cloudflare Worker)

Website

Built with Astro + Tailwind CSS. Bilingual (English / Chinese).

Development

npm install
npm run dev       # http://localhost:4321
npm run build     # Static output → dist/
npm run preview   # Preview production build

Deploy to Cloudflare Pages

  1. Connect this repo to Cloudflare Pages
  2. Build command: npm run build
  3. Output directory: dist
  4. Custom domain: idb.net / www.idb.net

The CNAME file is for GitHub Pages compatibility. If using Cloudflare Pages, configure the domain in the dashboard instead.

Resource Proxy (dl.idb.net)

Reverse proxy for GitHub Releases, restricted to sensdata/idb only to prevent abuse.

Cloudflare Worker

cd worker
npx wrangler deploy         # Deploy to Cloudflare Workers
npx wrangler dev            # Local development

Then add custom domain dl.idb.net in Cloudflare Dashboard → Workers → Custom Domains.

Self-Hosted Proxy Node

For custom acceleration nodes (e.g., dl-hk.idb.net):

cd nginx

# Place your SSL certs
mkdir -p certs
cp /path/to/fullchain.pem certs/
cp /path/to/privkey.pem certs/

# Edit proxy.conf — update server_name
# Start
docker compose up -d

How It Works

Install Flow

User runs:
  curl -fsSL https://idb.net/install.sh | sudo bash
       │
       ▼
  public/install.sh (on idb.net)
       │ Auto-detects China → sets IDB_GITHUB_PROXY=https://dl.idb.net
       ▼
  Downloads the official native install.sh from GitHub Releases (via proxy if needed)
       │
       ▼
  Official native install.sh runs with IDB_GITHUB_PROXY set
       │ All GitHub API / Releases requests go through dl.idb.net
       ▼
  iDB installed ✓

Security: Restricted Proxy

The proxy only allows requests to sensdata/idb:

Allowed Blocked
/github-api/repos/sensdata/idb/releases/* /github-api/repos/other/repo/*
/github-releases/sensdata/idb/releases/* /github-releases/other/repo/*

All other paths return 403 Forbidden.

Project Structure

idb-website/
├── src/
│   ├── pages/
│   │   ├── index.astro          # English homepage
│   │   └── zh/index.astro       # Chinese homepage
│   ├── components/
│   │   ├── Header.astro
│   │   ├── Hero.astro
│   │   ├── Features.astro
│   │   ├── Install.astro
│   │   ├── Download.astro
│   │   └── Footer.astro
│   └── layouts/
│       └── Layout.astro
├── public/
│   ├── install.sh               # Smart install wrapper (auto-detect proxy)
│   ├── upgrade.sh               # Smart upgrade wrapper
│   └── favicon.svg
├── worker/
│   ├── proxy.js                 # Cloudflare Worker (dl.idb.net)
│   └── wrangler.toml
├── nginx/
│   ├── proxy.conf               # Self-hosted proxy node config
├── astro.config.mjs
├── tailwind.config.mjs
├── package.json
└── CNAME

License

Apache 2.0 — same as iDB.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors