{"id":13563801,"url":"https://github.com/reddec/redirect","last_synced_at":"2026-03-15T12:04:41.271Z","repository":{"id":57538597,"uuid":"54228144","full_name":"reddec/redirect","owner":"reddec","description":"Simple, very fast, in a single binary, with web UI HTTP redirect service","archived":false,"fork":false,"pushed_at":"2021-02-19T09:16:06.000Z","size":211,"stargazers_count":19,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-02T11:02:02.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/reddec/redirect/","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/reddec.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":"2016-03-18T19:59:39.000Z","updated_at":"2025-01-25T14:29:45.000Z","dependencies_parsed_at":"2022-09-19T07:31:41.373Z","dependency_job_id":null,"html_url":"https://github.com/reddec/redirect","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/reddec/redirect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fredirect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fredirect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fredirect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fredirect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddec","download_url":"https://codeload.github.com/reddec/redirect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fredirect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264862463,"owners_count":23674978,"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-08-01T13:01:23.429Z","updated_at":"2025-10-15T16:15:10.974Z","avatar_url":"https://github.com/reddec.png","language":"Go","readme":"# HTTP service discovery\n\n![Mx](docs/logo.svg)\n\n[![GitHub release](https://img.shields.io/github/release/reddec/redirect.svg)](https://github.com/reddec/redirect/releases)\n[![license](https://img.shields.io/github/license/reddec/redirect.svg)](https://github.com/reddec/redirect)\n[![](https://godoc.org/github.com/reddec/redirect?status.svg)](http://godoc.org/github.com/reddec/redirect)\n[![Snap Status](https://build.snapcraft.io/badge/reddec/redirect.svg)](https://build.snapcraft.io/user/reddec/redirect)\n\nSimple, very fast, in a single binary, with web UI HTTP redirect service\n\n# Install\n\n[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/redirect-to)\n\n* [snapcraft: redirect-to](https://snapcraft.io/redirect-to)\n\n* Precompilled binaries: [release page](https://github.com/reddec/redirect/releases)\n\n* From source (required Go toolchain):\n\n```\ngo get -v -u github.com/reddec/redirect/...\n```\n\n**snapcraft use `redirect-to` package**\n\n# WEB panel\n\n![web interface](http://reddec.github.io/images/redirect_ui.png)\n\n# Usage\n\n## Docker\n\nTranslate this ports as you wish:\n\n* `10100` - main redirect server\n* `10101` - UI web panel\n\nUse exposed volume `/etc/redirect` to persist data\n## CLI\n\n### -bind\n\nRedirect address (default \"0.0.0.0:10100\"). You can do any HTTP operation\nto address http://your-server:10100/your/cool/service/name and it will be redirected to specified address\n\n### -config\n\nFile to save configuration (default \"./redir.json\").\nIt will be loaded at startup (if exists) and saved after each modification operation over API\n\n### -ui\n\nDirectory of static UI files. If not defined - embedded used\n\n### -ui-addr string\n\nAddress for UI (default \"127.0.0.1:10101\")\n\n* `/` - Will be served as static directory from specified directory\n* `/ui/` - UI interface\n* `/api/`  - API handlers\n\n# Actions on redirect server\n\n* `GET/POST/PUT/DELETE` - returns redirection with 302 Found status\n* `HEAD` - returns only real service location in `Location` header with 200 OK status\n\n# API\n\n### GET\n\nGet list of services or detailed information of one service if service name provided.\nAdds into response headers (`X-Redir-Port`) port of main server\n\n* Endpoint (all):  `http://ui-addr/api/`\n* Endpoint (one):  `http://ui-addr/api/your/cool/service/name`\n\n### POST\n\nAdd or update one service. If service already exists, hits will saved.\nExpects this form fields:\n\n* `service` - service name\n* `template` - content of template\n\nEach template must be valid expression of [Go template engine](https://golang.org/pkg/text/template/)\nwith [http request](https://golang.org/pkg/net/http/#Request) as environment.\n\n#### Simple example\n\n* `service` = google\n* `template` = http://google.com\n\nAll requests to http://127.0.0.1:10100/google will be redirected to http://google.com\n\n#### Complex example\n\n* `service` = mdn\n* `template`\n\n    https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/{{.URL.Query.Get \"q\"}}\n\nAll requests to http://127.0.0.1:10100/mdn?q=QUERY will be redirected to\nhttps://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/QUERY\n\nE.x.:\n\n`http://127.0.0.1:10100/mdn?q=encodeuricomponent` maps to\n`https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/encodeuricomponent`\n\n* Endpoint:  `http://ui-addr/api/`\n\n### DELETE\n\nRemove service if it exists\n\n* Endpoint:  `http://ui-addr/api/your/cool/service/name`\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fredirect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddec%2Fredirect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fredirect/lists"}