Closed yuanwb1984 closed 6 months ago
trust-dns tls://aa.bb.cc#5353
格式错了,正确格式:
trust-dns tls://dns.alidns.com@223.5.5.5
编译报错,是因为 wolfssl 使用 GNU autotools 构建工具,需要安装 autoconf、automake 等软件包才能执行。
以 debian 为例, 需要安装 autoconf automake libtool
才能正常编译. 其他系统对比找一找相关的包
抱歉没有看仔细,感谢大佬,编译通过,运行也不再报错; 为啥要把dns服务器的ip也写上?
抱歉没有看仔细,感谢大佬,编译通过,运行也不再报错; 为啥要把dns服务器的ip也写上?
没有ip就死循环了... chinadns-ng 连 dns.alidns.com -> 查找 /etc/resolv.conf 的 nameserver -> chinadns-ng ...
另一个原因是,避免引入所谓的 bootstrap dns (用于解析 dot/doh 服务器的域名)。
因为公共dns的ip都是众所周知的,固定不变的,没有必要使用这种方法来解析他们的域名,避免增加配置方面的负担。
再补充一些:
NPN2:chinadns-ng:# zig build -Dwolfssl <master ✗>
./autogen.sh ./autogen.sh: 60: autoreconf: not found The following command exited with error code 127 (expected 0): cd /mnt/sda/apps/github/chinadns-ng && sh -c set -o nounset; set -o errexit; set -x; install_dir='/mnt/sda/apps/github/chinadns-ng/dep/wolfssl-5.7.0-stable@aarch64-linux-gnu.2.36@cortex_a53+native@fast+lto' src_dir='dep/wolfssl-5.7.0-stable' zig_exe='/mnt/sda/zig-linux-aarch64-0.10.1/zig' target_mcpu='-target native' target_triple='' zig_cache_dir='/mnt/sda/apps/github/chinadns-ng/zig-cache' is_musl='0' lto='-flto' aesni='' intelasm='' armasm='--enable-armasm' cwd="$PWD"
cd "$src_dir"
export ZIG_LOCAL_CACHE_DIR="$zig_cache_dir" export ZIG_GLOBAL_CACHE_DIR="$zig_cache_dir"
[ "$is_musl" = 1 ] && pic_flags='-fno-pic -fno-PIC' || pic_flags='' export CC="$zig_exe cc $target_mcpu -g0 -O3 -Xclang -O3 $lto -fno-pie -fno-PIE $pic_flags -ffunction-sections -fdata-sections"
export AR="$zig_exe ar" export RANLIB="$zig_exe ranlib"
[ "$target_triple" ] && host="--host=$target_triple" || host=""
./autogen.sh ./configure \ $host \ $aesni \ $intelasm \ $armasm \ --prefix="$install_dir" \ --enable-static \ --disable-shared \ --enable-asm \ --disable-harden \ --disable-ocsp \ --disable-oldnames \ --disable-sys-ca-certs \ --enable-staticmemory \ --enable-singlethreaded \ --disable-threadlocal \ --disable-asyncthreads \ --disable-error-queue-per-thread \ --enable-openssl-compatible-defaults \ --enable-opensslextra --enable-opensslall \ --disable-dtls --disable-oldtls --enable-tls13 \ --enable-chacha --enable-poly1305 \ --enable-aesgcm --disable-aescbc \ --enable-ecc --enable-sni --enable-session-ticket \ --disable-sha224 --disable-sha3 --disable-base64encode \ --disable-crypttests --disable-benchmark --disable-examples \ EXTRA_CFLAGS="-include $cwd/src/wolfssl_opt.h" make install error: UnexpectedExitCode /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/os.zig:2490:19: 0x310aaf in unlinkatZ (build) .ISDIR => return error.IsDir, ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/fs.zig:1867:25: 0x2fbedb in deleteFileZ (build) else => |e| return e, ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/fs.zig:1848:13: 0x2e3af7 in deleteFile (build) return self.deleteFileZ(&sub_path_c); ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build/RunStep.zig:277:17: 0x34d89f in runCommand (build) return error.UnexpectedExitCode; ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build/RunStep.zig:183:5: 0x3372ef in make (build) try runCommand( ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build.zig:3653:9: 0x2be2c3 in make (build) try self.makeFn(self); ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build.zig:510:9: 0x2aba53 in makeOneStep (build) try s.make(); ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build.zig:504:17: 0x2ab987 in makeOneStep (build) return err; ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build.zig:504:17: 0x2ab987 in makeOneStep (build) return err; ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build.zig:504:17: 0x2ab987 in makeOneStep (build) return err; ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build.zig:504:17: 0x2ab987 in makeOneStep (build) return err; ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/std/build.zig:465:13: 0x2ab633 in make (build) try self.makeOneStep(s); ^ /mnt/sda/zig-linux-aarch64-0.10.1/lib/build_runner.zig:225:21: 0x2adf2f in main (build) else => return err, ^ error: the following build command failed with exit code 1: /mnt/sda/apps/github/chinadns-ng/zig-cache/o/a4ba3b6360f1e0462bd103a29c79f430/build /mnt/sda/zig-linux-aarch64-0.10.1/zig /mnt/sda/apps/github/chinadns-ng /mnt/sda/apps/github/chinadns-ng/zig-cache /root/.cache/zig -Dwolfssl NPN2:chinadns-ng:#
另外使用编译好的chinadns-ng+wolfssl@aarch64-linux-musl@generic+v8a@fast+lto,对配置里的“trust-dns tls://aa.bb.cc#5353” ,报错host required、invalid opt-value,没懂tls://域名@IP是怎么个格式;