summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMidori2023-01-16 11:17:49 +0900
committerMidori2023-01-16 11:17:49 +0900
commite5ece7ad4f541f2a5fe3a2e6268d6fb48a692277 (patch)
tree153566ce228b2e6d53f33fe3c12d3e19a1ba4466
parent4d4a7f312f1c2eb986967684d7affe1d37f41a1f (diff)
downloadaur-e5ece7ad4f541f2a5fe3a2e6268d6fb48a692277.tar.gz
v5.0.0
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD24
-rw-r--r--config.yaml119
-rw-r--r--sysusers1
-rw-r--r--tmpfiles2
6 files changed, 16 insertions, 152 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 157cf5e3c48b..21cfded44951 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,18 @@
pkgbase = mosdns-bin
pkgdesc = 一个 DNS 转发器
- pkgver = 4.5.3
- pkgrel = 4
+ pkgver = 5.0.0
+ pkgrel = 1
url = https://github.com/IrineSistiana/mosdns/
arch = x86_64
license = GPL3
- optdepends = v2ray-domain-list-community: geosite.dat
- optdepends = v2ray-geoip: geoip.dat
- optdepends = v2ray-rules-dat-git: geosite.dat & geoip.dat
- optdepends = redis: redis support in cache plugin
provides = mosdns
- backup = etc/mosdns/config.yaml
- source = mosdns-bin-4.5.3.zip::https://github.com/IrineSistiana/mosdns/releases/download/v4.5.3/mosdns-linux-amd64.zip
- source = config.yaml
+ source = mosdns-bin-5.0.0.zip::https://github.com/IrineSistiana/mosdns/releases/download/v5.0.0/mosdns-linux-amd64.zip
source = service
source = sysusers
source = tmpfiles
- sha256sums = c970f5a5502256d6ef0e3b9729c325f3fca96f1bc09f0573efce9f3ee1cd67a2
- sha256sums = 5ff706ed3d6e5e8624e6f8b276ed1e476be8ebc4747043e63999c8a9f9324ea8
+ sha256sums = 70e18bc31de9e6fbfa17d3f82316394eab201139475ab134d2e6122aca0976ff
sha256sums = 8bb851c5413e0e25e18e9d912a35b1500b54531ea961d4fc6cc8416173311c17
- sha256sums = 98fe6799dea2f84edcc89c01102cf224afb89c745a624734ea93cf2750398f5d
- sha256sums = 0be8eb1cdf1dd563f829c2ab86a00be4d889d22a29e34c9582caff5c2876a2e1
+ sha256sums = e6bc5034452123491e3901e2741183d528a29b00f1c01d6bbbb204549fee7306
+ sha256sums = 73c47567934255c4030ab06798a602989c257c187cf0c00132fbc839c902b096
pkgname = mosdns-bin
diff --git a/.gitignore b/.gitignore
index 3f59f78854aa..e761e4afcbc8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,6 @@
!.SRCINFO
!.gitignore
!PKGBUILD
-!config.yaml
!service
!sysusers
-!tmpfiles \ No newline at end of file
+!tmpfiles
diff --git a/PKGBUILD b/PKGBUILD
index ebfabe8262f7..7403d28fa7da 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,29 @@
# Maintainer: suienzan <suienzan at gmail dot com>
_pkgname=mosdns
pkgname=${_pkgname}-bin
-pkgver=4.5.3
-pkgrel=4
+pkgver=5.0.0
+pkgrel=1
pkgdesc="一个 DNS 转发器"
arch=('x86_64')
url="https://github.com/IrineSistiana/mosdns/"
license=('GPL3')
-optdepends=('v2ray-domain-list-community: geosite.dat'
- 'v2ray-geoip: geoip.dat'
- 'v2ray-rules-dat-git: geosite.dat & geoip.dat'
- 'redis: redis support in cache plugin')
-backup=('etc/mosdns/config.yaml')
provides=('mosdns')
source=(
- "$pkgname-$pkgver.zip::https://github.com/IrineSistiana/mosdns/releases/download/v${pkgver}/mosdns-linux-amd64.zip"
- "config.yaml"
+ "$pkgname-$pkgver.zip::https://github.com/IrineSistiana/mosdns/releases/download/v${pkgver//_/-}/mosdns-linux-amd64.zip"
"service"
"sysusers"
"tmpfiles"
)
-sha256sums=('c970f5a5502256d6ef0e3b9729c325f3fca96f1bc09f0573efce9f3ee1cd67a2'
- '5ff706ed3d6e5e8624e6f8b276ed1e476be8ebc4747043e63999c8a9f9324ea8'
+sha256sums=('70e18bc31de9e6fbfa17d3f82316394eab201139475ab134d2e6122aca0976ff'
'8bb851c5413e0e25e18e9d912a35b1500b54531ea961d4fc6cc8416173311c17'
- '98fe6799dea2f84edcc89c01102cf224afb89c745a624734ea93cf2750398f5d'
- '0be8eb1cdf1dd563f829c2ab86a00be4d889d22a29e34c9582caff5c2876a2e1')
+ 'e6bc5034452123491e3901e2741183d528a29b00f1c01d6bbbb204549fee7306'
+ '73c47567934255c4030ab06798a602989c257c187cf0c00132fbc839c902b096')
package() {
install -Dm755 mosdns "$pkgdir"/usr/bin/mosdns
- install -Dm644 sysusers "$pkgdir/usr/lib/sysusers.d/mosdns.conf"
- install -Dm644 tmpfiles "$pkgdir/usr/lib/tmpfiles.d/mosdns.conf"
+ install -Dm644 sysusers "$pkgdir"/usr/lib/sysusers.d/mosdns.conf
+ install -Dm644 tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/mosdns.conf
install -Dm644 service "$pkgdir"/usr/lib/systemd/system/mosdns.service
- install -Dm644 config.yaml "$pkgdir"/etc/mosdns/config.yaml
}
diff --git a/config.yaml b/config.yaml
deleted file mode 100644
index d35a2fc256eb..000000000000
--- a/config.yaml
+++ /dev/null
@@ -1,119 +0,0 @@
-log:
- level: debug
- file: ""
-
-data_providers:
- - tag: geosite
- file: /usr/share/v2ray/geosite.dat
- auto_reload: true
- - tag: geoip
- file: /usr/share/v2ray/geoip.dat
- auto_reload: true
-
-plugins:
- # 缓存
- - tag: cache
- type: cache
- args:
- size: 1024
-
- # 转发至本地服务器的插件
- - tag: forward_local
- type: fast_forward
- args:
- upstream:
- - addr: https://1.12.12.12/dns-query
-
- # 转发至远程服务器的插件
- - tag: forward_remote
- type: fast_forward
- args:
- upstream:
- - addr: https://45.11.45.11/dns-query
-
- # 匹配本地域名的插件
- - tag: query_is_local_domain
- type: query_matcher
- args:
- domain:
- - 'provider:geosite:cn'
-
- # 匹配非本地域名的插件
- - tag: query_is_non_local_domain
- type: query_matcher
- args:
- domain:
- - 'provider:geosite:geolocation-!cn'
-
- # 匹配广告域名的插件
- - tag: query_is_ad_domain
- type: query_matcher
- args:
- domain:
- - 'provider:geosite:category-ads-all'
-
- # 匹配本地 IP 的插件
- - tag: response_has_local_ip
- type: response_matcher
- args:
- ip:
- - 'provider:geoip:cn'
-
- # 主要的运行逻辑插件
- # sequence 插件中调用的插件 tag 必须在 sequence 前定义,
- # 否则 sequence 找不到对应插件。
- - tag: main_sequence
- type: sequence
- args:
- exec:
- # 缓存
- - cache
-
- # 屏蔽广告域名
- - if: query_is_ad_domain
- exec:
- - _new_nxdomain_response
- - _return
-
- # 已知的本地域名用本地服务器解析
- - if: query_is_local_domain
- exec:
- - forward_local
- - _return
-
- # 已知的非本地域名用远程服务器解析
- - if: query_is_non_local_domain
- exec:
- - forward_remote
- - _return
-
- # 剩下的未知域名用 IP 分流。
- # 这里借助了 `fallback` 工作机制。分流原理请参考 `fallback`
- # 的工作流程。
- # primary 从本地服务器获取应答,丢弃非本地 IP 的结果。
- - primary:
- - forward_local
- - if: "(! response_has_local_ip) && [_response_valid_answer]"
- exec:
- - _drop_response
- # secondary 从远程服务器获取应答。
- secondary:
- - _prefer_ipv4
- - forward_remote
- # 这里建议设置成 local 服务器正常延时的 2~5 倍。
- # 这个延时保证了 local 延时偶尔变高时,其结果不会被 remote 抢答。
- # 如果 local 超过这个延时还没响应,可以假设 local 出现了问题。
- # 这时用就采用 remote 的应答。单位: 毫秒。
- fast_fallback: 200
-
-servers:
- - exec: main_sequence
- listeners:
- - protocol: udp
- addr: 127.0.0.1:53
- - protocol: tcp
- addr: 127.0.0.1:53
- - protocol: udp
- addr: "[::1]:53"
- - protocol: tcp
- addr: "[::1]:53" \ No newline at end of file
diff --git a/sysusers b/sysusers
index 406307b57561..b94e75741976 100644
--- a/sysusers
+++ b/sysusers
@@ -1,2 +1 @@
u mosdns - "Mosdns" /var/lib/mosdns
-m mosdns redis
diff --git a/tmpfiles b/tmpfiles
index 2edd6ffe0198..84378b2b6393 100644
--- a/tmpfiles
+++ b/tmpfiles
@@ -1 +1 @@
-d /var/lib/mosdns 0750 mosdns mosdns \ No newline at end of file
+d /var/lib/mosdns 0750 mosdns mosdns