{"id":16930653,"url":"https://github.com/schmichael/netdbg","last_synced_at":"2025-04-05T14:24:34.159Z","repository":{"id":19854891,"uuid":"23117873","full_name":"schmichael/netdbg","owner":"schmichael","description":"Network protocol debugger","archived":false,"fork":false,"pushed_at":"2014-08-20T16:30:50.000Z","size":164,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-11T10:59:06.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schmichael.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}},"created_at":"2014-08-19T16:46:22.000Z","updated_at":"2024-04-29T12:39:38.000Z","dependencies_parsed_at":"2022-08-02T15:00:37.525Z","dependency_job_id":null,"html_url":"https://github.com/schmichael/netdbg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fnetdbg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fnetdbg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fnetdbg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fnetdbg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schmichael","download_url":"https://codeload.github.com/schmichael/netdbg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247348288,"owners_count":20924535,"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","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":"2024-10-13T20:42:10.655Z","updated_at":"2025-04-05T14:24:34.116Z","avatar_url":"https://github.com/schmichael.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"netdbg\n------\n\nNetwork protocol proxy/debugger. A transparent proxy between clients and\nservers to ease protocol debugging and degenerate case testing.\n\nVery early/experimental. Just a toy. Interfaces may change wildly.\n\n```sh\ngo get github.com/schmichael/netdbg/cmd/netdbg\n\n# Prints every time a packet is sent or received\nnetdbg prog,prog localhost:8080 google.com:80\n\n# Prints escaped version of sent and received data\nnetdbg log,log localhost:8080 google.com:80\n\n# Slow loris attack: send 1 byte per second and print progress\nnetdbg slow:prog,prog localhost:8080 google.com:80\n\n# In another terminal\ncurl localhost:8080 \u003e /dev/null\n```\n\nFilters\n-------\n\nFilters are implemented as an interface which implements Accept and\nClose methods. However, the most important part of a filters\nfunctionality is that it's given in and out chans for manipulating the\ndata stream.\n\nEach filter can be used on data the *client sends* or on data the *server sends*.\n\nTo cleanly shutdown the filter pipeline a filter must close its `out`\nchan when their `in` chan is closed. \n\nFuture\n======\n\nImplement Filters as WriteClosers, initialize in reverse, and give the next\nfilter in the chain to the filter new function. Last filter in chain would be\ngiven actual net.Conn as writer.\n\n**Pros**\n\n* Clearer: Filter interface would make how to implement Filters clear again.\n* Simpler: No more chan management.\n* Reusable: Easy to reuse existing Writers (bzip, gzip, etc) in filters.\n\n**Cons**\n\n* Not always simpler: Write() methods would have to be reentrant as a prior\n  filter could be concurrently calling it. Makes races much easier to write on\n  filters with state.\n\n\n*Could we provide both APIs?*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmichael%2Fnetdbg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschmichael%2Fnetdbg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmichael%2Fnetdbg/lists"}