{"id":36860186,"url":"https://github.com/usvc/echoserver","last_synced_at":"2026-01-12T14:49:24.872Z","repository":{"id":64302246,"uuid":"245863724","full_name":"usvc/echoserver","owner":"usvc","description":"A simple echoserver for use with testing HTTP-based connections in production.","archived":false,"fork":false,"pushed_at":"2020-03-17T13:08:38.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T22:04:26.031Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usvc.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":"2020-03-08T18:08:49.000Z","updated_at":"2020-03-22T04:19:55.000Z","dependencies_parsed_at":"2022-12-06T07:45:43.825Z","dependency_job_id":null,"html_url":"https://github.com/usvc/echoserver","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/usvc/echoserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usvc%2Fechoserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usvc%2Fechoserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usvc%2Fechoserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usvc%2Fechoserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usvc","download_url":"https://codeload.github.com/usvc/echoserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usvc%2Fechoserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"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":[],"created_at":"2026-01-12T14:49:24.771Z","updated_at":"2026-01-12T14:49:24.851Z","avatar_url":"https://github.com/usvc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Echoserver\n\n[![latest release](https://badge.fury.io/gh/usvc%2Fechoserver.svg)](https://github.com/usvc/echoserver/releases)\n[![pipeline status](https://gitlab.com/usvc/services/echoserver/badges/master/pipeline.svg)](https://gitlab.com/usvc/services/echoserver/-/commits/master)\n[![Build Status](https://travis-ci.org/usvc/echoserver.svg?branch=master)](https://travis-ci.org/usvc/echoserver)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/f5311cc9a7bd253f3c4a/test_coverage)](https://codeclimate.com/github/usvc/echoserver/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/f5311cc9a7bd253f3c4a/maintainability)](https://codeclimate.com/github/usvc/echoserver/maintainability)\n\nA simple echoserver for use with testing HTTP-based connections in production.\n\n- - -\n\n# Usage\n\n## Executing It\n\n### Via binary\n\nDownload the latest binaries from [https://github.com/usvc/echoserver/releases](https://github.com/usvc/echoserver/releases).\n\nThen run in your terminal:\n\n```sh\nechoserver;\n```\n\n### Via `docker run` command\n\nIn your terminal, run:\n\n```sh\ndocker run -it -p 8888:8888 usvc/echoserver:latest;\n```\n\n### Via `docker-compose` file\n\nIn a `docker-compose.yaml`, paste:\n\n```yaml\nversion: \"3.5\"\nservices:\n  echoserver:\n    build:\n      context: ..\n      dockerfile: ./deploy/Dockerfile\n    image: usvc/echoserver:latest\n    environment:\n      SERVER_ADDR: 0.0.0.0\n      SERVER_PORT: \"8888\"\n    ports:\n      - 8888:8888\n```\n\nRun it in your terminal with:\n\n```sh\ndocker-compose -f ./path/to/docker-compose.yaml up\n```\n\n## Example Queries\n\n### Full example query with cURL\n\nThe following demonstrates a fully featured `curl` request piped to `jq` (for ease of reading the result):\n\n```sh\ncurl -vv -X POST \\\n  --data '{\"hello\":[\"you\", \"world\"],\"tell_no\":1,\"its\":true,\"that\":\"tis awesome\"}' \\\n  -H 'X-Custom-Header: see-you-on-the-otherside' \\\n  -H 'Referer: http://google.com/some/path' \\\n  -H 'Cookie: a=b;c=d' \\\n  'http://username:password@localhost:8888/path/to/endpoint?query=this\u0026with=1\u0026with=2' | jq;\n```\n\nThe response to the above incantation would look like:\n\n```json\n{\n  \"id\": \"2863f52b-fce2-453b-8f50-4a4151692e53\",\n  \"request\": {\n    \"body\": {\n      \"hello\": [\n        \"you\",\n        \"world\"\n      ],\n      \"its\": true,\n      \"tell_no\": 1,\n      \"that\": \"tis awesome\"\n    },\n    \"cookies\": [\n      {\n        \"cookie\": \"a\",\n        \"value\": \"b\",\n        \"domain\": \"\",\n        \"expires\": \"0001-01-01 00:00:00 +0000 UTC\",\n        \"secure\": false,\n        \"http_only\": false\n      },\n      {\n        \"cookie\": \"c\",\n        \"value\": \"d\",\n        \"domain\": \"\",\n        \"expires\": \"0001-01-01 00:00:00 +0000 UTC\",\n        \"secure\": false,\n        \"http_only\": false\n      }\n    ],\n    \"header\": {\n      \"Accept\": [\n        \"*/*\"\n      ],\n      \"Authorization\": [\n        \"Basic dXNlcm5hbWU6cGFzc3dvcmQ=\"\n      ],\n      \"Content-Length\": [\n        \"70\"\n      ],\n      \"Content-Type\": [\n        \"application/x-www-form-urlencoded\"\n      ],\n      \"Cookie\": [\n        \"a=b;c=d\"\n      ],\n      \"Referer\": [\n        \"http://google.com/some/path\"\n      ],\n      \"User-Agent\": [\n        \"curl/7.47.0\"\n      ],\n      \"X-Custom-Header\": [\n        \"see-you-on-the-otherside\"\n      ]\n    },\n    \"hostname\": \"localhost:8888\",\n    \"form\": null,\n    \"method\": \"POST\",\n    \"password\": \"password\",\n    \"path\": \"/path/to/endpoint\",\n    \"protocol\": \"HTTP/1.1\",\n    \"query\": {\n      \"query\": [\n        \"this\"\n      ],\n      \"with\": [\n        \"1\",\n        \"2\"\n      ]\n    },\n    \"referer\": \"http://google.com/some/path\",\n    \"remote_addr\": \"127.0.0.1:55406\",\n    \"size\": 70,\n    \"user_agent\": \"curl/7.47.0\",\n    \"username\": \"username\"\n  },\n  \"errors\": [],\n  \"metadata\": {\n    \"duration_ms\": 1154,\n    \"received_timestamp\": \"2020-03-11T00:49:48.856430509+08:00\",\n    \"responded_timestamp\": \"2020-03-11T00:49:48.857584264+08:00\"\n  }\n}\n```\n\n- - -\n\n# Configuration\n\n## Environment Variables\n\n| Key | Default Value | Description |\n| --- | --- | --- |\n| `SERVER_ADDR` | `\"0.0.0.0\"` | Hostname/IP address that server should bind to |\n| `SERVER_PORT` | `\"8888\"` | Port that server should listen on |\n\n- - -\n\n# Development Runbook\n\n## Getting Started\n\n1. Clone this repository\n2. Run `make deps` to pull in external dependencies\n3. Write some awesome stuff\n4. Run `make test` to ensure unit tests are passing\n5. Push\n\n## Continuous Integration (CI) Pipeline\n\n### On Github\n\nGithub is used to deploy binaries/libraries because of it's ease of access by other developers.\n\n#### Releasing\n\nReleasing of the binaries can be done via Travis CI.\n\n1. On Github, navigate to the [tokens settings page](https://github.com/settings/tokens) (by clicking on your profile picture, selecting **Settings**, selecting **Developer settings** on the left navigation menu, then **Personal Access Tokens** again on the left navigation menu)\n2. Click on **Generate new token**, give the token an appropriate name and check the checkbox on **`public_repo`** within the **repo** header\n3. Copy the generated token\n4. Navigate to [travis-ci.org](https://travis-ci.org) and access the cooresponding repository there. Click on the **More options** button on the top right of the repository page and select **Settings**\n5. Scroll down to the section on **Environment Variables** and enter in a new **NAME** with `RELEASE_TOKEN` and the **VALUE** field cooresponding to the generated personal access token, and hit **Add**\n\n### On Gitlab\n\nGitlab is used to run tests and ensure that builds run correctly.\n\n#### Version Bumping\n\n1. Run `make .ssh`\n2. Copy the contents of the file generated at `./.ssh/id_rsa.base64` into an environment variable named **`DEPLOY_KEY`** in **Settings \u003e CI/CD \u003e Variables**\n3. Navigate to the **Deploy Keys** section of the **Settings \u003e Repository \u003e Deploy Keys** and paste in the contents of the file generated at `./.ssh/id_rsa.pub` with the **Write access allowed** checkbox enabled\n\n- **`DEPLOY_KEY`**: generate this by running `make .ssh` and copying the contents of the file generated at `./.ssh/id_rsa.base64`\n\n#### DockerHub Publishing\n\n1. Login to [https://hub.docker.com](https://hub.docker.com), or if you're using your own private one, log into yours\n2. Navigate to [your security settings at the `/settings/security` endpoint](https://hub.docker.com/settings/security)\n3. Click on **Create Access Token**, type in a name for the new token, and click on **Create**\n4. Copy the generated token that will be displayed on the screen\n5. Enter the following varialbes into the CI/CD Variables page at **Settings \u003e CI/CD \u003e Variables** in your Gitlab repository:\n\n- **`DOCKER_REGISTRY_URL`**: The hostname of the Docker registry (defaults to `docker.io` if not specified)\n- **`DOCKER_REGISTRY_USERNAME`**: The username you used to login to the Docker registry\n- **`DOCKER_REGISTRY_PASSWORD`**: The generated access token\n\n- - -\n\n# Licensing\n\nCode here is licensed under the [MIT license](./LICENSE) by [@zephinzer](https://gitlab.com/zephinzer).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusvc%2Fechoserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusvc%2Fechoserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusvc%2Fechoserver/lists"}