GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Firstnsnd/docker-proxy: A package for setting up a proxy for the Docker registry Harbor.

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
example
example
 
 
images
images
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
proxy.go
proxy.go
 
 

Repository files navigation

Reverse Proxy Library

This Go library provides a reverse proxy implementation to handle requests and modify headers for a specified target domain.

How It Works

The following diagram illustrates the flow of request/response between client, proxy, and target domain.

docker login

docker-login

docker push

docker-push

Features

  • Reverse proxy setup using net/http/httputil.
  • Automatic header modification for Www-Authenticate and Location.
  • TLS configuration to skip certificate verification (for testing purposes).

Installation

To use this library, you need to have Go installed. You can get the library by running:

go get github.com/Firstnsnd/docker-proxy

Usage

Import the package in your Go application:

import "github.com/Firstnsnd/docker-proxy"

Create a new reverse proxy and start handling requests:

package main

import (
	"github.com/Firstnsnd/docker-proxy"
	"log"
	"net/http"
)

var domain = "your_harbor_domain"

func main() {
	reverseProxy, err := proxy.NewReverseProxy(domain)
	if err != nil {
		log.Fatalf("Error creating reverse proxy: %v", err)
	}

	http.HandleFunc("/", reverseProxy.HandleRequest)

	log.Println("Starting proxy server on :8099")
	if err := http.ListenAndServe(":8099", nil); err != nil {
		log.Fatalf("Error starting server: %v", err)
	}
}

Configuration

  • Domain: Set the domain variable in your application to the target domain you want to proxy.
  • TLS InsecureSkipVerify: Currently set to true for testing. Do not use this setting in production.

Contributing

Feel free to submit issues or pull requests if you find any bugs or have suggestions for improvements.

License

This project is licensed under the MIT License.

About

A package for setting up a proxy for the Docker registry Harbor.

Topics

container-registriescontainer-registrycontainer-registry-proxydockerdocker-proxydocker-registrydockerhubharborharbor-proxyimageimage-proxyregistry-proxy

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.