Add advanced networking: port ranges/UDP, DNS search/opt, IPAM config, connection inspection - #11
Merged
Merged
Conversation
…, connection inspection Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>
…x DNS nameservers behavior Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add configurable port forwarding and robust DNS features
Add advanced networking: port ranges/UDP, DNS search/opt, IPAM config, connection inspection
Aug 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends ComposeEngine’s networking support by enhancing port spec parsing (UDP + ranges), adding DNS search/options fields to the service model and container configuration, introducing IPAM fields on network configs, and adding a new API to inspect live container connections.
Changes:
- Updated
parsePortSpecto return multiplePublishPortentries, supporting protocol suffixes and port ranges. - Added
dns_search/dns_opttoServiceConfigand wired them intoContainerConfiguration.DNSConfiguration. - Added
NetworkConfig.ipammodel types and tests, plus a newinspectConnections(project:)API for connection snapshots.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Tests/ComposeEngineTests/ComposeEngineTests.swift | Adds/updates tests for UDP + ranged ports, DNS search/options decoding, and IPAM decoding. |
| Sources/ComposeEngine/Models/ComposeModels.swift | Extends Compose model types with DNS search/options on services and IPAM config on networks. |
| Sources/ComposeEngine/ComposeOrchestrator.swift | Implements connection inspection API, updates port publishing to consume multiple ports, and wires DNS search/options into container config. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>
djpfs
approved these changes
Aug 14, 2026
Owner
|
@copilot resolve the merge conflicts on this branch. |
Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>
Contributor
Author
djpfs
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements four advanced networking capabilities from issue #7: configurable port forwarding (UDP + ranges), robust internal DNS, IPAM-based custom subnets, and connection inspection.
Port forwarding
parsePortSpecnow returns[PublishPort]and handles protocol suffixes and port ranges:DNS (
dns_search,dns_opt)New fields on
ServiceConfig, wired intoDNSConfiguration.searchDomainsandoptions. A DNS config object is only created when at least one ofdns,dns_search, ordns_optis set; nameservers are never injected implicitly.Custom networks / IPAM
NetworkConfiggains anipamfield (IPAMConfig→[IPAMPool]) for subnet, IP range, and gateway customization:External networks (
external: true+name:) continue to work as before.Connection inspection
New
inspectConnections(project:) async throws -> [ServiceConnections]onComposeOrchestratorreturns each service's liveAttachments andPublishPorts. Containers not yet created (BackendError.notFound) are silently skipped; all other errors propagate.