httpproxy

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 8 Imported by: 0

README

HTTP Proxy - Light HTTP Proxy Server

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get -u github.com/go-zoox/http-proxy

Quick Start

package main

import (
	"fmt"
	"net/http"

	"github.com/go-zoox/http-proxy"
)

func main() {
	fmt.Println("Starting proxy at http://127.0.0.1:1080 ...")

	http.ListenAndServe(":1080", httpproxy.New())
}

// curl --proxy http://127.0.0.1:1080 http://httpbin.org

Inspiration

License

GoZoox is released under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "1.0.1"

Version is the version of this package.

Functions

func EqualFold

func EqualFold(s, t string) bool

EqualFold is strings.EqualFold, ASCII only. It reports whether s and t are equal, ASCII-case-insensitively.

Types

type Config

type Config struct {
	Port int
	//
	Username string
	Password string
}

type HTTPProxy

type HTTPProxy interface {
	ServeHTTP(w http.ResponseWriter, req *http.Request)
	Run() error
}

func New

func New(opts ...func(cfg *Config)) HTTPProxy

Directories

Path Synopsis
cmd
http-proxy command

Jump to

Keyboard shortcuts

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