Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
junhui93
packages
提交
b60124ed
P
packages
项目概览
junhui93
/
packages
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
packages
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
b60124ed
编写于
3月 26, 2023
作者:
B
Beginner
提交者:
GitHub
3月 26, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #666 from qingtian110/master
mosdns: update to v5.1.3
上级
24eb26b6
e6a39f12
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
48 addition
and
139 deletion
+48
-139
net/mosdns/Makefile
net/mosdns/Makefile
+2
-20
net/mosdns/files/config.yaml
net/mosdns/files/config.yaml
+0
-119
utils/v2dat/Makefile
utils/v2dat/Makefile
+46
-0
未找到文件。
net/mosdns/Makefile
浏览文件 @
b60124ed
...
...
@@ -5,12 +5,12 @@
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
mosdns
PKG_VERSION
:=
4.5
.3
PKG_VERSION
:=
5.1
.3
PKG_RELEASE
:=
$(AUTORELEASE)
PKG_SOURCE
:=
$(PKG_NAME)
-
$(PKG_VERSION)
.tar.gz
PKG_SOURCE_URL
:=
https://codeload.github.com/IrineSistiana/mosdns/tar.gz/v
$(PKG_VERSION)
?
PKG_HASH
:=
2a13b1b1d862731cf946a8ceaa99523a0eb0eaae56045dd31207b61a5a6d47ae
PKG_HASH
:=
7db89b2399ace81e86b53e95e5260e55778ad5e6e8dd82a73dd6989dcd2e0eda
PKG_LICENSE
:=
GPL-3.0
PKG_LICENSE_FILE
:=
LICENSE
...
...
@@ -33,30 +33,12 @@ define Package/mosdns
TITLE
:=
A plug-in DNS forwarder/splitter
URL
:=
https://github.com/IrineSistiana/mosdns
DEPENDS
:=
$(GO_ARCH_DEPENDS)
+ca-bundle
PROVIDES
:=
mosdns-neo
endef
GO_PKG_TARGET_VARS
:=
$(
filter-out
CGO_ENABLED
=
%,
$(GO_PKG_TARGET_VARS)
)
CGO_ENABLED
=
0
define
Package/mosdns/install
$(call
GoPackage/Package/Install/Bin,$(1))
$(INSTALL_DIR)
$(1)/etc/init.d
$(INSTALL_BIN)
$(PKG_BUILD_DIR)/scripts/openwrt/mosdns-init-openwrt
$(1)/etc/init.d/mosdns
$(INSTALL_DIR)
$(1)/etc/mosdns
$(INSTALL_DATA)
./files/config.yaml
$(1)/etc/mosdns/config.yaml
endef
define
Package/mosdns/postinst
#!/bin/sh
# check if we are on real system
if
[
-z
"$${IPKG_INSTROOT}"
];
then
/etc/init.d/mosdns
stop
>/dev/null
2>&1
/etc/init.d/mosdns
disable
>/dev/null
2>&1
fi
exit
0
endef
$(eval
$(call
GoBinPackage,mosdns))
...
...
net/mosdns/files/config.yaml
已删除
100644 → 0
浏览文件 @
24eb26b6
log
:
level
:
error
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://8.8.8.8/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:6052
-
protocol
:
tcp
addr
:
127.0.0.1:6052
-
protocol
:
udp
addr
:
'
[::1]:6052'
-
protocol
:
tcp
addr
:
'
[::1]:6052'
utils/v2dat/Makefile
0 → 100644
浏览文件 @
b60124ed
#
# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
#
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
v2dat
PKG_SOURCE_DATE
:=
2022-12-15
PKG_SOURCE_VERSION
:=
47b8ee51fb528e11e1a83453b7e767a18d20d1f7
PKG_RELEASE
:=
1
PKG_SOURCE
:=
$(PKG_NAME)
-
$(PKG_SOURCE_DATE)
.tar.gz
PKG_SOURCE_URL
:=
https://codeload.github.com/urlesistiana/v2dat/tar.gz/
$(PKG_SOURCE_VERSION)
?
PKG_HASH
:=
dca45a31006aca3dba5f543f6990ca755ffb2bde8e533cc2bbe6bac9ec12f157
PKG_BUILD_DIR
:=
$(BUILD_DIR)
/
$(PKG_NAME)
-
$(PKG_SOURCE_VERSION)
PKG_LICENSE
:=
GPL-3.0
PKG_LICENSE_FILE
:=
LICENSE
PKG_MAINTAINER
:=
sbwml <admin@cooluc.com>
PKG_BUILD_DEPENDS
:=
golang/host
PKG_BUILD_PARALLEL
:=
1
GO_PKG
:=
github.com/urlesistiana/v2dat
include
$(INCLUDE_DIR)/package.mk
include
../../lang/golang/golang-package.mk
define
Package/v2dat
SECTION
:=
utils
CATEGORY
:=
Utilities
TITLE
:=
V2ray geo/ip data unpack tools
URL
:=
https://github.com/urlesistiana/v2dat
DEPENDS
:=
$(GO_ARCH_DEPENDS)
endef
GO_PKG_TARGET_VARS
:=
$(
filter-out
CGO_ENABLED
=
%,
$(GO_PKG_TARGET_VARS)
)
CGO_ENABLED
=
0
define
Package/v2dat/install
$(call
GoPackage/Package/Install/Bin,$(1))
endef
$(eval
$(call
GoBinPackage,v2dat))
$(eval
$(call
BuildPackage,v2dat))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录