{"id":16484756,"url":"https://github.com/damdo/mirror","last_synced_at":"2025-02-28T22:24:16.247Z","repository":{"id":96653094,"uuid":"116887698","full_name":"damdo/mirror","owner":"damdo","description":":microscope: HTTP(S) request mirror for Debugging","archived":false,"fork":false,"pushed_at":"2018-01-14T01:04:28.000Z","size":2551,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T14:30:39.363Z","etag":null,"topics":["debugger","docker","docker-image","golang","http","https","inspector","mirror"],"latest_commit_sha":null,"homepage":"","language":"Go","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/damdo.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}},"created_at":"2018-01-10T00:37:22.000Z","updated_at":"2024-12-12T17:15:28.000Z","dependencies_parsed_at":"2023-06-04T18:45:52.721Z","dependency_job_id":null,"html_url":"https://github.com/damdo/mirror","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/damdo%2Fmirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damdo%2Fmirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damdo%2Fmirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damdo%2Fmirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damdo","download_url":"https://codeload.github.com/damdo/mirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241255562,"owners_count":19934889,"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":["debugger","docker","docker-image","golang","http","https","inspector","mirror"],"created_at":"2024-10-11T13:18:10.573Z","updated_at":"2025-02-28T22:24:16.218Z","avatar_url":"https://github.com/damdo.png","language":"Go","readme":"## damdo/mirror\n\n[![Build Status](https://travis-ci.org/damdo/mirror.svg?branch=master)](https://travis-ci.org/damdo/mirror)\n\n:microscope: HTTP(S) request mirror for Debugging\n\n\n### FEATURES:\n- **Mirrors** the received **requests** and their **responses** -\u003e in the response body and in its STDOUT\n- Returns *Client IP* and *Server Hostname*\n- **Single**, **cross-platform** and statically Linked **executable** (written in Go)\n- **Dockerized** version available\n\n\u003cbr\u003e\n\n\u003cimg src=\"assets/mirror.gif\" \u003e\n\n\n### 1) USAGE: \n#### 1.1) TURN ON MIRROR\n##### OPTION 1: Start it in a docker container\n```\ndocker run -e \"PORT=80\" -e \"BODY=1\" -p 80:80 damdo/mirror\n```\n\n##### OPTION 2: Download and start the binary\n```\ngo get github.com/damdo/mirror;\nPORT=80 BODY=1 mirror;\n```\n\n\u003cbr\u003e\n\n#### 1.2) MAKE REQUESTS\n#### Example: Make a request with curl to mirror\nFor example a request can be made form the same host with curl\nThe ip where mirror is running, in this case, will be 127.0.0.1\n```\ncurl -X POST -d 'This is the example body' 127.0.0.1:80\n```\n\n\n#### Example Response:\nDepending on the headers of the requests the output will differ.\nSo here the various Headers, Types and Protocols can be inspected.\n\nFor example:\n```\n====================\n\nCLIENT: \"192.168.56.101:58072\" REQUEST\n--------------------------\nTime: 1515851216261964065\nGET / HTTP/1.1\nHost: localhost:80\nAccept: */*\nContent-Type: application/x-www-form-urlencoded\nUser-Agent: curl/7.57.0\n\n\nThis is the example body\n\n\nSERVER: MacBook-Pro-di-Damiano.local RESPONSE\n--------------------------\nTime: 1515851216262018704\nHTTP/1.1 200 OK\nConnection: close\nContent-Type: text/plain; charset=utf-8\n\n====================\n```\n(logs can be inspected with `docker logs -f containername`)\n\n\u003cbr\u003e\n\n#### 1.3) PARAMETERS\n\nThe parameters can be specified as: `PARAMETER:value`\n\nIf the docker deployment is used they have to be specified as ENV variables \nlike:\n```sh\ndocker run -e \"PARAMETER:value\" -e \"PARAMETER2:value2\" ...\n```\nIf the executable binary deployment is used they have to be specified preponed to the mirror command \n```sh\nPARAMETER:value PARAMETER2:value2 mirror\n```\n\n```\nAVAILABLE PARAMETERS:\n\nPORT is an integer (default: PORT=80)\nDefine the value of the port where mirror will be listening\n!warning!: If the PORT is set, and the docker deployment is used,\n       \t   remember to change the docker port mapping (-p parameter)\n\nBODY is an constrained integer (0 or 1) (default: BODY=1)\nDefine if the body will be included or excluded form the mirror\n```\n\n\u003cbr\u003e\n\n### 2) OTHER:\nPR are more than welcome\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamdo%2Fmirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamdo%2Fmirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamdo%2Fmirror/lists"}