How to connect to endpoints?

100 views
Skip to first unread message

rov...@gmail.com

unread,
Sep 21, 2016, 2:42:23 PM9/21/16
to martianproxy-users
Hello,

I can't seem to figure out how to access any of the endpoints.

Built from master since 2.0.0-beta2 doesn't seem to support HARs:
go get github.com/google/martian/
go
get -v golang.org/x/net/websocket
go install github
.com/google/martian/cmd/proxy

Proxy is executed as follows (without explicitly specified -api-addr it crashes with "strconv.ParseInt: parsing ":8181": invalid syntax"):
proxy -har=true -generate-ca-cert=true -api-addr=8181 -v=5

The proxy works and processes requests, but when trying to connect to, for example, logs endpoint:
curl -v -x localhost:8080 -X GET "http://martian.proxy/logs"

I am getting this,

HTTP
/1.1 502 Bad Gateway
Warning: 199 "martian" "dial tcp: lookup martian.proxy: getaddrinfow: No such host is known." "Wed, 21 Sep 2016 21:27:07 GMT"

So far I have tried changing the host with -api attribute, binding on different addresses, and ports, but nothing worked.

Would appreciate any pointers about what I am doing wrong.

Bramha Ghosh

unread,
Sep 21, 2016, 10:48:52 PM9/21/16
to rov...@gmail.com, martianproxy-users
You didn't do anything wrong - the recent change of serving the proxy API on a separate port seems to have introduced a (pretty big) bug.  It should be forwarding requests to martian.proxy to localhost.  I'm looking into it, and I'll update this thread as soon as I figure out what's going on here.  We really do need an end-to-end test on main.go

Also, I just merged a PR (https://github.com/google/martian/pull/121) to address the ParseInt error.

Apologies!

-Bramha

--
You received this message because you are subscribed to the Google Groups "martianproxy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to martianproxy-us...@googlegroups.com.
To post to this group, send email to martianpr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/martianproxy-users/959a412d-dd57-444b-92c2-c92324407206%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bramha Ghosh

unread,
Sep 21, 2016, 11:09:54 PM9/21/16
to rov...@gmail.com, martianproxy-users
I think I found it and just pushed the fix.

Get latest from master and give it a shot.

Please let me know if you have any more issues!

Bramha

rov...@gmail.com

unread,
Sep 22, 2016, 4:23:11 AM9/22/16
to martianproxy-users, rov...@gmail.com
Thank you!
To unsubscribe from this group and stop receiving emails from it, send an email to martianproxy-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages