209 lines
5.5 KiB
YAML
209 lines
5.5 KiB
YAML
# 配置文件示例(脱敏模板)
|
|
# 使用方式:将此文件复制为 config.yaml 并根据实际环境填写配置项
|
|
# 敏感信息值留空,实际部署时填写
|
|
|
|
# ============================================================
|
|
# 环境标识
|
|
# ============================================================
|
|
environment:
|
|
name: prod # 或 test
|
|
|
|
instance_name: main
|
|
|
|
# ============================================================
|
|
# Redis 连接
|
|
# ============================================================
|
|
redis:
|
|
host: "127.0.0.1"
|
|
port: 6379
|
|
db: 0
|
|
channel_namespace: main
|
|
max_connections: 50
|
|
|
|
# ============================================================
|
|
# 任务配置
|
|
# ============================================================
|
|
tasks:
|
|
max_retry_count: 3
|
|
csv_file: package_list.csv
|
|
|
|
# ============================================================
|
|
# Worker 管理
|
|
# ============================================================
|
|
worker:
|
|
stale_timeout: 9000
|
|
reinit_timeout: 600
|
|
init_monitor_window: 1800
|
|
action_max_parallel: 50
|
|
managed_only_can_dispatch: false
|
|
allowed_ip_patterns:
|
|
- "10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"
|
|
- "172\\.(1[6-9]|2\\d|3[0-1])\\.\\d{1,3}\\.\\d{1,3}"
|
|
- "192\\.168\\.\\d{1,3}\\.\\d{1,3}"
|
|
|
|
# ============================================================
|
|
# SSH / Git
|
|
# ============================================================
|
|
ssh:
|
|
connect_timeout: 10
|
|
action_timeout: 1800
|
|
default_user: admin
|
|
default_password: ""
|
|
default_port: 22
|
|
psexec_session_id: 1
|
|
|
|
git:
|
|
repo_url: "" # 如 //your-file-server/share/autool.git
|
|
|
|
# ============================================================
|
|
# MuMu 模拟器
|
|
# ============================================================
|
|
mumu:
|
|
manager_path: "C:\\Program Files\\Netease\\MuMu\\nx_main\\MuMuManager.exe"
|
|
vm_index: 2
|
|
max_vm_index: 10
|
|
restart_settle_seconds: 15
|
|
recover_script_path: ""
|
|
recover_ahk_exe: ""
|
|
clean_backup_path: ""
|
|
local_import_dir: "D:\\mumu_backups"
|
|
network_bridge_card: "Realtek PCIe GbE Family Controller"
|
|
adb_ip_offset: 100
|
|
bridge_ip_offset: 100
|
|
network_script_path: ""
|
|
network_gateways:
|
|
"192.168.1": "192.168.1.1"
|
|
"192.168.2": "192.168.2.1"
|
|
|
|
# ============================================================
|
|
# 网络共享
|
|
# ============================================================
|
|
share:
|
|
smb_user: ""
|
|
smb_password: ""
|
|
|
|
# ============================================================
|
|
# 日志
|
|
# ============================================================
|
|
logging:
|
|
file: dispatcher.log
|
|
max_bytes: 52428800
|
|
backup_count: 3
|
|
date_format: "%Y-%m-%d %H:%M:%S"
|
|
|
|
# ============================================================
|
|
# 通知(微信 / 企业微信)
|
|
# ============================================================
|
|
notifications:
|
|
wechat_tokens: {}
|
|
wecom_tokens: {}
|
|
|
|
# ============================================================
|
|
# 告警策略
|
|
# ============================================================
|
|
alert:
|
|
window_seconds: 600
|
|
threshold: 30
|
|
cooldown_seconds: 1800
|
|
|
|
# ============================================================
|
|
# 监控
|
|
# ============================================================
|
|
monitoring:
|
|
status_push_interval: 10800
|
|
timezone: Asia/Shanghai
|
|
timeline_bucket_minutes: 15
|
|
|
|
# ============================================================
|
|
# 流水线
|
|
# ============================================================
|
|
pipeline:
|
|
run_option_keys:
|
|
- stop_worker
|
|
- clone_if_missing
|
|
- git_pull
|
|
- setup
|
|
- pull_pcap_files
|
|
- recover_mumu
|
|
- restart_mumu
|
|
- start_worker
|
|
default_options:
|
|
stop_worker: true
|
|
clone_if_missing: false
|
|
git_pull: true
|
|
setup: false
|
|
pull_pcap_files: true
|
|
recover_mumu: false
|
|
restart_mumu: true
|
|
start_worker: true
|
|
auto_reboot_recovery_delay: 120
|
|
legacy_end_worker_ips:
|
|
- "192.168.1.51"
|
|
- "192.168.1.61"
|
|
- "192.168.2.101"
|
|
force_kill_images:
|
|
- OpenConsole.exe
|
|
- WindowsTerminal.exe
|
|
- conhost.exe
|
|
- powershell.exe
|
|
|
|
# ============================================================
|
|
# Dashboard
|
|
# ============================================================
|
|
dashboard:
|
|
host: "0.0.0.0"
|
|
port: 8890
|
|
|
|
# ============================================================
|
|
# 数据分析
|
|
# ============================================================
|
|
analytics:
|
|
traffic_root: ""
|
|
traffic_root_block: ""
|
|
traversal_root: ""
|
|
tpdpi_app_list_file: TPDPI_app_list.csv
|
|
tpdpi_url_lib_file: TPDPI_url_lib.csv
|
|
artifact_wait_seconds: 180
|
|
artifact_file_wait_seconds: 60
|
|
job_poll_seconds: 1
|
|
model_traffic_threshold: 50
|
|
|
|
# ============================================================
|
|
# MinIO / APK 存储
|
|
# ============================================================
|
|
minio:
|
|
enabled: false
|
|
endpoint: ""
|
|
access_key: ""
|
|
secret_key: ""
|
|
bucket: autool-apk
|
|
secure: false
|
|
|
|
apk:
|
|
download_mode: direct # "direct" 或 "smb"
|
|
local_storage_dir: ""
|
|
smb_dir: ""
|
|
us_export_dir: "C:\\mumu_apks"
|
|
us_device_a_serial: "127.0.0.1:7555"
|
|
us_device_b_serial: "127.0.0.1:7556"
|
|
us_device_a_vm_index: 2
|
|
us_device_b_vm_index: 1
|
|
prefetch_poll_interval: 120
|
|
download_queue_interval: 60
|
|
minio_max_bytes: 107374182400
|
|
emulator_cleanup_enabled: true
|
|
|
|
# ============================================================
|
|
# 任务路由 / Worker 清单
|
|
# ============================================================
|
|
task_routing_rules:
|
|
package_name: {}
|
|
task_key: {}
|
|
|
|
worker_inventory:
|
|
- worker_id: "192.168.1.10"
|
|
ssh_target: "192.168.1.10"
|
|
repo_dir: "D:/autool"
|
|
python_exe: python
|
|
tags: []
|