Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/build-windows-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Windows Agent EXE & Publish GitHub Release

on:
workflow_dispatch:
push:
tags:
- 'v*'
paths:
- 'agent/**'
- 'scripts/**'
- '.github/workflows/build-windows-agent.yml'

permissions:
contents: write

jobs:
build-win64-agent:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install PyInstaller & WebRTC P2P dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller psutil websockets aiortc mss Pillow

- name: Compile standalone GothwadRemoteAgent-win64.exe
run: |
pyinstaller --onefile --collect-all av --collect-all aiortc --name GothwadRemoteAgent-win64 agent/gothwad_agent.py

- name: Bundle Setup Zip (Agent EXE + Hyper-V & Installer Scripts)
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path release-bundle | Out-Null
Copy-Item dist/GothwadRemoteAgent-win64.exe release-bundle/
Copy-Item scripts/host-setup-hyperv.ps1 release-bundle/
Copy-Item scripts/install-gothwad-agent.ps1 release-bundle/
Compress-Archive -Path release-bundle/* -DestinationPath dist/GothwadRemoteSetup-win64.zip -Force

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: gothwad-remote-agent-win64
path: |
dist/GothwadRemoteAgent-win64.exe
dist/GothwadRemoteSetup-win64.zip

- name: Publish to GitHub Releases (on version tag v*)
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
$tag = "${{ github.ref_name }}"
gh release create $tag `
dist/GothwadRemoteAgent-win64.exe `
dist/GothwadRemoteSetup-win64.zip `
--title "Gothwad Remote Desktop Agent $tag" `
--generate-notes
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI — File Size, Typecheck, Tests & Build

on:
push:
branches: [main, 'arena/**']
pull_request:
branches: [main]

jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run GothwadTech File Size Guard, Typecheck & Worker Tests
run: npm test

- name: Build Production Web Portal (Cloudflare Pages dist)
run: npm run build
33 changes: 33 additions & 0 deletions .github/workflows/deploy-cloudflare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy Cloudflare Pages (remotedesktop.gothwadtech.com)

on:
workflow_dispatch:
push:
branches: [main]

jobs:
deploy-pages:
runs-on: ubuntu-latest
# Runs if CLOUDFLARE_API_TOKEN is set; otherwise Cloudflare's native Git Pages integration deploys automatically.
if: ${{ secrets.CLOUDFLARE_API_TOKEN != '' }}
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies, test & build static bundle
run: |
npm ci
npm test
npm run build

- name: Deploy dist/ to Cloudflare Pages (Zero D1, Zero Worker!)
run: npx wrangler@latest pages deploy dist --project-name=remotedesktop --branch=main
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
node_modules/
dist/
dev-dist/
coverage/
.wrangler/
.dev.vars
worker/.dev.vars
.env
.env.*
!.env.example
__pycache__/
*.pyc
build/
*.exe
*.zip
.DS_Store
62 changes: 61 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,61 @@
# vm
# Gothwad Remote Desktop (`remotedesktop.gothwadtech.com`)

**100% Zero-Database, Zero-Worker Cloudflare Pages Portal — Main Windows 11 OS Control + Headless Isolated Hyper-V Background VM, Secured by Gothwad Accounts (`@gothwadtech.com`) & WebRTC P2P!**

Yeh repository (`GothwadTech/remotedesktop`) bilkul **`GothwadTech/meet`** ki tarah **Zero-D1 / Zero-Backend** architecture par bani hai — Cloudflare par **koi D1 database nahi banana, koi Worker deploy nahi karna, koi secret set nahi karna!** Bas repo ko Cloudflare Pages se connect karo aur `remotedesktop.gothwadtech.com` live!

---

## ⚠️ Important Consent & Transparency Rules

1. **Explicit Owner Permission Mandatory:** Kisi bhi Windows PC par one-time setup sirf unki **clear permission aur जानकारी** se karein (Agent pairing bina explicit consent confirm kiye reject ho jaati hai).
2. **Dual-Mode Transparency:**
- **🖥️ Mode 1 (Main Windows 11 Host OS):** Jab aap main OS connect karte ho, toh bilkul *Chrome Remote Desktop* ki tarah host screen par `"Your desktop is shared with username@gothwadtech.com [Stop Sharing]"` banner dikhta hai.
- **📦 Mode 2 (Background Hyper-V VM):** Jab dost apna kaam kar raha ho, toh aap isolated Hyper-V VM me connect hote ho — dost ki screen, mouse, ya personal files bilkul disturb nahi hoti!
3. **Laptop Battery Safety:** Kabhi bhi **"On Battery"** sleep disable mat karna taaki bag me band laptop overheat na ho.

---

## 🧠 Bina Cloudflare D1 Database ke Kaise Kaam Karta Hai? (Zero-D1 Magic!)

1. **Direct Gothwad Accounts SSO (`api.gothwadtech.com`):**
- `GothwadTech/accounts` pehle se har `*.gothwadtech.com` subdomain ke liye CORS + `.gothwadtech.com` `HttpOnly` multi-account cookies (`u/0..5`) allow karta hai!
- Isliye `remotedesktop.gothwadtech.com` seedha browser se `https://api.gothwadtech.com/api/auth/me` call karke aapka `@gothwadtech.com` user verify kar leta hai — kisi alag Worker ya D1 ki zaroorat hi nahi!
2. **Deterministic WebRTC P2P Slots (`PeerJS` + STUN/TURN, `GothwadTech/meet` Stack):**
- Jab aapka Windows PC start hota hai, `GothwadRemoteAgent.exe` aapke Gothwad username ke deterministic P2P slot (`grd-<username>-slot-1`..`6`) par online aa jaata hai.
- Jab aap duniya me kahin se bhi `remotedesktop.gothwadtech.com` kholte ho, browser aapke slots ko P2P probe karke turant **Online**, **RAM/CPU**, aur **Hyper-V VM State** dikha deta hai!
3. **Zero-Knowledge HMAC-SHA256 PIN + Host-Local ACL (`agent-config.json`):**
- Aapka **6-digit PIN** aur allowed `@gothwadtech.com` users (`vm_only` vs `host_and_vm`) seedha Windows Host ke `C:\ProgramData\GothwadRemote\agent-config.json` me rehte hain.
- Connect karte waqt raw PIN kabhi network par nahi jaata — fresh `nonce` ke saath `HMAC-SHA256(pin, nonce + ":" + viewer + ":" + mode)` verify hota hai (5 galat tries par 5-min lockout!).

---

## ✨ Website ke Andar Built-in Windows Setup Wizard (`/setup`)

Bilkul `remotedesktop.google.com/headless` ki tarah `https://remotedesktop.gothwadtech.com` par top bar me **`Windows Setup & Commands`** tab hai jahan user ko saare steps aur copy-paste PowerShell commands website ke andar hi mil jaate hain:
- **Mode Picker:** `Main OS + Background VM`, `Main OS Only` (2-min setup), ya `Background VM Only`.
- **Interactive Hyper-V VM Builder:** RAM, Disk, Linux/Windows ISO badalte hi live PowerShell command banti hai.
- **1-Line Gothwad P2P Installer Command** + Direct `.EXE` / `.ZIP` GitHub Release download buttons.
- **Safe Charger Power Command** (`standby-timeout-ac 0`, battery sleep protected).

---

## 🚀 60-Second Cloudflare Pages Deployment (Zero D1, Zero Secrets!)

1. **Cloudflare Dashboard -> Workers & Pages -> Create -> Pages -> Connect to Git (`GothwadTech/remotedesktop`)**
2. **Build command:** `npm run build`
3. **Build output directory:** `dist`
4. **Custom domain:** `remotedesktop.gothwadtech.com`
5. **Done!** 🎉

---

## 📚 Documentation Index (`docs/`)

1. **[`docs/07-gothwad-ecosystem-setup.md`](docs/07-gothwad-ecosystem-setup.md)** — ⭐ **START HERE:** Zero-D1 Architecture, Cloudflare Pages 1-Step Deploy & GitHub Actions EXE Release Guide.
2. **[`docs/01-architecture.md`](docs/01-architecture.md)** — Hyper-V Type-1 Service, `Default Switch` Wi-Fi NAT & CGNAT Bypass Deep Dive.
3. **[`docs/02-host-setup-windows11.md`](docs/02-host-setup-windows11.md)** — Windows 11 Pro (16GB/512GB) Safe RAM/CPU Limits & Auto-Boot VM Guide.
4. **[`docs/03-option-a-crd-vm.md`](docs/03-option-a-crd-vm.md)** — Alternative A: Chrome Remote Desktop Inside Guest VM.
5. **[`docs/04-option-b-kasm-cloudflare.md`](docs/04-option-b-kasm-cloudflare.md)** — Alternative B: KasmVNC (`Webtop`) + Cloudflare Tunnel.
6. **[`docs/05-option-c-guacamole-rdp.md`](docs/05-option-c-guacamole-rdp.md)** — Alternative C: DWService / Apache Guacamole HTML5 Windows RDP.
7. **[`docs/06-troubleshooting-faq.md`](docs/06-troubleshooting-faq.md)** — 1080p Resolution Fix, Wi-Fi Drop Watchdog, Gaming Pause/Resume Shortcut & SSD Compacting.
Loading
Loading