{"id":20593340,"url":"https://github.com/objectisadvantag/smartproxy","last_synced_at":"2025-10-24T13:14:04.567Z","repository":{"id":89281394,"uuid":"48167586","full_name":"ObjectIsAdvantag/smartproxy","owner":"ObjectIsAdvantag","description":"GoLang reverse-proxy for Web API developpers (capture / inspect traffic)","archived":false,"fork":false,"pushed_at":"2016-04-09T18:06:35.000Z","size":35,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T00:17:17.242Z","etag":null,"topics":["do-not-use-yet","golang","reverse-proxy"],"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/ObjectIsAdvantag.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2015-12-17T10:17:27.000Z","updated_at":"2023-08-16T13:03:29.000Z","dependencies_parsed_at":"2023-03-03T08:00:22.669Z","dependency_job_id":null,"html_url":"https://github.com/ObjectIsAdvantag/smartproxy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObjectIsAdvantag%2Fsmartproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObjectIsAdvantag%2Fsmartproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObjectIsAdvantag%2Fsmartproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObjectIsAdvantag%2Fsmartproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ObjectIsAdvantag","download_url":"https://codeload.github.com/ObjectIsAdvantag/smartproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242225567,"owners_count":20092599,"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":["do-not-use-yet","golang","reverse-proxy"],"created_at":"2024-11-16T07:48:05.700Z","updated_at":"2025-10-24T13:14:04.478Z","avatar_url":"https://github.com/ObjectIsAdvantag.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ambition  \n\nBe a companion for Web API developers by mocking, filtering, replaying, \"diff'ing\" HTTP req/responses\n\nIt may also help Web API hosting via diff'ing between API versions and taking actions when unexpected errors occur. \nNote : by unexpected, we intend that traffic differs from prevailing traffic.\n\n\n# Architecture\n\nSmartProxy acts as a reverse proxy that\n \n- maintains an history of requests\n- allows to inspect them\n- allows to modify them : YOU take action\n\n\n# Roadmap\n\n[X] reverse proxy basics \n\n   - custom path, custom port, healthcheck endpoint\n   - tested on Windows, 6,9 MB windows exe\n   - tested on Linux / Docker, 6,9MB image (from scratch)\n   - release tag : 0.1 \n      \n[X] capture traffic, writes to stdout\n   - MIT license\n   - dump flag \n   - captures requests/responses, \n   - prints to stdout only (no in-memory, no disk writes)\n   - release tag v0.2\n   \n[X] store traffic on-disk\n   - tag each flow (req/resp) with a uuid\n   - create go struct to store traffic : ingress, egress, synthesis\n   - store traffic via bolt\n   - release tag v0.3\n    \n[X] inspect traffic\n   - added route to inspect captured traffic, /traffic  \n   - display list of captured traffic in HTML page (no json, 20 latest traces) \n   - display detailed trace in json\n   - release tag v0.4\n   \n[ ] extract API model from traffic analysis\n\n[ ] enrich model\n\n[ ] Realtime traffic capture experience\n\n[ ] admin api\n   - dynamically modify configuration (change proxy address, capture on/off, erase capture database)\n   \n\n# Feel like giving it a try\n\n## Easy does it : start from an executable\n\nGo to github / releases,\n\nPick the executables that suits your platform : smartproxy and dummy test service\n\nRun it\n\n```\n# on linux\n\u003e smart-proxy -route proxy -port 9090 -serve 127.0.0.1:8080 -capture\n\u003e tests/dummy\n```\n\n```\n# on windows\n\u003e ./smart-proxy.exe -route proxy -port 9090 -serve 127.0.0.1:8080 -capture\n\u003e tests/dummy.exe\n```\n\nThen inspect traffic via your web brower, \n\n- http://localhost:9090/traffic : display the latest 10 traces\n- http://localhost:9090/traffic/\u003ctrace_id\u003e : display trace details in json\n\n \n## You gopher (have golang installed locally)\n\n1. start the service you want to proxy, or launch the provides test service\n   - start with \"\u003e go run tests/dummy.go\" \n   - check \"\u003e curl -X GET http://localhost:8080/\" and also /json /txt\n2. start smart-proxy : \"\u003e go run *.go -route proxy\"\n   - 2015/12/20 19:25:49 [INFO] Starting SmartProxy, version: draft\n   - 2015/12/20 19:25:49 [INFO] Listening on http://localhost:9090\n   - 2015/12/20 19:25:49 [INFO] Serving http://127.0.0.1:8080 via path /proxy/\n3. try a few URLs\n   - curl -X GET http://localhost:9090/\n   - curl -X GET http://localhost:9090/proxy/\n   - curl -X GET http://localhost:9090/proxy/json\n   - curl -X GET http://localhost:9090/ping\n\n## Via Docker\n\n### On linux (pure assumption, need to be checked, please contribute :-))\n\n- Clone this repo\n- Pick the linux executable from releases or build it with command : \"\u003e make linux\"\n- Build the docker image with the provided Dockerfile, \"\u003e docker build  -t objectisadvantag/smartproxy .\"\n- Run it \"\u003e docker run -d -p 9090:9090 objectisadvantag/smartproxy:latest -route proxy -port 9090 -serve 127.0.0.1:8080 -capture\"\n\n```\n\u003e make linux\n\u003e docker build -t \u003cimage-name\u003e .\n\u003e docker run -d -p 9090:9090 \u003cimage-name\u003e -route proxy -port 9090 -serve 127.0.0.1:8080 -capture\n```\n\n\n### Docker Toolbox \n\nNote for Windows gophers : I personally use an home-made set of bash commands : \ncheck https://github.com/ObjectIsAdvantag/my-docker-toolbox\n\n```\n\u003e git clone https://github.com/ObjectIsAdvantag/smart-proxy\n\u003e make linux\n\u003e dmcreate docker-smartproxy    // creates a new box\n\u003e dminit                        // initializes the toolbox env\n\u003e dmip                          // display your box ip address, simply replace suffix with 1 to get the address where your containers can reach your dev machine\n\u003e dibuild smart-proxy .         // builds the image\n\u003e dimg 1                        // selects the image that has just been created as current\n\u003e drun                          // creates and launches a new container\ncommand ?   [command|(default)]: -route proxy -serve 192.168.99.1:8080\ndetach or interactive ? [d/(i)]: i\nexpose ports ? HOST:CONTAINER : 9090:9090\ndocker run -it -p 9090:9090 smartproxy:latest -route proxy -serve 192.168.99.1:8080 ? [(y)|n] :\nLaunching...\n```\n   \n# License\n\nMIT, see license file.\n\nFeel free to use, reuse, extend, and contribute\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectisadvantag%2Fsmartproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobjectisadvantag%2Fsmartproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectisadvantag%2Fsmartproxy/lists"}