-
Notifications
You must be signed in to change notification settings - Fork 243
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
dep lib change goproxy->martian #238
Conversation
func (p *Proxy) getRoundTripper() (http.RoundTripper, error) { | ||
roundtrip := &http.Transport{ | ||
TLSClientConfig: &tls.Config{ | ||
InsecureSkipVerify: true, |
Check failure
Code scanning / CodeQL
Disabled TLS certificate check
if len(p.options.UpstreamHTTPProxies) > 0 { | ||
roundtrip = &http.Transport{Proxy: func(req *http.Request) (*url.URL, error) { | ||
return url.Parse(p.rbhttp.Next()) | ||
}, TLSClientConfig: &tls.Config{InsecureSkipVerify: true}} |
Check failure
Code scanning / CodeQL
Disabled TLS certificate check
socks5Dialer := socks5Dialers[socks5Proxy] | ||
// use it to perform the request | ||
return socks5Dialer.Dial(network, addr) | ||
}, TLSClientConfig: &tls.Config{InsecureSkipVerify: true}} |
Check failure
Code scanning / CodeQL
Disabled TLS certificate check
while proxify is good it feels too invasive i.e errors cause domain/website to not render at all or correctly Setup
With
|
Errors obtained while debugging./proxify -ha "127.0.0.1:8080" -v
_ ___
___ _______ __ __ (_) _/_ __
/ _ \/ __/ _ \\ \ // / _/ // /
/ .__/_/ \___/_\_\/_/_/ \_, /
/_/ /___/ v0.0.8
projectdiscovery.io
[INF] HTTP Proxy Listening on 127.0.0.1:8080
[INF] Socks5 Proxy Listening on 127.0.0.1:10080
[INF] Saving proxify traffic to logs
2023/03/06 11:17:50 ERROR: martian mitm: error peeking message through CONNECT tunnel to determine type dns.projectdiscovery.io:443 : EOF
2023/03/06 11:17:50 fragment values is 0
2023/03/06 11:17:50 got connect request but not a tls handshake
2023/03/06 11:17:50
-------------
last successful parsed req and resp before error was
`<nil>`
`<nil>`
2023/03/06 11:17:50 got `malformed HTTP request "\x00"` data read from raw conn "\x00"
2023/03/06 11:17:50 ERROR: martian: failed to read request: got `malformed HTTP request "\x00"` data read from raw conn "\x00"
2023/03/06 11:17:50 martian: closing connection: 127.0.0.1:52595
2023/03/06 11:17:50
-------------
last successful parsed req and resp before error was
`&{CONNECT https://snid.snitcher.com:443 HTTP/1.1 1 1 map[Connection:[keep-alive] Proxy-Connection:[keep-alive] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0]] {} <nil> 0 [] false snid.snitcher.com:443 map[] map[] <nil> map[] 127.0.0.1:52582 snid.snitcher.com:443 <nil> <nil> <nil> <nil>}`
`<nil>`
2023/03/06 11:17:50 got `EOF` data read from raw conn ""
2023/03/06 11:17:50 martian: closing connection: 127.0.0.1:52582
2023/03/06 11:17:55
-------------
last successful parsed req and resp before error was
`<nil>`
`<nil>`
2023/03/06 11:17:55 got `EOF` data read from raw conn ""
2023/03/06 11:17:55 martian: closing connection: 127.0.0.1:52600
2023/03/06 11:17:55
-------------
last successful parsed req and resp before error was
`<nil>`
`<nil>`
2023/03/06 11:17:55 got `EOF` data read from raw conn ""
2023/03/06 11:17:55 martian: closing connection: 127.0.0.1:52588
2 |
Verdictunlike Root Cause of these Errorsthe root cause of these errors seems to be reading/handling |
Debugging and Fixing Errors
Leads
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implementation: lgtm
needs a final cross-check if any furher finalization is needed
TODO
|
@ehsandeep , After some testing it seems like it is almost stable now only malformed chunked encoding is blocker apart from that there weren't issues . (tested with more than 20k live traffic on different sites) |
I use the lateast version of proxify but steel have the same error, the certificate not work |
Proposed changes
goproxy
->google/martian
Checklist