cmd/httpagent: customize frontend address
This commit is contained in:
parent
e350d53954
commit
69830acffb
|
@ -8,8 +8,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
token = flag.String("token", "", "Service identifier token")
|
token = flag.String("token", "", "Service identifier token")
|
||||||
backend = flag.String("backend", "127.0.0.1:9090", "backend TCP/HTTP server")
|
backend = flag.String("backend", "127.0.0.1:9090", "backend TCP/HTTP server")
|
||||||
|
serverAddr = flag.String("server", "127.0.0.1:9234", "frontend HTTP server")
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -18,7 +19,7 @@ func main() {
|
||||||
cfg := &tunnel.ClientConfig{
|
cfg := &tunnel.ClientConfig{
|
||||||
Identifier: *token,
|
Identifier: *token,
|
||||||
LocalAddr: *backend,
|
LocalAddr: *backend,
|
||||||
ServerAddr: "127.0.0.1:9234",
|
ServerAddr: *serverAddr,
|
||||||
}
|
}
|
||||||
|
|
||||||
client, err := tunnel.NewClient(cfg)
|
client, err := tunnel.NewClient(cfg)
|
||||||
|
|
Loading…
Reference in New Issue