mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 22:36:53 +00:00
refactor
This commit is contained in:
parent
cb122ff3da
commit
1581f9c4d1
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user