diff --git a/config.go b/config.go index 1c12f1c6..07466925 100644 --- a/config.go +++ b/config.go @@ -4,6 +4,7 @@ import ( "io/ioutil" "os" "path/filepath" + "runtime" "sync" "time" @@ -136,6 +137,16 @@ var config = configuration{ SchemaVersion: currentSchemaVersion, } +// init initializes default configuration for the current OS&ARCH +func init() { + if runtime.GOARCH == "mips" || runtime.GOARCH == "mipsle" { + // Use plain DNS on MIPS, encryption is too slow + defaultDNS = []string{"1.1.1.1", "1.0.0.1"} + // also change the default config + config.DNS.UpstreamDNS = defaultDNS + } +} + // getConfigFilename returns path to the current config file func (c *configuration) getConfigFilename() string { configFile, err := filepath.EvalSymlinks(config.ourConfigFilename) diff --git a/dhcpd/dhcpd.go b/dhcpd/dhcpd.go index f1ce0f2a..4a9eaf73 100644 --- a/dhcpd/dhcpd.go +++ b/dhcpd/dhcpd.go @@ -10,7 +10,7 @@ import ( "github.com/AdguardTeam/golibs/log" "github.com/krolaw/dhcp4" - "github.com/sparrc/go-ping" + ping "github.com/sparrc/go-ping" ) const defaultDiscoverTime = time.Second * 3 diff --git a/release.sh b/release.sh index e6370fc4..3f4cc85a 100755 --- a/release.sh +++ b/release.sh @@ -9,11 +9,9 @@ version=`git describe --abbrev=4 --dirty --always --tags` f() { make cleanfast; CGO_DISABLED=1 make if [[ $GOOS == darwin ]]; then - rm -f dist/AdGuardHome_"$version"_MacOS.zip zip dist/AdGuardHome_"$version"_MacOS.zip AdGuardHome README.md LICENSE.txt elif [[ $GOOS == windows ]]; then - rm -f dist/AdGuardHome_"$version"_Windows.zip - zip dist/AdGuardHome_"$version"_Windows.zip AdGuardHome.exe README.md LICENSE.txt + zip dist/AdGuardHome_"$version"_Windows_"$GOARCH".zip AdGuardHome.exe README.md LICENSE.txt else rm -rf dist/AdguardHome mkdir -p dist/AdGuardHome @@ -38,4 +36,7 @@ GOOS=linux GOARCH=amd64 f GOOS=linux GOARCH=386 f GOOS=linux GOARCH=arm GOARM=6 f GOOS=linux GOARCH=arm64 GOARM=6 f -GOOS=windows GOARCH=amd64 f \ No newline at end of file +GOOS=windows GOARCH=amd64 f +GOOS=windows GOARCH=386 f +GOOS=linux GOARCH=mipsle GOMIPS=softfloat f +GOOS=linux GOARCH=mips GOMIPS=softfloat f \ No newline at end of file