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

Unable to Specify that Proxy should listen on an address #316

Open
oliverisaac opened this issue Mar 31, 2021 · 0 comments
Open

Unable to Specify that Proxy should listen on an address #316

oliverisaac opened this issue Mar 31, 2021 · 0 comments

Comments

@oliverisaac
Copy link

If one tries to start the martian proxy such that it listens on only localhost then an error is thrown:

$ $GOPATH/bin/proxy -api-addr=localhost:9090
2021/03/31 12:59:42 strconv.Atoi: parsing "localhost9090": invalid syntax

martian/cmd/proxy/main.go

Lines 337 to 348 in dacbe1a

if *apiAddr != "" {
apip := strings.Replace(*apiAddr, ":", "", 1)
port, err := strconv.Atoi(apip)
if err != nil {
log.Fatal(err)
}
// Forward traffic that pattern matches in http.DefaultServeMux
apif := servemux.NewFilter(mux)
apif.SetRequestModifier(mapi.NewForwarder("", port))
topg.AddRequestModifier(apif)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant