Update Mihomo configuration and documentation for clarity
Publish telemt-api gateway Docker image / test (push) Successful in 28s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 2m10s

- Revised comments in `config.example.yaml` to enhance understanding of Mihomo integration, including environment variable usage and Docker Compose setup.
- Updated `docker-compose.yml` comments to clarify the relationship between the gateway and Mihomo service.
- Enhanced `GATEWAY_RUN.md` to provide clearer instructions on configuring Mihomo parameters and their usage in the gateway.
This commit is contained in:
Denozordec
2026-03-31 00:54:41 +07:00
parent a24fc90b39
commit ed785cb8f3
6 changed files with 46 additions and 63 deletions
+4 -35
View File
@@ -52,41 +52,10 @@ servers:
base_url: http://127.0.0.1:9091
path_prefix: /v1
# authorization_env: TELEMT_API_AUTH
#
# --- Mihomo (Clash Meta), раздел «Mihomo» в панели (/servers/{alias}/mihomo) ---
# Клиент: GET /api/{alias}/mihomo/… и WebSocket — шлюз проксирует на external-controller с Bearer.
#
# Типичный compose для самого Mihomo (отдельный файл или сервис рядом с gateway):
# mihomo:
# build: ./mihomo
# container_name: mihomo
# environment:
# - SUB_URL=https://example.com/sub
# - CLASH_SECRET=your-secret-here
# - UPDATE_INTERVAL=86400
# # ports: # публиковать 9090 на хост не обязательно для панели
# # - "9080:9090"
# networks:
# proxy-net:
# ipv4_address: 172.20.0.2 # пример; контроллер слушает на 9090 внутри контейнера
#
# Контейнер gateway (telemt-api) должен быть в той же сети proxy-net, чтобы:
# - резолвилось имя сервиса http://mihomo:9090, или
# - использовался IP внутри сети, например http://172.20.0.2:9090
#
# В environment сервиса gateway (не класть секреты в YAML в git):
# MIHOMO_CONTROLLER_URL=http://mihomo:9090
# TELEMT_MIHOMO_AUTH=Bearer <тот же секрет, что CLASH_SECRET у Mihomo>
#
# Вариант A — URL в YAML:
# mihomo_base_url: http://mihomo:9090
# mihomo_authorization_env: TELEMT_MIHOMO_AUTH
#
# Вариант B — URL из env (удобно в compose, без правки смонтированного config.yaml):
# mihomo_base_url_env: MIHOMO_CONTROLLER_URL
# mihomo_authorization_env: TELEMT_MIHOMO_AUTH
#
# Значение mihomo_authorization_env: полная строка заголовка Authorization (как у authorization_env для Telemt).
# Mihomo: тот же compose-сервис (container_name: mihomo, сеть proxy-net, external-controller :9090).
# У процесса/контейнера gateway в environment: TELEMT_MIHOMO_AUTH=Bearer ${CLASH_SECRET} (как у mihomo).
mihomo_base_url: http://172.20.0.2:9090
mihomo_authorization_env: Bearer Ifwrbqifwrbq1995
# ivx: HTTPS + nginx location /api/ → Telemt; base_url должен заканчиваться на /api/
- alias: gt1