debugproxy

command module
v0.0.0-...-f406ee3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 10 Imported by: 0

README

debugproxy

GoDoc
Proxy server for debugging request/response

Install

% go get github.com/yuokada/debugproxy

Usage

% debugproxy -h
Usage of debugproxy:
  -drequest
        set true if you debug Request (default true)
  -dresponse
        set true if you debug Response (default true)
  -dst string
        proxy destination (default "http://localhost:8080")
  -port int
        listen port (default 8081)

Client side

% curl -i http://localhost:8081/

Server side

% debugproxy -dst http://localhost:8000
------- Debug start --------
GET / HTTP/1.1
Host: localhost:8081
Accept: */*
User-Agent: curl/7.51.0
X-Forwarded-For: ::1

------- Debug end --------
------- Debug start --------
HTTP/1.0 200 OK
Connection: close
Content-Length: 19
Content-Type: text/html
Date: Sun, 14 May 2017 06:05:38 GMT
Last-Modified: Sun, 14 May 2017 02:32:45 GMT
Server: SimpleHTTP/0.6 Python/2.7.13

<h1>It Works!</h1>
------- Debug end --------

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