This commit is contained in:
xvzc 2022-01-08 02:03:46 +09:00
parent cb122ff3da
commit 1581f9c4d1
3 changed files with 38 additions and 39 deletions

View File

@ -1,8 +1,8 @@
package config package config
import ( import (
"sync"
"runtime" "runtime"
"sync"
) )
type Config struct { type Config struct {
@ -22,16 +22,16 @@ func InitConfig(port string, dns string, debug bool) error {
once.Do(func() { once.Do(func() {
config = &Config{ config = &Config{
Port : port, Port: port,
DNS : dns, DNS: dns,
OS : runtime.GOOS, OS: runtime.GOOS,
Debug : debug, Debug: debug,
} }
}) })
return err return err
} }
func GetConfig() (*Config) { func GetConfig() *Config {
return config return config
} }

View File

@ -5,7 +5,6 @@ import (
"github.com/xvzc/SpoofDPI/config" "github.com/xvzc/SpoofDPI/config"
) )
func PrintWelcome() { func PrintWelcome() {
cyan := pterm.NewLettersFromStringWithStyle("Spoof", pterm.NewStyle(pterm.FgCyan)) cyan := pterm.NewLettersFromStringWithStyle("Spoof", pterm.NewStyle(pterm.FgCyan))
purple := pterm.NewLettersFromStringWithStyle("DPI", pterm.NewStyle(pterm.FgLightMagenta)) purple := pterm.NewLettersFromStringWithStyle("DPI", pterm.NewStyle(pterm.FgLightMagenta))