mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 14:06:44 +08:00

- 重构SSH/MySQL/Redis插件超时控制,移除第三方库超时依赖 - 统一使用Go Context超时机制,提升超时控制可靠性和精确度 - 扩展MySQL/Redis/SSH插件默认端口支持,提升扫描覆盖率 - 修复插件系统中ConcurrentScanConfig超时配置缺失问题 - 优化插件检测逻辑,正确识别新架构插件并显示准确状态信息 - 解决插件在错误端口上长时间等待问题,显著提升扫描效率
34 lines
862 B
YAML
34 lines
862 B
YAML
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 |