Comments (7)
Hi,
Thanks for the kind words, and thanks for reporting the bug.
Can you write a more detailed, step-by-step instructions how to recreate the problem?
Thanks,
from goproxy.
Here it is:
// On my router
$ iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
$ cat main.go
package main
import (
"github.com/elazarl/goproxy"
"log"
"net/http"
)
func main() {
proxy := goproxy.NewProxyHttpServer()
proxy.OnResponse().DoFunc(
func(resp *http.Response, ctx *goproxy.ProxyCtx) *http.Response {
log.Println("Resp = ", resp)
return resp
})
proxy.Verbose = true
log.Fatal(http.ListenAndServe(":8080", proxy))
}
// At other side I'm starting chromium without proxy, and get this: unsupported protocol scheme ""
$ go run *
2013/12/03 18:28:43 [001] INFO: Got request GET /
2013/12/03 18:28:43 [001] INFO: Sending request GET /
2013/12/03 18:28:43 Resp =
2013/12/03 18:28:43 [001] INFO: error read response unsupported protocol scheme "":
2013/12/03 18:28:43 [002] INFO: Got request GET /favicon.ico
2013/12/03 18:28:43 [002] INFO: Sending request GET /favicon.ico
2013/12/03 18:28:43 Resp =
2013/12/03 18:28:43 [002] INFO: error read response unsupported protocol scheme "":
from goproxy.
Can you test it now, and let me know if it works for you?
Thanks,
from goproxy.
Unfortunately, issue stil present:
$ go run *
2013/12/04 11:15:29 [001] INFO: Got request / ya.ru GET /
2013/12/04 11:15:29 [001] INFO: Sending request GET http://ya.ru/
2013/12/04 11:15:29 Resp =
2013/12/04 11:15:29 [001] INFO: error read response unsupported protocol scheme "":
2013/12/04 11:15:30 [002] INFO: Got request /favicon.ico ya.ru GET /favicon.ico
2013/12/04 11:15:30 [002] INFO: Sending request GET http://ya.ru/favicon.ico
2013/12/04 11:15:30 Resp =
2013/12/04 11:15:30 [002] INFO: error read response unsupported protocol scheme "":
2013/12/04 11:15:35 [003] INFO: Got request / linux.org.ru GET /
2013/12/04 11:15:35 [003] INFO: Sending request GET http://linux.org.ru/
2013/12/04 11:15:35 Resp =
2013/12/04 11:15:35 [003] INFO: error read response unsupported protocol scheme "":
And in browser:
unsupported protocol scheme ""
network dump: http://ge.tt/3EqEK771/v/0
from goproxy.
Here is the fix: http://ix.io/9fq
from goproxy.
@alxchk ,
Thanks for submitting the patch. I've tried a somewhat different approach.
Can you please check and see if the new version works for you?
THanks,
from goproxy.
Works ok, many thanks!
from goproxy.
Related Issues (20)
- goproxy v1.1 was discovered to contain an issue which can lead to Denial of Service (DoS) via unspecified vectors HOT 2
- Cannot connect to HTTP websocket when performing TLS MitM
- 请求头参数大小写格式在哪转换的?
- Semicolon in URL query HOT 1
- Potential Typo in Request Handling - "r.Close" misset to False?
- Question about modifying requests
- Can we do URL A -> proxy A, URL B -> proxy B?
- Limit the number of goroutines HOT 1
- Contant HOT 1
- team.works, with community support
- updating expired certificate
- NET::ERR_CERT_AUTHORITY_INVALID HOT 6
- Handle connect hijack & MITM at the same time not working HOT 2
- Core Functionality Broken HOT 6
- https only over ssh reverse proxy does not work HOT 1
- Http 3?
- MITM proxy option always uses HTTP/1.1 connection to client, can it use HTTP/2? HOT 1
- Is it possible to dump all incoming packets? I want to do packet analysis. I didn't see any code related to this. HOT 2
- Flagged as Virus HOT 2
- panic: runtime error: invalid memory address or nil pointer dereference
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goproxy.