go-goproxy

command
v0.0.0-...-70692ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 7 Imported by: 0

README

Go goproxy

Dependencies

  • Go: 1.14.x
  • goproxy
  • Docker: >= 18.06
  • docker-compose: >= 1.25.0
  • direnv

Setup

# 1. Install `docker`, `docker-compose`, `direnv`
#------------------------------------------------------------------------------

# 2. Setup
#------------------------------------------------------------------------------
cp .envrc.local.sample .envrc.local
vi .envrc.local
direnv allow .
docker-compose build
docker-compose up

Usage

# Allow access
docker-compose exec client curl --proxy http://proxy:8080 https://github.com

# Allow access(proxy to `proxy2`)
docker-compose exec client curl --proxy http://proxy:8080 https://www.google.co.jp

# Allow access
docker-compose exec client curl --proxy http://proxy:8080 http://neverssl.com

# Allow access(proxy to `proxy2`)
docker-compose exec client curl --proxy http://proxy:8080 http://abehiroshi.la.coocan.jp

# Deny access
docker-compose exec client curl --proxy http://proxy:8080 http://nginx
# Deny access
curl --proxy http://localhost:${DOCKER_HOST_PROXY_PORT} https://github.com

# Deny access
curl --proxy http://localhost:${DOCKER_HOST_PROXY_PORT} https://www.google.co.jp

# Deny access
curl --proxy http://localhost:${DOCKER_HOST_PROXY_PORT} http://neverssl.com

# Deny access
curl --proxy http://localhost:${DOCKER_HOST_PROXY_PORT} http://abehiroshi.la.coocan.jp

# Deny access
curl --proxy http://localhost:${DOCKER_HOST_PROXY_PORT} http://nginx

Refer to

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL