mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2024-04-21 12:21:34 +00:00
36 lines
839 B
Go
36 lines
839 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
|
|
"github.com/p4gefau1t/trojan-go/common"
|
|
"github.com/p4gefau1t/trojan-go/log"
|
|
|
|
//the following modules are optional
|
|
//you can comment some of them if you don't need them
|
|
_ "github.com/go-sql-driver/mysql"
|
|
_ "github.com/p4gefau1t/trojan-go/cert"
|
|
_ "github.com/p4gefau1t/trojan-go/daemon"
|
|
_ "github.com/p4gefau1t/trojan-go/easy"
|
|
_ "github.com/p4gefau1t/trojan-go/log/golog"
|
|
_ "github.com/p4gefau1t/trojan-go/proxy/client"
|
|
_ "github.com/p4gefau1t/trojan-go/proxy/relay"
|
|
_ "github.com/p4gefau1t/trojan-go/proxy/server"
|
|
_ "github.com/p4gefau1t/trojan-go/version"
|
|
//_ "github.com/p4gefau1t/trojan-go/log/simplelog"
|
|
)
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
for {
|
|
h, err := common.PopOptionHandler()
|
|
if err != nil {
|
|
log.Fatal("invalid options")
|
|
}
|
|
err = h.Handle()
|
|
if err == nil {
|
|
break
|
|
}
|
|
}
|
|
}
|