Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the ncproxy component to use HAProxy instead of nginx as the underlying proxy server. The change involves replacing nginx-specific configuration templates, updating the service logic, and adapting the Docker setup accordingly.
Key changes:
- Replaced nginx with HAProxy in the nproxy Docker container (Dockerfile and entrypoint)
- Refactored ncproxy configuration generation from nginx to HAProxy syntax
- Introduced a new logger subsystem to receive HAProxy syslog messages via Unix socket
- Updated CLI to use
--haproxy-dirflag with backward-compatible--nginx-diralias
Reviewed changes
Copilot reviewed 1 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docker-compose.yaml | Added image tags for nproxy and ndns services |
| bin/nproxy/entrypoint.sh | Updated entrypoint script to use HAProxy commands and configuration paths |
| bin/nproxy/Dockerfile | Replaced nginx packages with haproxy package installation |
| bin/ncproxy/src/utils/rule.rs | Renamed NginxRuleKind to ProxyRuleKind, updated SSL config handling for HAProxy's combined PEM file requirements, and adjusted upstream backend generation |
| bin/ncproxy/src/utils/resource.rs | Changed from nginx::add_rule to haproxy::add_rule |
| bin/ncproxy/src/utils/nginx.rs | Deprecated nginx module, replaced with placeholder comment |
| bin/ncproxy/src/utils/mod.rs | Replaced nginx module export with haproxy module, updated test configuration |
| bin/ncproxy/src/utils/haproxy.rs | New HAProxy configuration manager implementing config generation, testing, and reload functionality with multi-file config structure |
| bin/ncproxy/src/subsystem/mod.rs | Added logger module import |
| bin/ncproxy/src/subsystem/metric.rs | Added HAProxy httplog format parser as fallback for metric collection |
| bin/ncproxy/src/subsystem/logger.rs | New Unix datagram socket-based syslog receiver for HAProxy log persistence |
| bin/ncproxy/src/subsystem/init.rs | Integrated logger spawning and updated to use haproxy_dir |
| bin/ncproxy/src/subsystem/event.rs | Updated comments and function calls from nginx to haproxy |
| bin/ncproxy/src/services/rule.rs | Updated rule apply/remove calls from nginx to haproxy functions |
| bin/ncproxy/src/models/templates/upstream.conf | Converted nginx upstream block to HAProxy backend configuration |
| bin/ncproxy/src/models/templates/unix_upstream.conf | Converted unix socket upstream to HAProxy backend with unix@ syntax |
| bin/ncproxy/src/models/templates/stream.conf | Converted nginx stream server to HAProxy frontend with tcp mode |
| bin/ncproxy/src/models/templates/nginx.conf | Deprecated nginx global template, replaced with reference comment |
| bin/ncproxy/src/models/templates/http.conf | Converted nginx virtual host configuration to HAProxy ACL-based routing snippets |
| bin/ncproxy/src/models/templates/haproxy.cfg | New HAProxy global configuration template with syslog socket logging |
| bin/ncproxy/src/models/template.rs | Updated CONF_TEMPLATE to reference haproxy.cfg |
| bin/ncproxy/src/models/system.rs | Updated SystemState and EventEmitter to use haproxy_dir and pass state_dir for reload |
| bin/ncproxy/src/models/store.rs | Renamed NginxRuleKind to ProxyRuleKind, updated directory paths from sites-* to routes-* |
| bin/ncproxy/src/main.rs | Updated documentation comments from nginx to HAProxy |
| bin/ncproxy/src/cli.rs | Renamed nginx_dir to haproxy_dir with backward-compatible nginx-dir alias |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## nightly #1345 +/- ##
===========================================
- Coverage 63.50% 62.42% -1.09%
===========================================
Files 285 286 +1
Lines 16193 17026 +833
===========================================
+ Hits 10284 10629 +345
- Misses 5909 6397 +488
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.