mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-25 22:45:46 +03:00
Merge pull request 156
Closes #593 Closes #589 * commit '6edfe1bb8e5db8a38104b69bb436736195fa6980': Add GOMIPS=softfloat More platforms
This commit is contained in:
commit
1448b7ab16
3 changed files with 17 additions and 5 deletions
11
config.go
11
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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
GOOS=windows GOARCH=amd64 f
|
||||
GOOS=windows GOARCH=386 f
|
||||
GOOS=linux GOARCH=mipsle GOMIPS=softfloat f
|
||||
GOOS=linux GOARCH=mips GOMIPS=softfloat f
|
Loading…
Reference in a new issue