{"id":13600288,"url":"https://github.com/changkun/redir","last_synced_at":"2025-04-16T01:16:24.232Z","repository":{"id":43756949,"uuid":"322290987","full_name":"changkun/redir","owner":"changkun","description":"🧭  Full-featured, self-hosted URL shortener.","archived":false,"fork":false,"pushed_at":"2023-12-31T12:51:08.000Z","size":9108,"stargazers_count":94,"open_issues_count":1,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-16T01:16:18.676Z","etag":null,"topics":["gdpr-consent","go","golang","link-shortener","redirect-urls","redirector","url-shortener","vanity-import","vanity-url"],"latest_commit_sha":null,"homepage":"https://changkun.de/s/redir","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/changkun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["changkun"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-12-17T12:40:00.000Z","updated_at":"2025-03-07T19:01:25.000Z","dependencies_parsed_at":"2024-01-14T04:44:04.718Z","dependency_job_id":"51850533-f1bb-4b96-a6c8-3128c2139c5d","html_url":"https://github.com/changkun/redir","commit_stats":{"total_commits":92,"total_committers":3,"mean_commits":"30.666666666666668","dds":0.03260869565217395,"last_synced_commit":"09b13c3f51af5bc5e35d9e5c04b2731c7aaf3649"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changkun%2Fredir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changkun%2Fredir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changkun%2Fredir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changkun%2Fredir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/changkun","download_url":"https://codeload.github.com/changkun/redir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249178223,"owners_count":21225350,"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":["gdpr-consent","go","golang","link-shortener","redirect-urls","redirector","url-shortener","vanity-import","vanity-url"],"created_at":"2024-08-01T18:00:34.854Z","updated_at":"2025-04-16T01:16:24.210Z","avatar_url":"https://github.com/changkun.png","language":"Go","funding_links":["https://github.com/sponsors/changkun"],"categories":["Go"],"sub_categories":[],"readme":"# redir [![Latest relsease](https://img.shields.io/github/v/tag/changkun/redir?label=latest)](https://github.com/changkun/redir/releases) ![](https://changkun.de/urlstat?mode=github\u0026repo=changkun/redir)\n\nFull-featured, self-hosted URL shortener written in Go.\n\n| Features | Description |\n|:-------:|:------------|\n|**Custom Domain**| Everything is under control with your own domain |\n|**Link Shortener**| Support `/s/semantic-name` for short semantic alias for anonymous shortening |\n|**Go [Vanity Import](https://golang.org/cmd/go/#hdr-Remote_import_paths)**|Redirect `/x/repo-name` to configured VCS and `pkg.go.dev` for API documentation|\n|**Access Control**| 1) Private links won't be listed in public index page; 2) Allow link to be accessible only after a configured time point; 3) Allow warn to visitors about external URL redirects (for liability control)|\n|**Public Indexes**| Router `/s` provides a list of avaliable short links |\n|**Admin Dashboard**| Dashboard `/s?mode=admin` provides full management ability |\n|**Visitor Analysis**| Statistics visualization regarding PV, UV, Referrer, Devices, Location, etc |\n|**GDPR Compliant**| Including imprint, privacy, contact pages; optional warning about external redirects, etc. |\n\n## Documentations\n\n- [Redir APIs](./docs/api.md)\n- [Current Users](./docs/users.md)\n- [Troubleshoting](./docs/trouble.md)\n- [GDPR requirements](./docs/gdpr.md)\n\n## Web Interfaces\n\nThere are three major pages available in redir.\n\n| Admin Dashboard | Access Control | Public Indexes |\n|:---------------:|:--------------:|:--------------:|\n| Router: `/s?mode=admin` for management:\u003cbr/\u003e![](./.github/assets/admin.png) | Control a link should only be available after a certain time:\u003cbr/\u003e![](./.github/assets/wait.png) | Router `/s` provides public accessibility to see all public links:\u003cbr/\u003e![](./.github/assets/index.png) |\n\n## CLI Usage\n\nThe `redir` command offers server side operation feature from shell:\n\n```\n$ redir\n\nredir is a featured URL shortener. The redir server (run via '-s' option),\nwill connect to the default database address mongodb://localhost:27018.\nIt is possible to reconfig redir using an external configuration file.\nSee https://changkun.de/s/redir for more details.\n\nVersion: dev\n\nGoVersion: devel go1.18-39e08c6cd7 Tue Sep 21 13:18:09 2021 +0000\n\nCommand line usage:\n\n$ redir [-s] [-f \u003cfile\u003e] [-d \u003cfile\u003e] [-op \u003coperator\u003e -a \u003calias\u003e -l \u003clink\u003e -p -trust -vt \u003ctime\u003e]\n\n...\n```\n\n## Customization\n\nYou can configure redir using a configuration file.\nThe [default configuration](./internal/config/config.yml) is embedded into the binary.\n\nAlternative configuration can be used to replace default config and specified in environtment variable `REDIR_CONF`, for example `REDIR_CONF=/path/to/config.yml redir -s` to run the redir server under given configuration.\n\n## Deployment\n\n### Download Pre-Builds\n\nPlease check the [release](https://github.com/changkun/redir/releases) page.\n\n### Build from Source\n\nYou need install [Go](https://golang.org) to build the `redir` command.\n\nBuild everything into a single native binary:\n\n```sh\n$ make dashboard # build front-end\n$ make           # build back-end and embed front-end files into binary\n\n$ redir -s # run the server, require an external database\n```\n\nBuild and deploy with Docker:\n\n```\n$ docker network create traefik_proxy\n$ make dashboard \u0026\u0026 make build \u0026\u0026 make up\n```\n\n## Contributing\n\nEasiest way to contribute is to provide feedback! We would love to hear\nwhat you like and what you think is missing. PRs are also welcome.\n\n## License\n\nMIT \u0026copy; 2020-2021 [Changkun Ou](https://changkun.de)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchangkun%2Fredir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchangkun%2Fredir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchangkun%2Fredir/lists"}