mirror of
https://github.com/wweir/sower.git
synced 2024-04-21 12:42:15 +00:00
21 lines
446 B
Go
21 lines
446 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() {
|
|
conf := conf.Conf
|
|
glog.Infoln("Starting:", conf)
|
|
|
|
if conf.ServerAddr == "" {
|
|
proxy.StartServer(conf.NetType, conf.ServerPort, conf.Cipher, conf.Password)
|
|
} else {
|
|
go dns.StartDNS(conf.DnsServer)
|
|
proxy.StartClient(conf.NetType, conf.ServerAddr, conf.Cipher, conf.Password)
|
|
}
|
|
}
|