{"id":31755395,"url":"https://github.com/coder3101/ping-checker","last_synced_at":"2025-10-09T18:48:03.066Z","repository":{"id":315740784,"uuid":"1060657961","full_name":"coder3101/ping-checker","owner":"coder3101","description":"A simple web server that does ping on HTTP requests","archived":false,"fork":false,"pushed_at":"2025-09-20T11:01:58.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T05:51:31.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coder3101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-20T10:25:40.000Z","updated_at":"2025-09-20T11:02:02.000Z","dependencies_parsed_at":"2025-09-20T13:04:33.652Z","dependency_job_id":"2718af10-e64e-4a44-b64c-b8b0a872040b","html_url":"https://github.com/coder3101/ping-checker","commit_stats":null,"previous_names":["coder3101/ping-checker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coder3101/ping-checker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder3101%2Fping-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder3101%2Fping-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder3101%2Fping-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder3101%2Fping-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder3101","download_url":"https://codeload.github.com/coder3101/ping-checker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder3101%2Fping-checker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001878,"owners_count":26083226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T18:48:01.085Z","updated_at":"2025-10-09T18:48:03.061Z","avatar_url":"https://github.com/coder3101.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ping Checker\n\nA lightweight HTTP service that performs ping connectivity checks via a REST API. This service is designed to be used by remote hosts (such as Tailscale nodes) to perform connectivity checks to homelab or other network destinations.\n\n\u003e Requires `net.ipv4.ping_group_range` sysctl parameter to allow unprivileged ICMP sockets. Check with: `sysctl net.ipv4.ping_group_range`\n## Features\n\n- Simple REST API for ping operations\n- IPv4 and IPv6 support\n- Configurable listen address\n- Structured logging with tracing\n- Docker-friendly design\n- Debian package support\n- Lightweight and fast\n\n## Installation\n\n### From Source\n\n```bash\n# Clone the repository\ngit clone \u003crepository-url\u003e\ncd ping-checker\n\n# Build the project\ncargo build --release\n\n# Run the binary\n./target/release/ping-checker\n```\n\n### Using Cargo\n\n```bash\ncargo install --path .\nping-checker\n```\n\n## Usage\n\n### Starting the Server\n\nBy default, the server listens on `0.0.0.0:8088`:\n\n```bash\nping-checker\n```\n\n### Configuration\n\nThe server can be configured using environment variables:\n\n- `LISTEN_ADDR`: The address and port to listen on (default: `0.0.0.0:8088`)\n\nExample:\n```bash\nLISTEN_ADDR=127.0.0.1:3000 ping-checker\n```\n\n### API Endpoints\n\n#### `GET /ping/{ip}`\n\nPerforms a ping to the specified IP address.\n\n**Parameters:**\n- `ip`: The IP address to ping (IPv4 or IPv6)\n\n**Responses:**\n- `200 OK`: Ping successful\n- `400 Bad Request`: Invalid IP address format\n- `503 Service Unavailable`: Ping failed (host unreachable, timeout, etc.)\n\n**Examples:**\n\n```bash\n# Ping IPv4 address\ncurl http://localhost:8088/ping/8.8.8.8\n\n# Ping IPv6 address\ncurl http://localhost:8088/ping/2001:4860:4860::8888\n\n# Ping local address\ncurl http://localhost:8088/ping/192.168.1.1\n```\n\n## Deployment\n\n### Systemd Service\n\nThe project includes a systemd service file for deployment:\n\n```bash\n# Copy binary to system location\nsudo cp target/release/ping-checker /usr/bin/\n\n# Copy and enable service (if using debian package)\nsudo systemctl enable ping-checker\nsudo systemctl start ping-checker\n```\n\n### Debian Package\n\nThe project supports building Debian packages:\n\n```bash\n# Install cargo-deb\ncargo install cargo-deb\n\n# Build debian package\ncargo deb\n\n# Install the package\nsudo dpkg -i target/debian/ping-checker_*.deb\n```\n\n\n## Logging\n\nThe service uses structured logging with different levels:\n\n- `INFO`: Server startup and basic operations\n- `DEBUG`: Detailed ping operations\n- `WARN`: Failed pings and invalid requests\n\nSet log level with `RUST_LOG` environment variable:\n```bash\nRUST_LOG=debug ping-checker\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Author\n\nMohammad Ashar Khan\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder3101%2Fping-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder3101%2Fping-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder3101%2Fping-checker/lists"}