mirror of
https://github.com/wweir/sower.git
synced 2026-10-21 05:51:38 +00:00
Fix default config file path
This commit is contained in:
+2
-1
@@ -18,7 +18,8 @@ import (
|
||||
)
|
||||
|
||||
func initArgs() {
|
||||
flag.StringVar(&Conf.ConfigFile, "f", filepath.Dir(os.Args[0])+"/sower.toml", "config file location")
|
||||
cfgFile, _ := filepath.Abs(filepath.Join(filepath.Dir(os.Args[0]), "sower.toml"))
|
||||
flag.StringVar(&Conf.ConfigFile, "f", cfgFile, "config file location")
|
||||
flag.StringVar(&Conf.NetType, "n", "TCP", "net type (socks5 client only): "+strings.Join(transport.ListTransports(), ","))
|
||||
flag.StringVar(&Conf.Cipher, "C", "AES_128_GCM", "cipher type: "+strings.Join(shadow.ListCiphers(), ","))
|
||||
flag.StringVar(&Conf.Password, "p", "12345678", "password")
|
||||
|
||||
@@ -25,7 +25,8 @@ const name = "sower"
|
||||
const cmdsAccepted = svc.AcceptStop | svc.AcceptShutdown | svc.AcceptPauseAndContinue
|
||||
|
||||
func initArgs() {
|
||||
flag.StringVar(&Conf.ConfigFile, "f", filepath.Dir(os.Args[0])+"\\sower.toml", "config file location")
|
||||
cfgFile, _ := filepath.Abs(filepath.Join(filepath.Dir(os.Args[0]), "sower.toml"))
|
||||
flag.StringVar(&Conf.ConfigFile, "f", cfgFile, "config file location")
|
||||
flag.BoolVar(&Conf.VersionOnly, "V", false, "print sower version")
|
||||
install := flag.Bool("install", false, "install sower as a service")
|
||||
uninstall := flag.Bool("uninstall", false, "uninstall sower from service list")
|
||||
|
||||
Reference in New Issue
Block a user