Skip to content

feat: support port ranges in --ports, combine with --range, and unify terminal colors (#780) - #961

Open
dest4590 wants to merge 2 commits into
bee-san:masterfrom
dest4590:feat/port-ranges-and-cleanup
Open

dest4590 wants to merge 2 commits into
bee-san:masterfrom
dest4590:feat/port-ranges-and-cleanup

Conversation

@dest4590

Copy link
Copy Markdown

Resolves #780.

Two main things in this PR:

  1. Port ranges in -p/--ports and --range coexistence

    • -p and --exclude-ports now accept ranges and mixed input like -p 80,443,8000-8080,9000.
    • Dropped conflicts_with = "ports" from --range. If both flags are passed, ports are merged and deduplicated in order.
    • Added unit tests for mixed range parsing and strategy picking.
  2. Clean up color crates

    • Replaced scattered calls to colored and ansi_term with colorful (which was already in use across the repo).
    • Removed unmaintained ansi_term (and transitively winapi 0.3). Windows console ANSI mode is now enabled via windows-sys, which was already a dependency.
    • Dropped unused anstream and colored from Cargo.toml.
    • Swapped standalone serde_derive crate for standard serde features.

Tests pass (cargo test), clippy is clean.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for port range input like 1-22,661-669,8888 for both CLI and library usage

1 participant