{"id":13817278,"url":"https://github.com/bigwhite/govanityurls","last_synced_at":"2025-05-15T19:31:08.785Z","repository":{"id":57490905,"uuid":"95630953","full_name":"bigwhite/govanityurls","owner":"bigwhite","description":"Use a custom domain in your Go import path","archived":false,"fork":true,"pushed_at":"2021-08-27T08:00:29.000Z","size":16,"stargazers_count":42,"open_issues_count":0,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-19T14:43:03.344Z","etag":null,"topics":["go","go-get","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"GoogleCloudPlatform/govanityurls","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigwhite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-28T05:13:33.000Z","updated_at":"2024-03-28T07:39:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bigwhite/govanityurls","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/bigwhite%2Fgovanityurls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigwhite%2Fgovanityurls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigwhite%2Fgovanityurls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigwhite%2Fgovanityurls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigwhite","download_url":"https://codeload.github.com/bigwhite/govanityurls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254407275,"owners_count":22066206,"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":["go","go-get","golang"],"created_at":"2024-08-04T06:00:39.269Z","updated_at":"2025-05-15T19:31:08.515Z","avatar_url":"https://github.com/bigwhite.png","language":"Go","funding_links":[],"categories":["Misc"],"sub_categories":[],"readme":"\n**Note: The origin GoogleCloudPlatform/govanityurls has already supported to be run as a standalone server and it add more flexible repo matching policies. so I advise you use the origin one. This repo will not be maintained later.\n\n\n# Go Vanity URLs for normal VPS(virtual private server)\n\nGo Vanity URLs is a simple app that allows you to set custom import paths for your Go packages. \n\n\u003eNote: **This go vanity urls is forked from GoogleCloudPlatform/govanityurls. GoogleCloudPlatform/govanityurls only works on google app engine. go vanity urls here could work on normal VPS.**\n\n## Quickstart\n\nInstall go vanity urls:\n\n```\n$ go get github.com/bigwhite/govanityurls\n```\n\nEdit `vanity.yaml` to add any number of git repos. E.g., `tonybai.com/gowechat` will\nserve the [https://github.com/bigwhite/gowechat](https://github.com/bigwhite/gowechat) repo.\n\n```\n/gowechat:\n  repo: https://github.com/bigwhite/gowechat\n\n/x/experiments:\n  repo: https://github.com/bigwhite/experiments\n```\nYou can add as many rules as you wish.\n\n\u003eBefore run the app, point your custom domain to the vps ip where govanityurl deployed. \n\ngovanityurls listens on address \"0.0.0.0:8080\" as default. It is better to use a reverse proxy to transfer the real go get requests because you may have other services under your domain. Below is a nginx config example on ubuntu 16.04:\n\n```\n// /etc/nginx/conf.d/default.conf\nserver {\n        listen 80;\n        listen 443 ssl;\n        server_name tonybai.com;\n\n        ssl_certificate           /etc/nginx/cert.crt;\n        ssl_certificate_key       /etc/nginx/cert.key;\n        ssl on;\n\n        location /gowechat {\n                proxy_pass http://10.11.36.23:8080;\n                proxy_redirect off;\n                proxy_set_header Host $host;\n                proxy_set_header X-Real-IP $remote_addr;\n                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\n                proxy_http_version 1.1;\n                proxy_set_header Upgrade $http_upgrade;\n                proxy_set_header Connection \"upgrade\";\n        }\n}\n```\n\nRun the app:\n\n```\n$ cd $(go env GOPATH)/src/github.com/bigwhite/govanityurls\n$ govanityurls -host tonybai.com\n```\n\nThat's it! You can use `go get` to get the package from your custom domain.\n\n```\n$ go get tonybai.com/gowechat\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigwhite%2Fgovanityurls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigwhite%2Fgovanityurls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigwhite%2Fgovanityurls/lists"}