You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
management "github.com/cr3a70r/shield/Management"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
logFile, err := os.OpenFile("runlog.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
} else {
|
|
|
|
log.SetOutput(logFile)
|
|
|
|
}
|
|
|
|
defer logFile.Close()
|
|
|
|
|
|
|
|
/*
|
|
|
|
proxyLog, err := os.OpenFile("proxy.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
defer proxyLog.Close()
|
|
|
|
|
|
|
|
|
|
|
|
//proxy
|
|
|
|
transport := &http.Transport{
|
|
|
|
DialContext: (&net.Dialer{
|
|
|
|
Timeout: 5 * time.Second,
|
|
|
|
}).DialContext,
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
management.Settings.Initialize()
|
|
|
|
|
|
|
|
management.StartWebserver("0.0.0.0:8080")
|
|
|
|
}
|
|
|
|
|
|
|
|
func cleanup() {
|
|
|
|
fmt.Println("Closing Application")
|
|
|
|
}
|