Skip to content

إعداد الخادم

ملف الإعداد

الموقع الافتراضي: نفس مجلد الملف التنفيذي (config.yml) أو يُحدد بـ --config.

yaml
server:
  domain: "tunnel.example.com"   # نطاقك
  control_port: 8222             # منفذ اتصالات CLI
  http_port: 8223                # منفذ وكيل HTTP

storage:
  database: "/etc/unne/unne.db"  # مسار قاعدة بيانات SQLite

logging:
  file_path: "/var/log/unne/server.log"

admin:
  enabled: true                  # تفعيل لوحة الإدارة
  port: 4041                     # منفذ لوحة الإدارة
  session_ttl: "24h"             # مدة جلسة الإدارة

أوامر الإعداد بنمط Git

اقرأ وعدّل قيم الإعداد دون تحرير YAML يدوياً:

bash
# الحصول على قيمة
unns config get server.domain
# → tunnel.example.com

# تعيين قيمة
unns config set server.domain newtunnel.example.com

# سرد جميع القيم
unns config list
# → server.domain = tunnel.example.com
# → server.control_port = 8222
# → server.http_port = 8223
# → storage.database = /etc/unne/unne.db
# → ...

مسار إعداد مخصص

bash
unns --config /path/to/config.yml

مرجع الإعدادات

المفتاحالنوعالافتراضيالوصف
server.domainstringنطاق الخادم للنطاقات الفرعية
server.control_portint8222منفذ اتصال CLI
server.http_portint8223منفذ وكيل HTTP
storage.databasestring/etc/unne/unne.dbمسار قاعدة بيانات SQLite
logging.file_pathstringمسار ملف السجل
admin.enabledbooltrueتفعيل لوحة الإدارة
admin.portint4041منفذ لوحة الإدارة
admin.session_ttlstring24hمدة جلسة الإدارة

Released under the MIT License.