Changelog¶
GATENET — CHANGELOG¶
OUTLINE¶
v0 (BETA)¶
Project initialization
Created the initial project structure and added basic files.
Added
pyproject.tomlfor package management.Set up
hatchlingfor building and publishing the package. (cd8bb2f)
0.1.0¶
Added
pytestfor testing.Initialized
pytest.inifor configuration. (450fe47)Created
src/tests/directory for test files.
Initialized base socket server. (2af7050)
Created TCP & UDP socket server classes. (cf31b71)
Added tests for TCP & UDP socket servers.
Created TCP & UDP client classes. (5ff8a8d)
Added tests for TCP/UDP client & server. (2cc6cb5)
Added HTTP server classes & tests. (d1ed9df)
Added HTTP client class. (812683b)
Added test for HTTP client. (a352b48)
0.1.1¶
Added code coverage support with
codecov.
0.3.0¶
Built this changelog. 😏
Added Dynamic Request Handling for HTTP server. (bf8658c)
Centralized
_handle()method inside the generatedRouteHTTPRequestHandlerSupport for all standard HTTP methods (
GET,POST,PUT,DELETE,PATCH).Automatically deserializes JSON from
POST,PUT,PATCHetc., and returns responses with200,404or500status codes.Dispatched dynamically using one route registry.
Improved
HTTPClient(f02ae1a)Handles:
Custom headers
Timeouts
HTTP & URL errors
Default JSON headers are applied if none are provided.
Error responses are parsed into structured dicts like:
{ "error": "Not Found", "code": 404 }
Test cases for HTTP server/client updated. (ef735bd) & (a2f896e)
Uses only the
@routedecorators for route registration.Verifies proper roundtrip of JSON data with
POST.Verifies status routes, echo routes, and default error handling.
Refactored the
HTTPClientclass to manage all HTTP methods (GET, POST, PUT, DELETE, PATCH) in a single method. (2e4d986)for m in ["get", "post", "put", "delete", "patch"]: setattr( #... )
Add a wrapper method with docstrings and type hints.
def _generate_method(self, method: str): def _method( # ... arguments ) return self._request( # ... arguments ) _method.__name__ = method _method.__doc__ = f"Send an HTTP {method.upper()} request" return _method
Add support for custom headers, timeouts, and error handling.
Added some examples (cce8f2d)
0.3.2¶
Added
BaseClientclass for TCP & UDP clients. (e3bd9a3)TCP & UDP clients now inherit from
BaseClient. (48bcb70)Both classes now support a
timeoutparameter.Both classes now support a
buffsizeparameter withinsend()UDP client also accepts a
retriesparameter (3 by default).
Added
AsyncHTTPClientclass for asynchronous HTTP requests. (7bfff14)Uses
aiohttpfor asynchronous HTTP requests.Supports GET & POST methods.
Also added corresponding test & example files.
Added a polymorphic example for TCP & UDP clients. (3bcff36)
Freezed all requirements into
requirements.txt(45d860d)Added
.github/copilot-instructions.mdfor GitHub Copilot instructions. (e1fdb83)
0.4.0¶
The diagnostics module has been added in this version, which includes various network diagnostics and test suites.
Added
gatenet.diagnosticsmodule for network diagnostics & test suites. (0ce9629), includes:DNS:
reverse_dns_lookup()- DNS lookup for a given IP address.dns_lookup()- DNS lookup for a given domain name.
Ports:
check_public_port()- Check if a TCP port is publicly accessible. (Defaults to host1.1.1.1(Cloudflare DNS), and port53(DNS port))scan_ports()- Scan a list of ports on a given host, defaults to common ports.check_port()(ASYNC) - Utilizesasyncioto check if a port is open on a given host.scan_ports_async()(ASYNC) - Utilizesasyncioto scan a list of ports (defaults to common ports) on a given host.
Geo:
get_geo_info()- Get geographical information for a given IP address.
Also added
ping()function togatenet.diagnosticsmodule for pinging a host. (7fa243ea)Uses
subprocessto execute thepingcommand.Added tests.
Restructured the package to be more modular and organized. (b3edf059).
Added
__init__.pyfiles to each module.
# import before from gatenet.http.server import HTTPServerComoonent # import after from gatenet.http import HTTPServerComponent
0.5.0¶
Added
async_pingtogatenet.diagnosticsmodule for asynchronous pinging of a host. (a552753)Added docs
0.7.5¶
New module
gatenet.discovery.
Added
gatenet.discoverymodule for service discoveries. (7f43e31)Added support for mDNS service discovery.
gatenet.discovery.mdnsmodule for mDNS service discovery.MDNSListenerclass for listening to mDNS events.discover_mdns_services()function for discovering mDNS services.Added a test for mDNS service discovery.
add_service()method toMDNSListenerfor adding discovered services.
Added support for SSDP (UPnP) service discovery.
gatenet.discovery.upnpmodule for SSDP service discovery.discover_upnp_devices()function for discovering UPnP devices.Added a test for SSDP service discovery.
Added examples for mDNS and SSDP service discovery.
Added
gatenet.discovery.bluetoothmodule for Bluetooth service discovery (Synchronous and Asynchronous) with corresponding tests and examples. (ce15ec7)Added
gatenet.discovery.sshmodule for SSH service discovery. (7cb84be0)SSHDetectorclass for detecting SSH services.HTTPDetector,FTPDetector,SMTPDetector,PortMappingDetector,BannerKeywordDetector, andGenericServiceDetectorclasses for detecting various services over SSH.Added tests for SSH service discovery.
Added examples for SSH service discovery.
Added
traceroute()togatenet.diagnostics. (009e906)Added corresponding example & test(s).
Added CONTRIBUTING and CODE_OF_CONDUCT files. (9b56d5c)
0.8.0¶
Diagnostics module improvements and new features.
Added
gatenet.diagnostics.bandwidthmodule for bandwidth measurement. (16d477dd)Added examples for download and upload measurement.
Added tests.
Made
gatenet.diagnostics.traceroutemodule more robust and user-friendly. (513524ab)Supports both UDP and ICMP protocols (choose with the protocol argument).
Returns a list of dicts with hop, IP, hostname, and RTT.
Optionally prints output (print_output argument).
Improved docstring with a clear usage example.
Handles permission errors and host resolution gracefully.
gatenet.diagnostics.pingmodule improvements. (0f165d8)Jitter calculatuon & RTT list:
Both sync and async ping now return all individual RTTs and compute jitter.
TCP ping support:
Added TCP-based ping as a fallback or alternative to ICMP ping.
Async improvements:
Functions use per-ping and total-operation timeout context managers for robust timeout handling.
Async TCP ping uses
asynciofor non-blocking operations.
Refactoring for readability and maintainability:
Split into smaller functions for better organization.
Improved error handling and logging.
Cleaner API:
The async helpers no longer take a timeout argument, as they use context managers.
Ping functions return a structed results dict:
min/avg/max/jitter
all RTTs
packet loss
error info
raw output
Improved docstrings:
Added/updated all and usage examples.
Improved error and timeout handling.
gatenet.diagnostics.geomodule improvements. (e533c43)Improved error handling and consistent return structure for geo lookups.
Added Google-style docstrings and clarified API.
Now always returns a dict with error info on failure.
Example return and error cases documented in the function docstring.
gatenet.diagnostics.port_scanmodule improvements. (f1a9deaf)Improved error handling and consistent return structure for all port scan functions.
Added Google-style docstrings and clarified API for all sync and async functions.
Async port scan helpers now use timeout context managers for robust timeout handling (no timeout argument).
Handles edge cases and exceptions more gracefully.
Fixed and revamped all tests. (d2a90a83)
0.8.2¶
Docstring improvements.
Updated README.
Updated
gatenet.clientmodules with improved docstrings. (153eb59a)Updated
gatenet.socketmodules with improved docstrings. (671e4fd1)Updated
gatenet.http_modules with improved docstrings. (a77ce983)Updated
gatenet.discoverymodules with improved docstrings. (d1c84f19)Updated
gatenet.utilsmodules with improved docstrings. (3d3a63a7)
0.8.4¶
Additions and expansions to tests and examples.
Added integration tests.
Created a new test suite for HTTP server/client integration. (bbf252b)
Created a new test suite for TCP/UDP server/client integration. (59b8272)
Altered the
pytest.inifile to include markers for integration tests and timeouts. (607dafd)Added edge case tests for TCP/UDP/HTTP clients and servers. (0c0556f)
Added more examples. (cf7be11)
0.8.6¶
Improve error handling and edge case coverage.
Fixed security vulnerabilities in
gatenet.socket.basemodule. (f8a6f296)Added more DNS edge test cases. (59cc4c2)
Added a client test for TCP/UDP edge cases. (9985aa91)
Added more tests for the
gatenet.discovery.sshmodule. (8cc6513)Tests for ambiguous banners containing multiple service indicators (e.g., both SSH and HTTP, or FTP and HTTP) to ensure the detector chain prioritizes correctly.
Improved
gatenet.discovery.bluetooth,gatenet.discovery.mdns, andgatenet.discovery.upnpmodules with better error handling. (ab9483c)All error handling now uses Python’s built-in
loggingmodule instead ofprint().When an error occurs, the module logs the error message and returns an empty list instead of raising an exception.
0.8.8¶
Documentation improvements and new features.
0.8.9¶
Coverage documentation & development automation.
Added dependencies for coverage reporting and documentation generation. (ed753462)
The docs now support and display the code coverage reports.
Added a
Makefilefor easier development automation through common task scripts. (90d7a12)Main commands:
make help- Show all available commands.make venv- Create a virtual environment.make install- Install all dependencies.make test- Run all tests.make coverage- Generate a coverage report.make docs- Generate the documentation.make clean- Clean up the project build/dist directories/files.make build- Build the package.make release- Release the package.make version- Display the current version and update the version withinpyproject.toml&docs/source/conf.py.
0.9.0¶
Documentation SEO improvements and repository maintenance/necessities.
Updated the vital markdown files:
README.md- Now includes async examples and a better reflection of the package’s capabilities.CONTRIBUTING.md- Updated to provide clearer guidelines for contributing to the project..github/copilot-instructions.md- Added instructions for using GitHub Copilot with the project.
Added a
SECURITY.mdfile to outline the security policy and reporting guidelines.Added more SEO support to the documentation.
A sitemap will be generated automatically (through
sphinx-sitemap).OpenGraph/meta tags and keywords are configured (through
sphinxext-opengraph).Added a
robots.txtfile to point to the sitemap.
Integrated the changelog into the documentation.
Installed
myst-parserto parse the changelog markdown.Added a new section in the documentation to display the changelog.
make docsAdded more sphinx extensions to slightly enhance the documentation.
sphinx_copybutton- Adds “Copy” buttons to code blocks.sphinx_inline_tabs- Enables inline tabbed content.sphinx_design- Adds design elements and utilities.
Added more
.github/files for repository maintenance.ISSUE_TEMPLATE/- Issue templates for bug reports and feature requests.bug_report.md- Template for reporting bugs.feature_request.md- Template for requesting new features.
pull_request_template.md- Template for pull requests.
Added an architecture diagram to the documentation.
The diagram is generated using
sphinxcontrib-mermaid.It provides a visual representation of the package’s structure and components using a mind map.
0.9.5¶
Dashboard module addition & documentation improvements.
Added examples within the documentation.
Added
gatenet.dashboardmodule for a modern FastAPI-based dashboard.Provides a web UI and API endpoints for diagnostics (ping, traceroute, DNS lookup, port scan) and live output (SSE traceroute).
Usage:
from gatenet.dashboard import launch_dashboard # Launch the dashboard (opens browser by default) launch_dashboard(host="127.0.0.1", port=8000, open_browser=True) # The dashboard will be available at http://127.0.0.1:8000
The FastAPI
appinstance is also available for advanced integration:from gatenet.dashboard.app import app
Features:
Interactive web UI for diagnostics (ping, traceroute, DNS lookup, port scan)
Live traceroute output using Server-Sent Events (SSE)
REST API endpoints for all diagnostics
CORS enabled for local development
Test coverage:
Added
src/tests/dashboard/test_dashboard_api.pywith pytest-based tests for all dashboard endpoints, including live SSE stream.
Updated the
gatenet.diagnostics.bandwidthexample to instruct the user to run an appropriate server before testing the bandwidth measurement.Updated the documentation navigation and styles.
0.9.7¶
New service detection capabilities for additional protocols and services.
Added support for detecting the following protocols and services (
gatenet.service_detectors):HTTPDetectorfor HTTP servicesFTPDetectorfor FTP servicesSMTPDetectorfor SMTP servicesIMAPDetectorfor IMAP servicesPOP3Detectorfor POP3 servicesSIPDetectorfor SIP servicesMQTTDetectorfor MQTT servicesCoAPDetectorfor CoAP servicesBannerKeywordDetectorfor detecting services based on specific banner keywordsPortMappingDetectorfor mapping ports to servicesSSHDetectorfor SSH services
Added
ServiceDiscoveryclass (gatenet.discovery.service_discovery) for service detection.Updated docs:
Architecture diagram
Hero design
Improved API reference
0.9.9¶
Initialized the
gatenet.climodule for command-line interface functionality.# Run locally python -m gatenet.cli # Or install the package and run gatenet <command> [options]
Added commands:
iface- List network interfaces and their details.wifi- Scan for available WiFi networks (SSID, signal, security).ping- Ping a host or IP address.trace- Perform a traceroute to a host.dns- Perform DNS lookups and reverse lookups.ports- Scan TCP/UDP ports on a host.
Updated documentation:
Added CLI usage examples and command reference.
Added CLI architecture diagram.
Added
gatenet.clitests for all commands.
0.11.0¶
Major changes¶
Added
gatenet.meshmodule for mesh networking capabilities.Provides modular mesh networking with support for LoRa, ESP, Wi-Fi, GPS, and SDR integration.
Enables encrypted messaging, packet parsing, and topology mapping across mesh nodes.
Supports logging GPS location and RF signal strength, tagging packets and mesh topology.
Includes Wi-Fi SSID/device scanning and correlation (Raspberry Pi compatible).
Hardware integration guides and CLI examples for mesh, radio, and protocol features.
Extensible for new protocols and hardware (e.g., SDR, custom radios).
Added
gatenet.meshtests for all features.The documentation now sets the following HTTP security headers for improved security and browser policy enforcement:
Content-Security-Policy: Restricts sources to self, disables inline scripts, and limits external assets.X-Frame-Options: SAMEORIGIN: Prevents clickjacking by disallowing framing from other origins.Permissions-Policy: Disables geolocation, microphone, camera, and restricts fullscreen to self.Access-Control-Allow-Origin: https://gatenet.readthedocs.io: Restricts cross-origin requests to the official docs domain for secure CORS.
Utility changes¶
Updated
Makefileto include a new script for removing empty files (apart from__init__.pyfiles).Updated the official description.
Updated the architecture diagram to include the new
gatenet.meshmodule.Added a sub-section on the documentation for Additional Resources.
Includes hardware integration guides, protocol documentation, and CLI examples.
Refactored all modules to improve docstrings to include usage examples and/or applicable references.
Added more tests:
Edge case tests for diagnostics modules:
test_ping_edge.pyand async ping edge casestest_bandwidth_edge.pyfor invalid host, zero duration, negative payloadtest_port_scan_edge.pyfor invalid hosts, empty port liststest_dns_edge.pyfor invalid domain/IP lookupstest_traceroute_edge.pyfor invalid hosts, zero hops
ABC and constructor tests:
test_base_socket_server.pyforBaseSocketServerABCtest_base_client.pyforBaseClientABC
Repr and boundary tests:
test_tcp_udp_client_repr.pyfor TCP/UDP client__repr__test_constants_edge.pyforCOMMON_PORTStype and nonemptytest_net_edge.pyforget_free_portuniqueness and type
These tests improve coverage for error handling, edge cases, and abstract base classes across diagnostics, client, socket, and utils modules.
Updated all meta markdown files for consistency and clarity.
Added workflows:
release.ymlfor automated release upon github release creation.test-release.ymlfor releasing to TestPyPI upon pushing to thedevelopmentbranch.
0.11.1¶
Added
gatenet.radiomodule for radio frequency (RF) detection and event-driven mesh integration.Supports SDR, LoRa, and ESP hardware for RF signal propagation.
Enables encrypted messaging, diagnostics, and robust topology mapping.
Includes
MeshRadio,LoRaRadio, andESPRadioclasses for RF event handling and packet tagging.Provides a unified interface for RF detection and mesh networking.
Improved diagnostics module with:
ping_with_rffor RF-based pinging.Enhanced host validation and error handling.
Removed unreachable code for reliability.
Fixed method signature mismatches and unreachable code in mesh, radio, and diagnostics modules.
Updated docstrings and usage examples for mesh, radio, and diagnostics modules to clarify APIs and extensibility.
Resolved all recent errors and lint issues; added event handler safety checks for mesh/radio integration.
Validated codebase for compatibility, extensibility, and robust event-driven networking.
Added standalone
gatenet.radiomodule with SDR, LoRa, and ESP classes for RF detection and event-driven mesh integration.Mesh and radio modules now support RF signal propagation, encrypted messaging, and diagnostics enhancements.
MeshRadio, LoRaRadio, ESPRadio classes propagate RF events and support robust topology mapping and packet tagging.
Diagnostics module improved: added
ping_with_rf, enhanced host validation, and removed unreachable code for reliability.Fixed method signature mismatches and unreachable code in mesh, radio, and diagnostics modules for error-free integration.
Updated docstrings and usage examples for mesh, radio, and diagnostics modules to clarify APIs and extensibility.
All recent errors and lint issues resolved; event handler safety checks added to mesh/radio integration.
CHANGELOG and documentation updated to reflect new architecture, integration points, and expanded test coverage.
Codebase validated for compatibility, extensibility, and robust event-driven networking.
Improved security by validating all user inputs and using safe subprocess handling.
Added radio event examples on the documentation.
MeshRadio now supports log archival via
sync_logs(), enabling mesh packet, topology, GPS, RF, and Wi-Fi logs to be saved to a file for base node or Mini PC integration.
0.11.2¶
Security improvements¶
The ping command is now protected against command injection:
It validates the host argument using strict regex for IPv4, IPv6, or valid hostnames before passing to subprocess. This blocks malicious input and follows CodeQL/OWASP recommendations.
Sensitive exception details are now hidden in the DNS and port scan endpoints.
Errors are logged server-side, and users receive a generic message: Sensitive exception details are now hidden in the DNS and port scan endpoints.
“An internal error occurred. Please try again later.”
Additional tests¶
Added new tests for untested elements in
gatenet.dashboard:Error handling for invalid host/ports on all endpoints.
SSE error path in
/api/traceroute/stream.CORS headers
The
launch_dashboard()function.
Additional integration test:
MeshRadio GPS, RF, and Wi-Fi logging.
Integration with
ping_with_rfSending/receiving messages with RF info
Topology updates
0.11.3¶
Fixed security vulnerabilities in the ping command.
Host validation uses a strict allowlist (
_is_valid_host) before any subprocess call.No unchecked user input is ever passed to the command line.
All shell metacharacters and invalid formats are rejected before execution.
0.12.0¶
Fixed the package imports and CLI.
Created the gatenet.hotspot module for comprehensive Wi-Fi access point management.
Hotspot Management: Complete Wi-Fi access point creation and management with cross-platform support for Linux and macOS
Hotspotclass for creating and managing Wi-Fi access pointsSupport for WPA2, WPA3, WEP, and open security configurations
Cross-platform compatibility with Linux (hostapd) and macOS (Internet Sharing)
Real-time monitoring of connected devices and hotspot status
DHCP Server Control: Integrated DHCP server management for IP address assignment
DHCPServerclass with configurable IP ranges and DNS settingsPlatform-specific implementations using dnsmasq (Linux) and built-in services (macOS)
Automatic network configuration and gateway setup
Security Configuration: Robust security options and password management
SecurityConfigclass with password validation and strength checkingAutomatic secure password generation with customizable length
Support for multiple security types (WPA2, WPA3, WEP, Open)
Password complexity validation and common pattern detection
Testing Infrastructure: Comprehensive test suite with CI/CD compatibility
59 unit and integration tests covering all hotspot functionality
Subprocess mocking to prevent password prompts in automated workflows
Cross-platform test coverage with platform-specific behavior validation
Test isolation ensuring hotspot tests don’t interfere with other modules
Security improvements and test infrastructure enhancements.
Security Hardening: Fixed command injection vulnerabilities in ping diagnostics
Host validation uses a strict allowlist (
_is_valid_host) before any subprocess callNo unchecked user input is ever passed to the command line
All shell metacharacters and invalid formats are rejected before execution
Dashboard Security: Improved error handling to prevent information exposure
Sanitized exception messages in FastAPI error responses
Removed sensitive system information from error outputs
Test Infrastructure: Enhanced testing framework with improved isolation
Targeted subprocess mocking for hotspot tests to prevent password prompts
Preserved real subprocess calls for diagnostic tests requiring actual network operations
Improved CI/CD workflow compatibility with automated testing
Added comprehensive interactive sandbox and theme improvements
Interactive Sandbox: Created a complete browser-based playground for Gatenet features
Live code editor with syntax highlighting for Python code examples
Interactive HTTP client, TCP/UDP client, and service discovery demonstrations
Real-time code execution simulation with formatted output display
Quick start playground with pre-configured networking examples
Embedded dashboard iframe for full Gatenet web interface experience
Theme-Aware Design: Complete dark/light theme support across all documentation
CSS custom properties system for seamless theme switching
Theme-aware code editors, output terminals, and interactive elements
Consistent styling for all Sphinx admonitions (notes, warnings, tips, etc.)
Mobile-responsive design with touch-friendly interfaces
Smooth transitions and animations between theme modes
Version Banner: Implemented sticky navigation banner
Fixed positioning at top of all documentation pages
Direct linking to latest release notes in changelog
Professional gradient design matching project branding
Cross-platform compatibility and accessibility compliance
Added an interactive sandbox page to the documentation.
0.12.1¶
Comprehensive Test Coverage Improvements: Added extensive test suites to achieve 81% overall code coverage:
CLI Testing: Fixed all 12 failing CLI tests with proper mocking strategies
Updated
test_main.pyto usepatch.dictfor command registry mocking instead of individual function patchesFixed argument name mismatches (
hostvstarget,queryvshostname) to match actual CLI implementationCorrected error message assertions and help text validation
Added proper module execution tests for
__main__.pyentry point
Client Base Class Testing: Created comprehensive test suite for abstract
BaseClientclassAdded ABC compliance tests ensuring proper abstract method enforcement
Fixed regex patterns for TypeError messages (
Can'tvsCannot) across Python versionsAdded concrete implementation validation and inheritance testing
HTTP Base Handler Testing: Developed complete test coverage for
SimpleHTTPRequestHandlerRenamed test file from
test_base.pytotest_http_base.pyto resolve import conflictsAdded HTTP request/response testing with mock-based isolation
Comprehensive testing of GET methods, response content, and logging functionality
Network Utilities Testing: Enhanced test coverage for
netinfomodule utilitiesAdded tests for network interface enumeration and Wi-Fi scanning functionality
Cross-platform testing for macOS and Linux network discovery methods
Comprehensive error handling and edge case validation
Hotspot Module Testing: Expanded test coverage for Wi-Fi access point management
Added comprehensive DHCP server testing with platform-specific implementations
Security configuration validation with password strength testing
Cross-platform hotspot creation and management verification
Test Infrastructure Improvements: Enhanced testing framework reliability
Resolved Python import conflicts by ensuring unique test file names across modules
Improved mocking strategies to prevent real network operations during testing
Added proper error message validation with exact regex pattern matching
All 330+ tests now passing with robust isolation and comprehensive coverage
CLI Hotspot Management: Added comprehensive hotspot CLI command for Wi-Fi access point management
New
gatenet hotspotcommand with multiple actions:start- Create and start Wi-Fi hotspots with customizable security settingsstop- Stop running hotspotsstatus- Check hotspot status and platform informationdevices- List connected devices with IP, MAC, and hostname detailsgenerate-password- Generate secure passwords with customizable length
Security Configuration: Support for multiple security types (Open, WPA, WPA2, WPA3)
Comprehensive Options: Configurable SSID, password, interface, IP range, gateway, channel, and hidden network settings
Multi-format Output: JSON, table, and plain text output formats for all commands
Cross-platform Support: Compatible with Linux (hostapd) and macOS (Internet Sharing)
Rich CLI Interface: Beautiful table output with color-coded status and device information
Complete Test Coverage: 13 comprehensive tests covering all hotspot functionality and error scenarios
Example Usage:
gatenet hotspot start --ssid MyHotspot --password securepass123 --security wpa2 gatenet hotspot status --output json gatenet hotspot devices --output table gatenet hotspot generate-password --length 16 gatenet hotspot stop
All 330 tests now passing with robust isolation and comprehensive coverage
0.12.3¶
Internal restructuring to improve extensibility while preserving public APIs.
Addition of the
gatenet.coremodule for shared hooks/events.
Discovery plugin registry (non-breaking):
Moved detector classes to
gatenet.discovery.detectorsand introduced a registry ingatenet.discovery.ssh.New APIs:
register_detector,register_detectors,clear_detectors,get_detectorsfor chain-of-responsibility customization.Backward compatible: existing imports and
_identify_service()behavior remain unchanged; defaults preserved.
Hotspot backend abstraction (non-breaking):
Added
HotspotBackendinterface andBackendResultto enable pluggable platform backends.Introduced platform backends (
gatenet.hotspot.backends.linux,gatenet.hotspot.backends.macos).Hotspotnow accepts an optionalbackendfor dependency injection; legacy behavior remains the default path.
Core hooks and events (non-breaking):
New
gatenet.corepackage:Hooks: lightweight event bus.events: centralized event name constants.hooks: shared default Hooks instance for cross-module use.
HTTP server now emits lifecycle events and accepts an optional hooks instance:
HTTP_BEFORE_REQUEST,HTTP_AFTER_RESPONSE,HTTP_ROUTE_NOT_FOUND,HTTP_EXCEPTION.
Clients emit send/receive events:
TCP:
TCP_BEFORE_SEND,TCP_AFTER_RECV.UDP:
UDP_BEFORE_SEND,UDP_AFTER_RECV.
Discovery emits detector chain events in
_identify_service:DISCOVERY_BEFORE_DETECT,DISCOVERY_AFTER_DETECT.
Diagnostics ping emits events (sync and async):
PING_BEFORE,PING_AFTER.
Docs & examples:
Added a new “Hooks & Events” section to
docs/source/examples.rstdemonstrating HTTP, TCP/UDP, discovery, and diagnostics hook usage.
Tests:
Added tests to verify hook emissions and behavior:
Discovery before/after detect hooks.
UDP and TCP client before/after hooks.
Diagnostics ping before/after hooks.
HTTP hooks integration test and a retry helper test mirroring the docs example.
Notes:
The detector registry, hotspot backends, and new hooks/events are marked experimental until 1.0 and may evolve with feedback.
0.12.4¶
Improved error handling in API endpoints to avoid exposing internal error details.
Fixed the
gatenet.coremodule to be able to import and use the new hooks/events.
0.12.5¶
Fixed broken CLI entry point causing
ModuleNotFoundError: No module named 'gatenet.cli'when running thegatenetconsole script.Added
gatenet.clipackage and ensuredmainis re-exported fromgatenet.cli.Aligned module entry (
python -m gatenet.cli) tosys.exit(main())and matched function signature.
Hardened CLI initialization to avoid optional dependency errors at import time.
Refactored CLI to lazy-load subcommand handlers (
iface,wifi,trace,ping,dns,ports,hotspot).Made
richoptional; help gracefully falls back to plain text whenrichisn’t installed.
Added a
versionsubcommand for quick version checks:gatenet version.Verified console script on macOS with Homebrew Python and editable installs:
gatenet versionprints the package version.gatenet ping 127.0.0.1 --output plainexecutes successfully.
0.12.6¶
Fixed build and dependency issues.
Added runtime dependencies to
pyproject.toml:Added optional dependencies for platform-specific and optional features.
Made Bluetooth imports optional in
discovery/__init__.pyAdded try/except blocks around bluetooth imports.
Created stub functions that provide helpful error messages when
bleakis not installed.Maintained the same function signatures to preserve API compatibility.