https://github.com/yuokada/debugproxy
Proxy server for request debug
https://github.com/yuokada/debugproxy
golang proxy
Last synced: 11 months ago
JSON representation
Proxy server for request debug
- Host: GitHub
- URL: https://github.com/yuokada/debugproxy
- Owner: yuokada
- License: mit
- Created: 2017-05-14T02:20:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-07T16:46:24.000Z (over 7 years ago)
- Last Synced: 2025-01-11T17:34:54.393Z (about 1 year ago)
- Topics: golang, proxy
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# debugproxy
[](https://godoc.org/github.com/yuokada/debugproxy)
Proxy server for debugging request/response
## Install
``` sh
% go get github.com/yuokada/debugproxy
```
## Usage
``` sh
% 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
``` bash
% curl -i http://localhost:8081/
```
Server side
``` bash
% 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
It Works!
------- Debug end --------
```