Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

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

@oliverisaac

Description

@oliverisaac

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions