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.

Quick Note

We'll be using go.company.corp a lot in this document. However you can use any internal, private, or public domain as long as you can install goovus on the relevant machine.

What Does It Do?

It serves vanity URLs to go tools. Let's say you import:

import (
    "go.company.corp/libA"
    "go.company.corp/libB"
    "go.company.corp/libB/pkg"
)

Commands such as go get will attempt to communicate with a web server at go.company.corp. That web server can tell the Go tools where the source code repos are for each of those modules.

Essentially "go.company.corp/libA" can be mapped to an internal source code repo; likewise with "go.company.corp/libB". Or any other vanity URL you can conjure up.

Go Modules and Private Repos

Let's assume that go.company.corp/libA and go.company.corp/libB are private Go modules. Without a vanity URL server you have to import them as:

import (
    "go.company.corp/libA.git"
    "go.company.corp/libB.git"
    "go.company.corp/libB.git/pkg"
)

For private repos a vanity URL server can remove .git from appearing in import paths.

I think it's worth it.

Not a Go Module Proxy

goovus is NOT a Go module proxy. It does not build a module cache. It does not fetch things from the internet. It does not fetch your private repos and serve them as if it was a proxy.

In fact it's ideal when you have private repos and you DON'T want to configure a Go module proxy.

Building goovus

$ go build

But if you want goovus -v to print useful information build it with the build script.

$ ./build.sh

Configuration

Add domains used for vanity URLs to GOPRIVATE.

Continuing with libA and libB you'd set GOPRIVATE=go.company.corp in your environment. This stops go get or go mod tidy from searching the internet for any modules beginning with go.company.corp.

goovus uses a main configuration file and then one additional configuration file per vanity domain.

The default configuration file directory is $EXEHOME/conf but you can set it to any directory with the -c or -conf flags.

# $EXEHOME/conf/conf.ini ~or~ $EXEHOME/conf/hostname.ini
#
# Main configuration file.
# Create a domains= line for each vanity domain to serve.  The value is the name of a domain.ini
# file in the same directory as this file.
#
# We are serving vanity URLs for go.company.corp and decided to name the domain ini file
# go-company-corp.ini and that file exists in the same directory as this one.
domains = go-company-corp.ini
# $EXEHOME/conf/go-company-corp.ini
# This is the ini file for go.company.corp.

# Set our bind network address and the vanity domain we are serving.
listen = 0.0.0.0:443
name = go.company.corp

[certs]
# If public and private are set to paths on disk they are considered
# public/private keys and a TLS listener is created at the "host:port"
# value above.
public = /ssl/certs/go.company.corp.pem
private = /ssl/certs/go.company.corp.pem

# Next we need a [repo] section for EACH go module we are serving vanity URLs.
# In our example these are libA and libB.
#
# Note that the value for "name =" is prefixed to each repo.module and they are
# separated with a slash.
#
# In other words "go.company.corp/" is prefixed to both "libA" and "libB" to create the
# complete name the go tools are searching.
#

[repo]
module = libA
repo = ssh://gitserver/libA
vcs = git

[repo]
# As a bonus example let's say libB has v2, v3, and v4 all served out of the same repo.
module = libB
module = libB/v2
module = libB/v3
module = libB/v4
repo = ssh://gitserver/libB
vcs = git

Run goovus with:

$ goovus -s

or

$ goovus -serve
Similar Resources

Check DNS and optionally Consul and serve the status from a Web page

dns-checker Table of contents Preamble Compiling the program Keepalived and LVS Available options Setting up systemd Preamble This application checks

Nov 7, 2021

Transparent TLS and HTTP proxy serve and operate on all 65535 ports, with domain regex whitelist and rest api control

goshkan Transparent TLS and HTTP proxy serve & operating on all 65535 ports, with domain regex whitelist and rest api control tls and http on same por

Nov 5, 2022

A CoreDNS plugin to serve temporary TXT records for validation purposes (eg. Let's Encrypt DNS-01)

temptxt Name temptxt - serves TXT records for validation purposes (eg. ACME DNS-01 challenge) updated through a HTTP api. Description The temptxt plug

Aug 23, 2022

GoHTTPdirlist - Serve files and directories with Golang based http server

GoHTTPdirlist - Serve files and directories with Golang based http server

List Files and Directories with GoLang based HTTP Server TO MAKE IT WORK: go run

May 18, 2022

Pape-server - A small server written in golang to serve a random wallpaper.

pape-server I like to inject custom CSS themes into a lot of websites and electron apps, however browsers don't let websites access local disk through

Dec 31, 2021

serve a static website as a .onion hidden service

hidden service server A CLI that will host a static website as a .onion hidden service. Comes with an additional binary that can be used to generate v

Sep 4, 2022

Tools for understanding, measuring, and applying network policies effectively in kubernetes

Cyclonus network policy explainer, prober, and test case generator! Parse, explain, and probe network policies to understand their implications and he

Dec 14, 2022

A suite of gRPC debugging tools. Like Fiddler/Charles but for gRPC.

grpc-tools A suite of tools for gRPC debugging and development. Like Fiddler/Charles but for gRPC! The main tool is grpc-dump which transparently inte

Dec 22, 2022

golang consul tools

中文文档 consult A consul key/value tool for golang Usage install go get -u github.com/xxjwxc/consult@master New Config conf := consulkv.NewConfig() With

Mar 6, 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
gNXI Tools - gRPC Network Management/Operations Interface Tools

gNxI Tools gNMI - gRPC Network Management Interface gNOI - gRPC Network Operations Interface A collection of tools for Network Management that use the

Dec 15, 2022
Tools - This subrepository holds the source for various packages and tools that support

Go Tools This subrepository holds the source for various packages and tools that

Jan 12, 2022
Parse any web page for URLs and return the HTTP response code of each one.
Parse any web page for URLs and return the HTTP response code of each one.

ParseWebPage - Fully Functional WebPage Parser Parse any web page for URLs and return the HTTP response code of each one. Creators ?? Steven Williams

Oct 25, 2021
A fast subdomain enumerator for web URLs using the power of Goroutines.
A fast subdomain enumerator for web URLs using the power of Goroutines.

gosublister A fast subdomain enumerator for web URLs written in go with goroutines. Options Usage: gosublister -u [URL] [Other Flags] Flags: -u,

May 7, 2023
Simple, secure and modern Go HTTP server to serve static sites, single-page applications or a file with ease

srv srv is a simple, secure and modern HTTP server, written in Go, to serve static sites, single-page applications or a file with ease. You can use it

Sep 7, 2022
fetch and serve papers in p2p network

sci-hub P2P A project aims to fetch paper from the BitTorrent network. This is not a cli client of sci-hub website. English Introduction 中文简介 Contribu

Dec 13, 2022
TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts.
TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts.

pixie TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts. pixie comes embedded with the following ROMs provided by the iPXE pro

Dec 31, 2022
Serve traffic (HTTP/gRPC) over SSH using Domain Sockets

Serve On SSH Introduction There is often a need to offer services for administrative purposes on servers or even for microservices that are running on

Nov 10, 2022
Serve endpoint metadata for client side load balancing

Servok Servok is a service that provides endpoint metadata for client side load balancing. See CONTRIBUTING.md for instructions on how to contribute a

Dec 9, 2021