fscan/test/ssh-test-env/docker-compose.yml
ZacharyZcR de286026e8 refactor: 统一插件超时机制实现Context-First架构
- 重构SSH/MySQL/Redis插件超时控制,移除第三方库超时依赖
- 统一使用Go Context超时机制,提升超时控制可靠性和精确度
- 扩展MySQL/Redis/SSH插件默认端口支持,提升扫描覆盖率
- 修复插件系统中ConcurrentScanConfig超时配置缺失问题
- 优化插件检测逻辑,正确识别新架构插件并显示准确状态信息
- 解决插件在错误端口上长时间等待问题,显著提升扫描效率
2025-08-07 14:01:50 +08:00

34 lines
862 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '3.8'
services:
ssh-test-server:
build:
context: .
dockerfile: Dockerfile.ssh-server
container_name: fscan-ssh-test
ports:
# 映射到本地22端口用于测试如果本地22端口被占用可以改为其他端口
- "2222:22"
environment:
- SSH_ENABLE_PASSWORD_AUTH=true
volumes:
# 挂载SSH配置文件
- ./ssh-config/sshd_config:/etc/ssh/sshd_config
# 挂载用户创建脚本
- ./scripts/create-users.sh:/docker-entrypoint-initdb.d/create-users.sh
networks:
- ssh-test-network
restart: unless-stopped
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "22"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
ssh-test-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/24