Commit graph

18 commits

Author SHA1 Message Date
792825f682
major overhaul to use more C for snmp, may not be stable 2026-02-09 12:31:41 -06:00
5811bed1b1
Add needed packages to Dockerfile 2026-02-04 08:02:59 -06:00
6f1261b0ce
bump rust version and crates 2026-02-04 07:54:12 -06:00
0f19518065
snmpv3 first stab 2026-02-03 16:46:19 -06:00
d24c712ed8
bump rust version 2026-02-02 17:14:28 -06:00
be054323a6
more caching in github ci 2026-01-31 16:53:25 -06:00
cf08b0589b
cleanup 2026-01-24 12:43:24 -06:00
ee7ce7fe00
feat: use system ping instead of raw ICMP sockets
- Replace raw ICMP socket implementation with system ping command
- Add regex-lite dependency for parsing ping output
- Add tokio process feature for async command execution
- Support macOS and Linux ping output formats
- Add iputils to Dockerfile for setuid-root ping
- Remove socket2 dependency (no longer needed)

This eliminates the need for CAP_NET_RAW capability in containers.
2026-01-21 13:11:24 -06:00
c0fe57cd44
fix: properly inject version into Docker image builds
The agent version was always showing 0.1.0 because build.rs tried to
run 'git describe' inside the Docker build, but .git directory wasn't
copied into the image.

Changes:
- Add VERSION build arg to Dockerfile
- Pass VERSION as env var to cargo build commands
- Update GitLab CI to pass --build-arg VERSION
- Modify build.rs to prefer BUILD_VERSION env var over git commands

This ensures the version displayed by the agent matches the Docker
image tag it was built with.
2026-01-19 15:31:26 -06:00
570a37ffc0
Switch from native-tls to rustls for WebSocket TLS
- Removes OpenSSL dependency entirely
- Uses pure Rust TLS implementation (rustls)
- Simplifies Docker build (no OpenSSL packages needed)
- Fixes Alpine musl build compatibility issues
2026-01-16 17:43:53 -06:00
677c948f31
Add OpenSSL build dependencies to Dockerfile
Fixes build failure caused by missing openssl-dev and openssl-libs-static
packages needed for compiling tokio-tungstenite with native-tls feature
2026-01-16 17:41:11 -06:00
824f4388eb
Add automatic self-update capability to agent
The agent now checks for updates every hour and automatically updates
itself when a new version is available on Docker Hub.

Features:
- Periodic update checks (hourly via scheduler)
- Automatic Docker image pull when update available
- Graceful exit and restart with new version
- Non-blocking, runs in background task
- Requires Docker socket mount for self-update

Changes:
- Add UpdateInfo struct and get_update_info() function
- Add perform_self_update() to pull new image and restart
- Add update check ticker to scheduler (hourly)
- Include docker-cli in Dockerfile runtime stage
- Update docker-compose.example.yml with socket mount
- Update README and CLAUDE.md with auto-update docs

The agent will log update status:
- "Already running latest version" - no action
- "Performing self-update: X -> Y" - pulling new image
- "Exiting to allow restart with new version" - restarting

Requires:
- Docker socket mounted: /var/run/docker.sock:/var/run/docker.sock
- restart: unless-stopped in docker-compose (to restart after exit)
2026-01-14 16:50:32 -06:00
7e2e50a764
Fix Docker permissions with automatic entrypoint script
The Docker container now handles data directory permissions automatically
without requiring manual user setup.

Changes:
- Added entrypoint.sh script that runs as root, fixes /data permissions,
  then drops to non-root user (towerops) using su-exec
- Updated Dockerfile to install su-exec and use the entrypoint script
- Container starts as root but immediately drops privileges after fixing
  permissions

The agent will now start successfully with just 'docker-compose up -d'
without users needing to run chown commands manually.
2026-01-14 09:36:45 -06:00
2b1d779279
Add multi-architecture build support (amd64, arm64) 2026-01-13 14:07:21 -06:00
82f97deeb2
Add protobuf compiler to CI and Docker build 2026-01-13 13:55:12 -06:00
fd1b02a6ea
update ci rust version 2026-01-09 13:36:10 -06:00
125b0f427e
update ci rust version 2026-01-09 13:34:43 -06:00
0f8cfc34e7
init 2026-01-09 13:22:15 -06:00