-
Notifications
You must be signed in to change notification settings - Fork 248
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
Proxying via curl fails when specifying --key #287
Comments
Looks like you're not telling curl about the tls key with the --key flag.
https://curl.haxx.se/docs/manpage.html#--key
…On Mon, Apr 8, 2019, 12:04 AM Guri ***@***.***> wrote:
I am trying to setup http(s) proxy server using martian.
I generated key/certificate files and tried to run a proxy in cmd using
the following command.
./proxy -addr=:8080 -tls-addr=:8081 -api-addr=:9090 -api=localhost -cert=ca.crt -key=ca.key -har -v=2
I will show a history I tried. Please tell me how to configure or what was
wrong.
Connecting to http://google.com:80 using curl.
It worked fine.
curl command
$ http_proxy=localhost:8080 https_proxy=localhost:8081 curl -p http://google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
martin log
2019/04/08 15:55:53 INFO:
--------------------------------------------------------------------------------
Request to http://google.com:80
--------------------------------------------------------------------------------
CONNECT http://google.com:80 HTTP/1.1
Host: google.com:80
Content-Length: 0
User-Agent: curl/7.54.0
Via: 1.1 martian-006e5d3bdb04c9a1b2f8
X-Forwarded-For: ::1
X-Forwarded-Host: google.com:80
X-Forwarded-Proto: http
X-Forwarded-Url: http://google.com:80
Connecting to https://google.com:443 using curl
It didn't work fine.
curl command
$ http_proxy=localhost:8080 https_proxy=localhost:8081 curl -p https://google.com
curl: (56) Proxy CONNECT aborted
martin log
2019/04/08 15:58:30 ERROR: martian: failed to read request: tls: oversized record received with length 20037
Connecting to https://google.com:4443 using Chrome
It didn't work fine.
Chrome result
ERR_PROXY_CONNECTION_FAILED
martin log
2019/04/08 15:59:10 ERROR: martian: failed to read request: mitm: SNI not provided, failed to build certificate
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#287>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADI-eg9mBMJUyGdZyP5DF2hwd-0kxmYks5veuoXgaJpZM4chcpz>
.
|
I tried with
|
bramhaghosh
changed the title
HTTPS proxy doesn't work fine.
Proxying via curl fails when specifying --key
Jun 3, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to setup http(s) proxy server using
martian
.I generated key/certificate files and tried to run a proxy in cmd using the following command.
I will show a history I tried. Please tell me how to configure or what was wrong.
Connecting to http://google.com:80 using
curl
.It worked fine.
curl command
martin log
Connecting to https://google.com:443 using
curl
It didn't work fine.
curl command
martin log
Connecting to https://google.com:443 using
Chrome
It didn't work fine.
Chrome result
martin log
The text was updated successfully, but these errors were encountered: