config.go 291 Bytes
Newer Older
Lei Li's avatar
Lei Li committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main

import (
	"os"
)

func SetDnsServerEnv(isDot bool) error {
	if isDot {
		err := os.Setenv("DOT_NAMESERVER", "0.0.0.0:5300")
		if err != nil {
			return err
		}
	} else {
		err := os.Setenv("DOT_NAMESERVER", "223.5.5.5:53")
		if err != nil {
			return err
		}
	}

	return nil
}