omniroute 2.8.3 → 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/search-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/catalog/route.js +1 -1
- package/app/.next/server/app/api/models/catalog/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +2 -2
- package/app/.next/server/app/api/providers/[id]/test/route.js +3 -3
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +6 -6
- package/app/.next/server/app/api/v1/models/route.js +3 -3
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/route.js +3 -3
- package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__09c944b3._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__134baf4c._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__2f8f5f38._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__31027061._.js +4 -0
- package/app/.next/server/chunks/[root-of-the-server]__3e042fbd._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__7a9b72a4._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__7d9b23e7._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__80e3bfc3._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__84e445b2._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__92cb0def._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__d4563e10._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__d7914418._.js +4 -0
- package/app/.next/server/chunks/[root-of-the-server]__db2f9fe0._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__e27a89bd._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__ebf3fe48._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__f0131d95._.js +4 -0
- package/app/.next/server/chunks/[root-of-the-server]__f31b4656._.js +3 -3
- package/app/.next/server/chunks/[root-of-the-server]__fad1679d._.js +2 -2
- package/app/.next/server/chunks/_05c48915._.js +1 -1
- package/app/.next/server/chunks/_2115d8de._.js +1 -1
- package/app/.next/server/chunks/_3ac953eb._.js +1 -1
- package/app/.next/server/chunks/_4b8fd853._.js +1 -1
- package/app/.next/server/chunks/_68683848._.js +1 -1
- package/app/.next/server/chunks/_ee9b677b._.js +1 -1
- package/app/.next/server/chunks/ssr/[root-of-the-server]__9affb65e._.js +1 -1
- package/app/.next/server/chunks/ssr/[root-of-the-server]__a6942102._.js +1 -1
- package/app/.next/server/chunks/ssr/_19b3d5b1._.js +2 -2
- package/app/.next/server/chunks/ssr/src_ec615d6e._.js +2 -2
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{19b1432393321fcf.js → 1e206030e7793015.js} +1 -1
- package/app/.next/static/chunks/{37e9976d0367faad.js → 3fa6c964786c962d.js} +4 -4
- package/app/CHANGELOG.md +29 -0
- package/app/docs/ARCHITECTURE.md +1 -1
- package/app/docs/VM_DEPLOYMENT_GUIDE.md +2 -0
- package/app/docs/i18n/README.md +9 -17
- package/app/docs/i18n/ar/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/bg/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/da/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/de/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/es/VM_DEPLOYMENT_GUIDE.md +107 -109
- package/app/docs/i18n/fi/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/fr/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/he/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/hu/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/id/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/in/VM_DEPLOYMENT_GUIDE.md +102 -210
- package/app/docs/i18n/it/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/ja/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/ko/VM_DEPLOYMENT_GUIDE.md +109 -111
- package/app/docs/i18n/ms/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/nl/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/no/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/phi/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/pl/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/pt/VM_DEPLOYMENT_GUIDE.md +96 -98
- package/app/docs/i18n/pt-BR/VM_DEPLOYMENT_GUIDE.md +96 -98
- package/app/docs/i18n/ro/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/ru/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/sk/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/sv/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/th/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/uk-UA/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/vi/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/i18n/zh-CN/VM_DEPLOYMENT_GUIDE.md +110 -112
- package/app/docs/openapi.yaml +1 -1
- package/app/package-lock.json +5 -5
- package/app/package.json +1 -1
- package/app/scripts/i18n/generate-multilang.mjs +1 -0
- package/app/src/shared/constants/providers.ts +3 -0
- package/app/src/shared/validation/providerSchema.ts +6 -0
- package/package.json +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__61396d77._.js +0 -4
- package/app/.next/server/chunks/[root-of-the-server]__d5ecc2ba._.js +0 -4
- package/app/.next/server/chunks/[root-of-the-server]__daa26645._.js +0 -4
- /package/app/.next/static/{IiXcm5VJcOKrDneQQSdf- → Ys6bRJXPNt8j-MKOjvZwp}/_buildManifest.js +0 -0
- /package/app/.next/static/{IiXcm5VJcOKrDneQQSdf- → Ys6bRJXPNt8j-MKOjvZwp}/_clientMiddlewareManifest.json +0 -0
- /package/app/.next/static/{IiXcm5VJcOKrDneQQSdf- → Ys6bRJXPNt8j-MKOjvZwp}/_ssgManifest.js +0 -0
|
@@ -1,73 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
# OmniRoute — คู่มือการปรับใช้บน VM พร้อม Cloudflare
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
# OmniRoute — Guia de Deploy em VM com Cloudflare
|
|
3
|
+
🌐 **Languages:** 🇺🇸 [English](../../VM_DEPLOYMENT_GUIDE.md) | 🇧🇷 [Português (Brasil)](../pt-BR/VM_DEPLOYMENT_GUIDE.md) | 🇪🇸 [Español](../es/VM_DEPLOYMENT_GUIDE.md) | 🇫🇷 [Français](../fr/VM_DEPLOYMENT_GUIDE.md) | 🇮🇹 [Italiano](../it/VM_DEPLOYMENT_GUIDE.md) | 🇷🇺 [Русский](../ru/VM_DEPLOYMENT_GUIDE.md) | 🇨🇳 [中文 (简体)](../zh-CN/VM_DEPLOYMENT_GUIDE.md) | 🇩🇪 [Deutsch](../de/VM_DEPLOYMENT_GUIDE.md) | 🇮🇳 [हिन्दी](../in/VM_DEPLOYMENT_GUIDE.md) | 🇹🇭 [ไทย](../th/VM_DEPLOYMENT_GUIDE.md) | 🇺🇦 [Українська](../uk-UA/VM_DEPLOYMENT_GUIDE.md) | 🇸🇦 [العربية](../ar/VM_DEPLOYMENT_GUIDE.md) | 🇯🇵 [日本語](../ja/VM_DEPLOYMENT_GUIDE.md) | 🇻🇳 [Tiếng Việt](../vi/VM_DEPLOYMENT_GUIDE.md) | 🇧🇬 [Български](../bg/VM_DEPLOYMENT_GUIDE.md) | 🇩🇰 [Dansk](../da/VM_DEPLOYMENT_GUIDE.md) | 🇫🇮 [Suomi](../fi/VM_DEPLOYMENT_GUIDE.md) | 🇮🇱 [עברית](../he/VM_DEPLOYMENT_GUIDE.md) | 🇭🇺 [Magyar](../hu/VM_DEPLOYMENT_GUIDE.md) | 🇮🇩 [Bahasa Indonesia](../id/VM_DEPLOYMENT_GUIDE.md) | 🇰🇷 [한국어](../ko/VM_DEPLOYMENT_GUIDE.md) | 🇲🇾 [Bahasa Melayu](../ms/VM_DEPLOYMENT_GUIDE.md) | 🇳🇱 [Nederlands](../nl/VM_DEPLOYMENT_GUIDE.md) | 🇳🇴 [Norsk](../no/VM_DEPLOYMENT_GUIDE.md) | 🇵🇹 [Português (Portugal)](../pt/VM_DEPLOYMENT_GUIDE.md) | 🇷🇴 [Română](../ro/VM_DEPLOYMENT_GUIDE.md) | 🇵🇱 [Polski](../pl/VM_DEPLOYMENT_GUIDE.md) | 🇸🇰 [Slovenčina](../sk/VM_DEPLOYMENT_GUIDE.md) | 🇸🇪 [Svenska](../sv/VM_DEPLOYMENT_GUIDE.md) | 🇵🇭 [Filipino](../phi/VM_DEPLOYMENT_GUIDE.md) | 🇨🇿 [Čeština](../cs/VM_DEPLOYMENT_GUIDE.md)
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
คำแนะนำฉบับสมบูรณ์ในการติดตั้งและกำหนดค่า OmniRoute บน VM (VPS) ด้วยโดเมนที่จัดการผ่าน Cloudflare
|
|
8
6
|
|
|
9
7
|
---
|
|
10
8
|
|
|
11
|
-
##
|
|
9
|
+
## ข้อกำหนดเบื้องต้น
|
|
12
10
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
11
|
+
| รายการ | ขั้นต่ำ | แนะนำ |
|
|
12
|
+
| ------------------ | -------------------------- | ----------------- |
|
|
13
|
+
| **ซีพียู** | 1 vCPU | 2 vCPU |
|
|
14
|
+
| **แรม** | 1 กิกะไบต์ | 2 กิกะไบต์ |
|
|
15
|
+
| **ดิสก์** | SSD 10GB | 25 GB SSD |
|
|
16
|
+
| **ระบบปฏิบัติการ** | อูบุนตู 22.04 LTS | อูบุนตู 24.04 LTS |
|
|
17
|
+
| **โดเมน** | ลงทะเบียนบน Cloudflare | — |
|
|
18
|
+
| **นักเทียบท่า** | นักเทียบท่าเครื่องยนต์ 24+ | นักเทียบท่า 27+ |
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
**ผู้ให้บริการที่ผ่านการทดสอบ**: Akamai (Linode), DigitalOcean, Vultr, Hetzner, AWS Lightsail
|
|
23
21
|
|
|
24
22
|
---
|
|
25
23
|
|
|
26
|
-
## 1.
|
|
24
|
+
## 1. กำหนดค่า VM
|
|
27
25
|
|
|
28
|
-
### 1.1
|
|
26
|
+
### 1.1 สร้างอินสแตนซ์
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
บนผู้ให้บริการ VPS ที่คุณต้องการ:
|
|
31
29
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
30
|
+
- เลือก Ubuntu 24.04 LTS
|
|
31
|
+
- เลือกแผนขั้นต่ำ (1 vCPU / 1 GB RAM)
|
|
32
|
+
- ตั้งรหัสผ่านรูทที่รัดกุมหรือกำหนดค่าคีย์ SSH
|
|
33
|
+
- หมายเหตุ **IP สาธารณะ** (เช่น `203.0.113.10`)
|
|
36
34
|
|
|
37
|
-
### 1.2
|
|
35
|
+
### 1.2 เชื่อมต่อผ่าน SSH
|
|
38
36
|
|
|
39
37
|
```bash
|
|
40
38
|
ssh root@203.0.113.10
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-
### 1.3
|
|
41
|
+
### 1.3 อัพเดตระบบ
|
|
44
42
|
|
|
45
43
|
```bash
|
|
46
44
|
apt update && apt upgrade -y
|
|
47
45
|
```
|
|
48
46
|
|
|
49
|
-
### 1.4
|
|
47
|
+
### 1.4 ติดตั้งนักเทียบท่า
|
|
50
48
|
|
|
51
49
|
```bash
|
|
52
|
-
#
|
|
50
|
+
# Install dependencies
|
|
53
51
|
apt install -y ca-certificates curl gnupg
|
|
54
52
|
|
|
55
|
-
#
|
|
53
|
+
# Add official Docker repository
|
|
56
54
|
install -m 0755 -d /etc/apt/keyrings
|
|
57
55
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
|
58
56
|
chmod a+r /etc/apt/keyrings/docker.gpg
|
|
59
|
-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo
|
|
57
|
+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $ (. /etc/os-release && echo “$VERSION_CODENAME”) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
60
58
|
apt update
|
|
61
59
|
apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
|
62
60
|
```
|
|
63
61
|
|
|
64
|
-
### 1.5
|
|
62
|
+
### 1.5 ติดตั้ง nginx
|
|
65
63
|
|
|
66
64
|
```bash
|
|
67
65
|
apt install -y nginx
|
|
68
66
|
```
|
|
69
67
|
|
|
70
|
-
### 1.6
|
|
68
|
+
### 1.6 กำหนดค่าไฟร์วอลล์ (UFW)
|
|
71
69
|
|
|
72
70
|
```bash
|
|
73
71
|
ufw default deny incoming
|
|
@@ -78,29 +76,29 @@ ufw allow 443/tcp # HTTPS
|
|
|
78
76
|
ufw enable
|
|
79
77
|
```
|
|
80
78
|
|
|
81
|
-
>
|
|
79
|
+
> **เคล็ดลับ**: เพื่อความปลอดภัยสูงสุด จำกัดพอร์ต 80 และ 443 ไว้เฉพาะ IP ของ Cloudflare เท่านั้น ดูส่วน [Advanced Security](#advanced-security)
|
|
82
80
|
|
|
83
81
|
---
|
|
84
82
|
|
|
85
|
-
## 2.
|
|
83
|
+
## 2. ติดตั้ง OmniRoute
|
|
86
84
|
|
|
87
|
-
### 2.1
|
|
85
|
+
### 2.1 สร้างไดเร็กทอรีการกำหนดค่า
|
|
88
86
|
|
|
89
87
|
```bash
|
|
90
88
|
mkdir -p /opt/omniroute
|
|
91
89
|
```
|
|
92
90
|
|
|
93
|
-
### 2.2
|
|
91
|
+
### 2.2 สร้างไฟล์ตัวแปรสภาพแวดล้อม
|
|
94
92
|
|
|
95
93
|
```bash
|
|
96
|
-
cat > /opt/omniroute/.env <<
|
|
97
|
-
# ===
|
|
98
|
-
JWT_SECRET=
|
|
99
|
-
INITIAL_PASSWORD=
|
|
100
|
-
API_KEY_SECRET=
|
|
101
|
-
STORAGE_ENCRYPTION_KEY=
|
|
94
|
+
cat > /opt/omniroute/.env << ‘EOF’
|
|
95
|
+
# === Security ===
|
|
96
|
+
JWT_SECRET=CHANGE-TO-A-UNIQUE-64-CHAR-SECRET-KEY
|
|
97
|
+
INITIAL_PASSWORD=YourSecurePassword123!
|
|
98
|
+
API_KEY_SECRET=REPLACE-WITH-ANOTHER-SECRET-KEY
|
|
99
|
+
STORAGE_ENCRYPTION_KEY=REPLACE-WITH-THIRD-SECRET-KEY
|
|
102
100
|
STORAGE_ENCRYPTION_KEY_VERSION=v1
|
|
103
|
-
MACHINE_ID_SALT=
|
|
101
|
+
MACHINE_ID_SALT=CHANGE-TO-A-UNIQUE-SALT
|
|
104
102
|
|
|
105
103
|
# === App ===
|
|
106
104
|
PORT=20128
|
|
@@ -112,19 +110,19 @@ ENABLE_REQUEST_LOGS=true
|
|
|
112
110
|
AUTH_COOKIE_SECURE=false
|
|
113
111
|
REQUIRE_API_KEY=false
|
|
114
112
|
|
|
115
|
-
# === Domain (
|
|
113
|
+
# === Domain (change to your domain) ===
|
|
116
114
|
BASE_URL=https://llms.seudominio.com
|
|
117
115
|
NEXT_PUBLIC_BASE_URL=https://llms.seudominio.com
|
|
118
116
|
|
|
119
|
-
# === Cloud Sync (
|
|
117
|
+
# === Cloud Sync (optional) ===
|
|
120
118
|
# CLOUD_URL=https://cloud.omniroute.online
|
|
121
119
|
# NEXT_PUBLIC_CLOUD_URL=https://cloud.omniroute.online
|
|
122
120
|
EOF
|
|
123
121
|
```
|
|
124
122
|
|
|
125
|
-
> ⚠️
|
|
123
|
+
> ⚠️ **สำคัญ**: สร้างคีย์ลับที่ไม่ซ้ำใคร! ใช้ `openssl rand -hex 32` สำหรับแต่ละคีย์
|
|
126
124
|
|
|
127
|
-
### 2.3
|
|
125
|
+
### 2.3 เริ่มคอนเทนเนอร์
|
|
128
126
|
|
|
129
127
|
```bash
|
|
130
128
|
docker pull diegosouzapw/omniroute:latest
|
|
@@ -138,45 +136,45 @@ docker run -d \
|
|
|
138
136
|
diegosouzapw/omniroute:latest
|
|
139
137
|
```
|
|
140
138
|
|
|
141
|
-
### 2.4
|
|
139
|
+
### 2.4 ตรวจสอบว่ามันกำลังทำงานอยู่
|
|
142
140
|
|
|
143
141
|
```bash
|
|
144
142
|
docker ps | grep omniroute
|
|
145
143
|
docker logs omniroute --tail 20
|
|
146
144
|
```
|
|
147
145
|
|
|
148
|
-
|
|
146
|
+
ควรแสดง: `[DB] SQLite database ready` และ `listening on port 20128`
|
|
149
147
|
|
|
150
148
|
---
|
|
151
149
|
|
|
152
|
-
## 3.
|
|
150
|
+
## 3. กำหนดค่า nginx (Reverse Proxy)
|
|
153
151
|
|
|
154
|
-
### 3.1
|
|
152
|
+
### 3.1 สร้างใบรับรอง SSL (Cloudflare Origin)
|
|
155
153
|
|
|
156
|
-
|
|
154
|
+
ในแดชบอร์ด Cloudflare:
|
|
157
155
|
|
|
158
|
-
1.
|
|
159
|
-
2.
|
|
160
|
-
3.
|
|
161
|
-
4.
|
|
156
|
+
1. ไปที่ **SSL/TLS → เซิร์ฟเวอร์ต้นทาง**
|
|
157
|
+
2. คลิก **สร้างใบรับรอง**
|
|
158
|
+
3. คงค่าเริ่มต้นไว้ (15 ปี \*.yourdomain.com)
|
|
159
|
+
4. คัดลอก **Origin Certificate** และ **Private Key**
|
|
162
160
|
|
|
163
161
|
```bash
|
|
164
162
|
mkdir -p /etc/nginx/ssl
|
|
165
163
|
|
|
166
|
-
#
|
|
164
|
+
# Paste the certificate
|
|
167
165
|
nano /etc/nginx/ssl/origin.crt
|
|
168
166
|
|
|
169
|
-
#
|
|
167
|
+
# Paste the private key
|
|
170
168
|
nano /etc/nginx/ssl/origin.key
|
|
171
169
|
|
|
172
170
|
chmod 600 /etc/nginx/ssl/origin.key
|
|
173
171
|
```
|
|
174
172
|
|
|
175
|
-
### 3.2
|
|
173
|
+
### 3.2 การกำหนดค่า Nginx
|
|
176
174
|
|
|
177
175
|
```bash
|
|
178
|
-
cat > /etc/nginx/sites-available/omniroute <<
|
|
179
|
-
# Default server —
|
|
176
|
+
cat > /etc/nginx/sites-available/omniroute << ‘NGINX’
|
|
177
|
+
# Default server — blocks direct access via IP
|
|
180
178
|
server {
|
|
181
179
|
listen 80 default_server;
|
|
182
180
|
listen [::]:80 default_server;
|
|
@@ -192,7 +190,7 @@ server {
|
|
|
192
190
|
server {
|
|
193
191
|
listen 443 ssl;
|
|
194
192
|
listen [::]:443 ssl;
|
|
195
|
-
server_name llms.
|
|
193
|
+
server_name llms.yourdomain.com; # Change to your domain
|
|
196
194
|
|
|
197
195
|
ssl_certificate /etc/nginx/ssl/origin.crt;
|
|
198
196
|
ssl_certificate_key /etc/nginx/ssl/origin.key;
|
|
@@ -210,7 +208,7 @@ server {
|
|
|
210
208
|
# WebSocket support
|
|
211
209
|
proxy_http_version 1.1;
|
|
212
210
|
proxy_set_header Upgrade $http_upgrade;
|
|
213
|
-
proxy_set_header Connection
|
|
211
|
+
proxy_set_header Connection “upgrade”;
|
|
214
212
|
|
|
215
213
|
# SSE (Server-Sent Events) — streaming AI responses
|
|
216
214
|
proxy_buffering off;
|
|
@@ -224,61 +222,61 @@ server {
|
|
|
224
222
|
server {
|
|
225
223
|
listen 80;
|
|
226
224
|
listen [::]:80;
|
|
227
|
-
server_name llms.
|
|
225
|
+
server_name llms.yourdomain.com;
|
|
228
226
|
return 301 https://$server_name$request_uri;
|
|
229
227
|
}
|
|
230
228
|
NGINX
|
|
231
229
|
```
|
|
232
230
|
|
|
233
|
-
### 3.3
|
|
231
|
+
### 3.3 เปิดใช้งานและทดสอบ
|
|
234
232
|
|
|
235
233
|
```bash
|
|
236
|
-
#
|
|
234
|
+
# Remove default configuration
|
|
237
235
|
rm -f /etc/nginx/sites-enabled/default
|
|
238
236
|
|
|
239
|
-
#
|
|
237
|
+
# Enable OmniRoute
|
|
240
238
|
ln -sf /etc/nginx/sites-available/omniroute /etc/nginx/sites-enabled/omniroute
|
|
241
239
|
|
|
242
|
-
#
|
|
240
|
+
# Test and reload
|
|
243
241
|
nginx -t && systemctl reload nginx
|
|
244
242
|
```
|
|
245
243
|
|
|
246
244
|
---
|
|
247
245
|
|
|
248
|
-
## 4.
|
|
246
|
+
## 4. กำหนดค่า Cloudflare DNS
|
|
249
247
|
|
|
250
|
-
### 4.1
|
|
248
|
+
### 4.1 เพิ่มบันทึก DNS
|
|
251
249
|
|
|
252
|
-
|
|
250
|
+
ในแดชบอร์ด Cloudflare → DNS:
|
|
253
251
|
|
|
254
|
-
|
|
|
255
|
-
|
|
|
256
|
-
|
|
|
252
|
+
| พิมพ์ | ชื่อ | เนื้อหา | หนังสือมอบฉันทะ |
|
|
253
|
+
| ----- | ------ | ---------------------- | --------------- |
|
|
254
|
+
| ก | `llms` | `203.0.113.10` (VM IP) | ✅ พร็อกซี |
|
|
257
255
|
|
|
258
|
-
### 4.2
|
|
256
|
+
### 4.2 กำหนดค่า SSL
|
|
259
257
|
|
|
260
|
-
|
|
258
|
+
ภายใต้ **SSL/TLS → ภาพรวม**:
|
|
261
259
|
|
|
262
|
-
-
|
|
260
|
+
- โหมด: **เต็ม (เข้มงวด)**
|
|
263
261
|
|
|
264
|
-
|
|
262
|
+
ภายใต้ **SSL/TLS → Edge Certificates**:
|
|
265
263
|
|
|
266
|
-
-
|
|
267
|
-
-
|
|
268
|
-
-
|
|
264
|
+
- ใช้ HTTPS เสมอ: ✅ เปิด
|
|
265
|
+
- เวอร์ชัน TLS ขั้นต่ำ: TLS 1.2
|
|
266
|
+
- การเขียน HTTPS อัตโนมัติ: ✅เปิด
|
|
269
267
|
|
|
270
|
-
### 4.3
|
|
268
|
+
### 4.3 การทดสอบ
|
|
271
269
|
|
|
272
270
|
```bash
|
|
273
271
|
curl -sI https://llms.seudominio.com/health
|
|
274
|
-
#
|
|
272
|
+
# Should return HTTP/2 200
|
|
275
273
|
```
|
|
276
274
|
|
|
277
275
|
---
|
|
278
276
|
|
|
279
|
-
## 5.
|
|
277
|
+
## 5. การดำเนินงานและการบำรุงรักษา
|
|
280
278
|
|
|
281
|
-
###
|
|
279
|
+
### อัปเกรดเป็นเวอร์ชันใหม่
|
|
282
280
|
|
|
283
281
|
```bash
|
|
284
282
|
docker pull diegosouzapw/omniroute:latest
|
|
@@ -290,42 +288,42 @@ docker run -d --name omniroute --restart unless-stopped \
|
|
|
290
288
|
diegosouzapw/omniroute:latest
|
|
291
289
|
```
|
|
292
290
|
|
|
293
|
-
###
|
|
291
|
+
### ดูบันทึก
|
|
294
292
|
|
|
295
293
|
```bash
|
|
296
|
-
docker logs -f omniroute #
|
|
297
|
-
docker logs omniroute --tail 50 #
|
|
294
|
+
docker logs -f omniroute # Real-time stream
|
|
295
|
+
docker logs omniroute --tail 50 # Last 50 lines
|
|
298
296
|
```
|
|
299
297
|
|
|
300
|
-
###
|
|
298
|
+
### สำรองฐานข้อมูลด้วยตนเอง
|
|
301
299
|
|
|
302
300
|
```bash
|
|
303
|
-
#
|
|
301
|
+
# Copy data from the volume to the host
|
|
304
302
|
docker cp omniroute:/app/data ./backup-$(date +%F)
|
|
305
303
|
|
|
306
|
-
#
|
|
304
|
+
# Or compress the entire volume
|
|
307
305
|
docker run --rm -v omniroute-data:/data -v $(pwd):/backup \
|
|
308
306
|
alpine tar czf /backup/omniroute-data-$(date +%F).tar.gz /data
|
|
309
307
|
```
|
|
310
308
|
|
|
311
|
-
###
|
|
309
|
+
### กู้คืนจากข้อมูลสำรอง
|
|
312
310
|
|
|
313
311
|
```bash
|
|
314
312
|
docker stop omniroute
|
|
315
313
|
docker run --rm -v omniroute-data:/data -v $(pwd):/backup \
|
|
316
|
-
alpine sh -c
|
|
314
|
+
alpine sh -c “rm -rf /data/* && tar xzf /backup/omniroute-data-YYYY-MM-DD.tar.gz -C /”
|
|
317
315
|
docker start omniroute
|
|
318
316
|
```
|
|
319
317
|
|
|
320
318
|
---
|
|
321
319
|
|
|
322
|
-
## 6.
|
|
320
|
+
## 6. การรักษาความปลอดภัยขั้นสูง
|
|
323
321
|
|
|
324
|
-
###
|
|
322
|
+
### จำกัด nginx ไว้ที่ IP ของ Cloudflare
|
|
325
323
|
|
|
326
324
|
```bash
|
|
327
|
-
cat > /etc/nginx/cloudflare-ips.conf <<
|
|
328
|
-
# Cloudflare IPv4 ranges —
|
|
325
|
+
cat > /etc/nginx/cloudflare-ips.conf << ‘CF’
|
|
326
|
+
# Cloudflare IPv4 ranges — update periodically
|
|
329
327
|
# https://www.cloudflare.com/ips-v4/
|
|
330
328
|
set_real_ip_from 173.245.48.0/20;
|
|
331
329
|
set_real_ip_from 103.21.244.0/22;
|
|
@@ -346,58 +344,58 @@ real_ip_header CF-Connecting-IP;
|
|
|
346
344
|
CF
|
|
347
345
|
```
|
|
348
346
|
|
|
349
|
-
|
|
347
|
+
เพิ่มสิ่งต่อไปนี้ใน `nginx.conf` ภายในบล็อก `http {}`:
|
|
350
348
|
|
|
351
349
|
```nginx
|
|
352
350
|
include /etc/nginx/cloudflare-ips.conf;
|
|
353
351
|
```
|
|
354
352
|
|
|
355
|
-
###
|
|
353
|
+
### ติดตั้ง Fail2ban
|
|
356
354
|
|
|
357
355
|
```bash
|
|
358
356
|
apt install -y fail2ban
|
|
359
357
|
systemctl enable fail2ban
|
|
360
358
|
systemctl start fail2ban
|
|
361
359
|
|
|
362
|
-
#
|
|
360
|
+
# Check status
|
|
363
361
|
fail2ban-client status sshd
|
|
364
362
|
```
|
|
365
363
|
|
|
366
|
-
###
|
|
364
|
+
### บล็อกการเข้าถึงพอร์ต Docker โดยตรง
|
|
367
365
|
|
|
368
366
|
```bash
|
|
369
|
-
#
|
|
367
|
+
# Prevent direct external access to port 20128
|
|
370
368
|
iptables -I DOCKER-USER -p tcp --dport 20128 -j DROP
|
|
371
369
|
iptables -I DOCKER-USER -i lo -p tcp --dport 20128 -j ACCEPT
|
|
372
370
|
|
|
373
|
-
#
|
|
371
|
+
# Persist the rules
|
|
374
372
|
apt install -y iptables-persistent
|
|
375
373
|
netfilter-persistent save
|
|
376
374
|
```
|
|
377
375
|
|
|
378
376
|
---
|
|
379
377
|
|
|
380
|
-
## 7.
|
|
378
|
+
## 7. ปรับใช้กับ Cloudflare Workers (ไม่บังคับ)
|
|
381
379
|
|
|
382
|
-
|
|
380
|
+
สำหรับการเข้าถึงระยะไกลผ่าน Cloudflare Workers (โดยไม่ต้องเปิดเผย VM โดยตรง):
|
|
383
381
|
|
|
384
382
|
```bash
|
|
385
|
-
#
|
|
383
|
+
# In the local repository
|
|
386
384
|
cd omnirouteCloud
|
|
387
385
|
npm install
|
|
388
386
|
npx wrangler login
|
|
389
387
|
npx wrangler deploy
|
|
390
388
|
```
|
|
391
389
|
|
|
392
|
-
|
|
390
|
+
ดูเอกสารฉบับเต็มได้ที่ [omnirouteCloud/README.md](../omnirouteCloud/README.md)
|
|
393
391
|
|
|
394
392
|
---
|
|
395
393
|
|
|
396
|
-
##
|
|
394
|
+
## สรุปพอร์ต
|
|
397
395
|
|
|
398
|
-
|
|
|
399
|
-
| ----- | ----------- |
|
|
400
|
-
| 22 |
|
|
401
|
-
| 80 | nginx HTTP |
|
|
402
|
-
| 443 | nginx HTTPS |
|
|
403
|
-
| 20128 | OmniRoute |
|
|
396
|
+
| พอร์ต | บริการ | เข้าถึง |
|
|
397
|
+
| ----- | ----------- | ------------------------------- |
|
|
398
|
+
| 22 | เอสเอสเอช | สาธารณะ (พร้อม Fail2ban) |
|
|
399
|
+
| 80 | nginx HTTP | เปลี่ยนเส้นทาง → HTTPS |
|
|
400
|
+
| 443 | nginx HTTPS | ผ่าน Cloudflare Proxy |
|
|
401
|
+
| 20128 | OmniRoute | Localhost เท่านั้น (ผ่าน nginx) |
|