Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ipv6 too many colons #524

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bin
*.swp
.idea
7 changes: 7 additions & 0 deletions examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
module github.com/elazarl/goproxy/examples/goproxy-transparent

go 1.21.4

require (
github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a
github.com/inconshreveable/go-vhost v0.0.0-20160627193104-06d84117953b
)

require (
github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 // indirect
github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4 // indirect
)

replace github.com/elazarl/goproxy => ../
2 changes: 2 additions & 0 deletions ext/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/elazarl/goproxy/ext

go 1.21.4

require github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4 // indirect
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
module github.com/elazarl/goproxy

go 1.21.4

require github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2

require github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4 // indirect
2 changes: 1 addition & 1 deletion https.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (proxy *ProxyHttpServer) handleHttps(w http.ResponseWriter, r *http.Request
}

ctx.Logf("Running %d CONNECT handlers", len(proxy.httpsHandlers))
todo, host := OkConnect, r.URL.Host
todo, host := OkConnect, net.JoinHostPort(r.URL.Hostname(), r.URL.Port())
for i, h := range proxy.httpsHandlers {
newtodo, newhost := h.HandleConnect(host, ctx)

Expand Down