mirror of
https://github.com/wweir/sower.git
synced 2024-04-21 12:42:15 +00:00
24 lines
417 B
Go
24 lines
417 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/wweir/sower/conf"
|
|
"github.com/wweir/sower/dns"
|
|
"github.com/wweir/sower/proxy"
|
|
)
|
|
|
|
func init() {
|
|
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
|
}
|
|
func main() {
|
|
log.Println(conf.Conf)
|
|
|
|
if conf.Conf.ServerAddr == "" {
|
|
proxy.StartServer(conf.Conf.ServerPort)
|
|
} else {
|
|
dns.StartDNS(conf.Conf.DnsServer, conf.Conf.BlockList)
|
|
proxy.StartClient(conf.Conf.ServerAddr)
|
|
}
|
|
}
|