package main import ( "flag" "log" "git.xeserv.us/xena/route/lib/tunnel" ) var ( token = flag.String("token", "", "Service identifier token") 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() { flag.Parse() cfg := &tunnel.ClientConfig{ Identifier: *token, LocalAddr: *backend, ServerAddr: *serverAddr, } client, err := tunnel.NewClient(cfg) if err != nil { log.Fatal(err) } client.Start() }