A tool to help host go packages with vanity domains on GitHub

goredirects Build Status Coverage Report card GoDoc

by Andrew Brampton (bramp.net)

goredirects enables the use of a vanity redirect domain in your go package imports. For example, instead of using import "github.com/example/package" you could use a vanity domain, and import "example.com/package", yet still host the source code on GitHub.

Specifically, this tool creates a set of HTML files containing the go-imports meta tags, for each of your projects. This uses the remote import paths feature of go get command to redirect from your vanity domain to GitHub.com.

Example

To create a set of static HTML redirects:

$ go install bramp.net/goredirects

$ goredirects
Usage: goredirects <domain> <output dir>

$ goredirects bramp.net outputdir
# Looking under $GOROOT/src/bramp.net for all packages
...

This will search your $GOROOT/src/ for all packages, and create static HTML into the outputdir for each package.

To read more about how this tool works, checkout my blog article on the topic.

Licence (Apache 2)

This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.

Copyright 2017 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Owner
Similar Resources

C-ping is a very simple and small ping tool that sends ICMP Echo datagram to a host.

C-ping is a very simple and small ping tool that sends ICMP Echo datagram to a host.

Aug 9, 2022

Github-contribution-graph - A tool for dynamically generated contribution graphs that show your GitHub contributions for the last 7 days

GitHub-Contribution-Graph An awesome tool for dynamically generated contribution

Dec 13, 2022

EasyAgent is an infrastructure component, applied to manage the life-cycle of services on the remote host.

EasyAgent is an infrastructure component, applied to manage the life-cycle of services on the remote host.

Easyagent English | 中文 介绍 easyagent是在袋鼠云内部广泛使用的基础架构组件,最佳应用场景包括ELK体系beats等数据采集器的管控和配置管理、数栈体系自动化部署等 基本原理 easyagent主要有sidecar和server两个组件,sidecar部署在主机端,si

Nov 24, 2022

LazySSH is an SSH server that acts as a jump host only, and dynamically starts temporary virtual machines.

LazySSH is an SSH server that acts as a jump host only, and dynamically starts temporary virtual machines. If you find yourself briefly starti

Dec 11, 2022

Receive phone calls from anybody on the Web. Or host a telephony server yourself.

Receive phone calls from anybody on the Web. Or host a telephony server yourself.

WebCall WebRTC Telephony Server Browser based telephony over E2E-encrypted P2P-links with very high audio quality. WebCall is lightweight and easy to

Jan 5, 2023

⚡ 🖥️ 👾 Host your own Lightning Address on LND

⚡ 🖥️ 👾 Host your own Lightning Address on LND Lighting Wallets like BlueWallet, Blixt and many more allow us to send sats to Lighting Addresses like

Dec 22, 2022

The rest api that can manage the iptables rules of the remote host

fiewall-api firewall api是基于firewalld来远程管理iptables规则的rest-api,无需部署agent Features 指定一个主机ip,让这个主机上的iptables增加一个规则 处理单个IP或CIDR范围(xx.xx.xx.xx/mask,mac,inte

Mar 24, 2022

Ping library for Golang with multi-host support

pingo Fast and lightweight ping library for Golang with multi-host support. Features ICMP sockets: UDP port 0 means "let the kernel pick a free number

Nov 9, 2022

apache dubbo gateway,L7 proxy,virtual host,k8s ingress controller.

apache dubbo gateway,L7 proxy,virtual host,k8s ingress controller.

apache dubbo gateway,L7 proxy,virtual host,k8s ingress controller.

Jul 22, 2022
Comments
  • Start using gomodules

    Start using gomodules

    On a clean Go install, this won't install, specifically

    $ go install bramp.net/goredirects
    ../../go/src/bramp.net/goredirects/goredirects.go:23:2: cannot find package "gopkg.in/src-d/go-git.v4" in any of:
    	/usr/local/go/src/gopkg.in/src-d/go-git.v4 (from $GOROOT)
    	/Users/bramp/go/src/gopkg.in/src-d/go-git.v4 (from $GOPATH)
    

    You can fix this with

    go get -v -u gopkg.in/src-d/go-git.v4/...
    

    Setup something that install the deps automagically.

  • Ability to skip vendor and specific git remote name

    Ability to skip vendor and specific git remote name

    Introducing -include-vendor flag to generate vanity URLs for vendored packages, off by default. Adding ability to override the default "origin" remote name used to determine the URLs.

    Fixes #4 and #5

    Usage:

    goredirects -include-vendor bramp.net outputdir
    goredirects -git-remote=upstream bramp.net outputdir
    goredirects -git-remote=upstream -include-vendor bramp.net outputdir
    

    We maybe should abstract out the package and use a separate cmd using https://github.com/spf13/cobra for more user friendly CLI flag parsing. This will allow to embed this package in other logic as well.

  • Ability to configure git remote name

    Ability to configure git remote name

    Currently the remote name origin is hard coded which is used to determine the http URLs. A command line flag to specify your own remote name would be great.

  • Add vendor skip option

    Add vendor skip option

    @bramp any objection of adding a flag to omit parsing vendor if present ? Or just skip vendor by default. I don't think there is any advantage of generating vanity URLs for this. Let me know what you prefer.

Related tags
Sep 23, 2022
Proxy your Go Module`s Import Path from your own domain to a public host (e.g. github.com).

Go Modules Remote Import Path Proxy Proxy your Go Module`s Import Path from your own domain to a public host (e.g. github.com). For example Uber (buil

Nov 2, 2021
Serve vanity URLs to Go tools.

goovus serves vanity URLs to Go tools. What's In A Name? go Made for Go. o Open as in open source. vus vanity url server. go + o + vus gives goovus. Q

Sep 28, 2021
Shrek is a vanity .onion address generator written in Go.
Shrek is a vanity .onion address generator written in Go.

Shrek Shrek is a vanity .onion address generator written in Go. Usage (CLI) Shrek compiles to a single binary that can be used on the CLI. To build an

Aug 16, 2022
Vanitytorgen - Vanity Tor keys/onion addresses generator

Vanity Tor keys/onion addresses generator Assumptions You know what you are doing. You know where to copy the output files. You know how to set up a H

May 12, 2022
Get related domains / subdomains by looking at Google Analytics IDs
Get related domains / subdomains by looking at Google Analytics IDs

AnalyticsRelationships This script try to get related domains / subdomains by looking at Google Analytics IDs from a URL. First search for ID of Googl

Jan 2, 2023
Given a list of domains, you resolve them and get the IP addresses.
Given a list of domains, you resolve them and get the IP addresses.

resolveDomains Given a list of domains, you resolve them and get the IP addresses. Installation If you want to make modifications locally and compile

Oct 19, 2022
Coredns plugin for relaying .local domains

CoreDNS Local_Query This is a plugin for coredns that was developed to allow for the use of naked hosts in place of .local domains i.e example.local b

Nov 4, 2021
TLDs finder: check domain name availability across all valid top-level domains

TLD:er TLDs finder — check domain name availability across all valid top-level d

Oct 31, 2022
Ffind - A tool to find files of interest on a compromised host during a penetration test
Ffind - A tool to find files of interest on a compromised host during a penetration test

ffind ffind is a tool to find files of interest on a compromised host during a p

Jul 25, 2022