{"id":43108284,"url":"https://github.com/biancarosa/netkit","last_synced_at":"2026-01-31T18:15:01.399Z","repository":{"id":296469412,"uuid":"952183392","full_name":"biancarosa/netkit","owner":"biancarosa","description":"The HTTP traffic sidecar that will change the way you develop and monitor applications.","archived":false,"fork":false,"pushed_at":"2025-10-27T22:32:41.000Z","size":5076,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T20:35:08.844Z","etag":null,"topics":["caching","debugging","http","monitoring","proxy","rate-limiting","replay","requests","requests-recording","throttling"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/biancarosa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","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-03-20T21:39:36.000Z","updated_at":"2025-10-27T22:32:45.000Z","dependencies_parsed_at":"2025-05-31T09:37:22.233Z","dependency_job_id":"65d9269c-9dce-4ac9-8e9f-7f3d06851064","html_url":"https://github.com/biancarosa/netkit","commit_stats":null,"previous_names":["platformlabs-co/fetchr.sh","biancarosa/netkit","biancarosa/fetchr.sh"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/biancarosa/netkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biancarosa%2Fnetkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biancarosa%2Fnetkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biancarosa%2Fnetkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biancarosa%2Fnetkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biancarosa","download_url":"https://codeload.github.com/biancarosa/netkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biancarosa%2Fnetkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28949280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T14:26:55.697Z","status":"ssl_error","status_checked_at":"2026-01-31T14:26:52.545Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["caching","debugging","http","monitoring","proxy","rate-limiting","replay","requests","requests-recording","throttling"],"created_at":"2026-01-31T18:15:00.762Z","updated_at":"2026-01-31T18:15:01.387Z","avatar_url":"https://github.com/biancarosa.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netkit\n\nA modern HTTP proxy and request capture tool with a sleek web dashboard.\n\n\u003c!-- badges ---\u003e\n\n## Features\n\n- **HTTP Proxy Server**: Forward HTTP requests through the proxy\n- **Request History**: Comprehensive tracking of all proxied requests\n- **Web Dashboard**: Modern React-based interface for managing requests\n- **Real-time Statistics**: Monitor proxy performance and request metrics\n- **Admin API**: RESTful endpoints for health checks, metrics, and history\n- **Request Replay**: Load and replay requests from history\n- **Timing Metrics**: Detailed breakdown of proxy overhead and upstream latency\n\n## Quick Start\n\n### 1. Build the Project\n\n```bash\nmake dev\n```\n\nOpen http://localhost:3000 to access the dashboard.\n\n## Dashboard Features\n\n### Request Builder\n- **HTTP Method Selection**: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS\n- **URL Input**: Full URL with validation\n- **Headers Management**: Dynamic header pairs with enable/disable toggles\n- **Request Body**: JSON editor with syntax highlighting\n- **Send Requests**: Execute requests through the proxy or directly\n\n### Request History\nThe dashboard provides two types of request history:\n\n#### Local History\n- Requests made from the dashboard interface\n- Stored in browser localStorage\n- Includes request/response data and timing\n- Replay functionality to load previous requests\n\n#### Proxy History\n- All HTTP requests that pass through the proxy server\n- Stored in server memory (configurable size)\n- Detailed timing metrics (proxy overhead, upstream latency)\n- Request/response size tracking\n- Success/error status tracking\n\n### Statistics Panel\nReal-time statistics showing:\n- **Request Counts**: Success vs error rates\n- **Timing Metrics**: Average durations and latency breakdown\n- **Data Transfer**: Total request/response sizes\n- **Status Codes**: Distribution of HTTP status codes\n- **Methods**: Usage breakdown by HTTP method\n\n## API Endpoints\n\n### Proxy Server (Port 8080)\n- **HTTP Proxy**: All HTTP traffic\n\n### Admin Server (Port 8081)\n- `GET /healthz` - Health check\n- `GET /metrics` - Prometheus-style metrics\n- `GET /requests` - Request history (JSON)\n- `GET /requests/stats` - Request statistics\n- `POST /requests/clear` - Clear request history\n\n## Configuration\n\n### Command Line Flags\n\n```bash\n./bin/netkit serve [flags]\n\nFlags:\n  --port int              Proxy server port (default 8080)\n  --admin-port int        Admin server port (enables admin endpoints)\n  --history-size int      Maximum requests to keep in history (default 1000)\n  --log-level string      Log level: debug, info, warn, error (default \"info\")\n```\n\n### Environment Variables\n\nDashboard configuration (in `dashboard/.env.local`):\n```bash\nNEXT_PUBLIC_PROXY_HOST=localhost\nNEXT_PUBLIC_PROXY_PORT=8080\nNEXT_PUBLIC_ADMIN_PORT=8081\n```\n\n## Usage Examples\n\n### Using as HTTP Proxy\n\n```bash\n# Configure your application to use the proxy\ncurl -x http://localhost:8080 http://httpbin.org/get\n\n# Or set environment variables\nexport HTTP_PROXY=http://localhost:8080\nexport HTTPS_PROXY=http://localhost:8080\n```\n\n### Request History API\n\n```bash\n# Get request history\ncurl http://localhost:8081/requests\n\n# Get statistics\ncurl http://localhost:8081/requests/stats\n\n# Clear history\ncurl -X POST http://localhost:8081/requests/clear\n```\n\n## Development\n\n### Prerequisites\n- Go 1.21+\n- Node.js 18+\n- npm\n\n### Development Commands\n\n```bash\n# Install all development tools (Go, Node.js, git-cliff)\nmake install\n\n# Install specific toolsets\nmake install-backend           # Go tools only\nmake install-dashboard         # Node.js dependencies only\nmake install-changelog-tools   # git-cliff and conventional commit tools\n\n# Run tests\nmake test\nmake e2e\n\n# Run linting\nmake lint\nmake check\n\n# Start development servers\nmake dev\n\n# Build for production\nmake build\nmake build-dashboard\n```\n\n### Conventional Commits and Changelog\n\nThis project uses [Conventional Commits](https://www.conventionalcommits.org/) for structured commit messages and [git-cliff](https://git-cliff.org/) for automated changelog generation.\n\n#### Quick Start with Conventional Commits\n\n```bash\n# Install tools\nmake install-changelog-tools\n\n# Initialize changelog configuration\nmake changelog-init\n\n# Make conventional commits\nmake commit-feat msg=\"add user authentication\"\nmake commit-fix msg=\"resolve proxy timeout issue\"\nmake commit-docs msg=\"update API documentation\"\n\n# Create releases\nmake release-patch  # 1.0.0 -\u003e 1.0.1 (bug fixes)\nmake release-minor  # 1.0.0 -\u003e 1.1.0 (new features)\nmake release-major  # 1.0.0 -\u003e 2.0.0 (breaking changes)\n```\n\n#### Available Commit Types\n\n- `feat` - New features\n- `fix` - Bug fixes\n- `docs` - Documentation changes\n- `style` - Code formatting\n- `refactor` - Code restructuring\n- `test` - Test additions/modifications\n- `chore` - Maintenance tasks\n- `perf` - Performance improvements\n- `security` - Security fixes\n\n#### Changelog Commands\n\n```bash\nmake changelog              # Generate full changelog\nmake changelog-update       # Update with latest commits\nmake check-conventional-commits  # Validate commit format\n```\n\nFor detailed information, see [docs/CHANGELOG_GUIDE.md](docs/CHANGELOG_GUIDE.md).\n\n### Project Structure\n\n```\nnetkit/\n├── cmd/netkit/          # Main application entry point\n├── internal/\n│   ├── proxy/           # Proxy server implementation\n│   └── api/             # Admin API handlers\n├── dashboard/           # React dashboard\n│   ├── src/\n│   │   ├── components/  # React components\n│   │   ├── services/    # API service layer\n│   │   └── hooks/       # Custom hooks and state management\n│   └── public/          # Static assets\n└── Makefile            # Development commands\n```\n\n## Request History Details\n\n### HTTP vs HTTPS Requests\n\n- **HTTP Requests**: Fully captured with complete request/response data\n- **HTTPS Requests**: Only CONNECT tunnel establishment is visible (encrypted content cannot be captured)\n\n### Data Captured\n\nFor each HTTP request through the proxy:\n- Request method, URL, headers, body\n- Response status, headers, body\n- Timing breakdown:\n  - Proxy overhead (time spent in proxy code)\n  - Upstream latency (time waiting for target server)\n  - Total duration\n- Data sizes (request and response bytes)\n- Success/error status\n\n### Performance Considerations\n\n- Request history is stored in memory\n- Configurable maximum size (default: 1000 requests)\n- Automatic cleanup of oldest requests when limit reached\n- Minimal performance impact on proxy operations\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Run `make check` to ensure all tests pass\n5. Submit a pull request\n\n## License\n\nMIT License - see LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiancarosa%2Fnetkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiancarosa%2Fnetkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiancarosa%2Fnetkit/lists"}