mirror of
https://github.com/wweir/sower.git
synced 2024-04-21 12:42:15 +00:00
20 lines
368 B
Go
20 lines
368 B
Go
package main
|
|
|
|
import (
|
|
"github.com/golang/glog"
|
|
"github.com/wweir/sower/conf"
|
|
"github.com/wweir/sower/dns"
|
|
"github.com/wweir/sower/proxy"
|
|
)
|
|
|
|
func main() {
|
|
glog.Infoln("Starting:", conf.Conf)
|
|
|
|
if conf.Conf.ServerAddr == "" {
|
|
proxy.StartServer(conf.Conf.ServerPort)
|
|
} else {
|
|
go dns.StartDNS(conf.Conf.DnsServer)
|
|
proxy.StartClient(conf.Conf.ServerAddr)
|
|
}
|
|
}
|