proxywoman/server/server.go

22 lines
556 B
Go
Raw Normal View History

2019-12-07 23:53:44 +00:00
package main
import (
"flag"
"log"
"postwoman.io/proxy/libproxy"
)
func main(){
hostPtr := flag.String("host", "localhost:9159", "the hostname that the server should listen on.");
tokenPtr := flag.String("token", "", "the Proxy Access Token used to restrict access to the server.");
flag.Parse();
finished := make(chan bool);
libproxy.Initialize(*tokenPtr, *hostPtr, onProxyStateChangeServer, false, finished);
<- finished;
}
func onProxyStateChangeServer(status string, isListening bool){
log.Printf("[ready=%v] %s", isListening, status);
}