mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-09 05:28:08 +08:00
update 2026-09-24 16:56:26
This commit is contained in:
1 parent
b31a5c3878
commit
e4cee331e9
6885 files changed
+3240523
No files matched your search
@@ -0,0 +1,196 @@
|
||||
log:
|
||||
level: info
|
||||
file: /tmp/run/oxidns/oxidns.log
|
||||
rotation:
|
||||
type: weekly
|
||||
max_files: 1
|
||||
api:
|
||||
http:
|
||||
listen: 0.0.0.0:9199
|
||||
auth:
|
||||
type: basic
|
||||
username: admin
|
||||
password: oxidns
|
||||
webui:
|
||||
root: /usr/share/oxidns/webui
|
||||
index: index.html
|
||||
plugins:
|
||||
- tag: download_main
|
||||
type: download
|
||||
args:
|
||||
downloads:
|
||||
- url: https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/proxy-list.txt
|
||||
dir: /etc/oxidns/rules
|
||||
filename: proxy-list.txt
|
||||
- url: https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt
|
||||
dir: /etc/oxidns/rules
|
||||
filename: gfw.txt
|
||||
- url: https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/reject-list.txt
|
||||
dir: /etc/oxidns/rules
|
||||
filename: reject-list.txt
|
||||
- url: https://anti-ad.net/easylist.txt
|
||||
dir: /etc/oxidns/rules
|
||||
filename: easylist.txt
|
||||
timeout: 30s
|
||||
startup_if_missing: true
|
||||
|
||||
- tag: proxy_domains
|
||||
type: domain_set
|
||||
args:
|
||||
files:
|
||||
- /etc/oxidns/rules/proxy-list.txt
|
||||
- /etc/oxidns/rules/gfw.txt
|
||||
|
||||
- tag: ad_rules
|
||||
type: adguard_rule
|
||||
args:
|
||||
files:
|
||||
- /etc/oxidns/rules/reject-list.txt
|
||||
- /etc/oxidns/rules/easylist.txt
|
||||
|
||||
- tag: reload_download_rules
|
||||
type: reload_provider
|
||||
args:
|
||||
- $proxy_domains
|
||||
- $ad_rules
|
||||
|
||||
- tag: subscription_refresh
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $download_main
|
||||
- exec: $reload_download_rules
|
||||
|
||||
- tag: subscription_cron
|
||||
type: cron
|
||||
args:
|
||||
timezone: Asia/Shanghai
|
||||
jobs:
|
||||
- name: refresh_download_rules
|
||||
interval: 168h
|
||||
executors:
|
||||
- $subscription_refresh
|
||||
|
||||
- tag: local_hosts
|
||||
type: hosts
|
||||
args:
|
||||
entries:
|
||||
- translate.googleapis.com 120.26.207.106
|
||||
- translate-pa.googleapis.com 120.26.207.106
|
||||
- share.dmhy.org 172.67.98.15
|
||||
short_circuit: true
|
||||
|
||||
- tag: blocked
|
||||
type: sequence
|
||||
args:
|
||||
- exec: "black_hole 0.0.0.0 ::"
|
||||
- exec: accept
|
||||
|
||||
- tag: cache_main
|
||||
type: cache
|
||||
args:
|
||||
size: 8192
|
||||
short_circuit: true
|
||||
cache_negative: true
|
||||
- tag: prefer_ipv4_main
|
||||
type: prefer_ipv4
|
||||
args:
|
||||
cache: true
|
||||
cache_ttl: 3600
|
||||
- tag: forward_local
|
||||
type: forward
|
||||
args:
|
||||
concurrent: 2
|
||||
upstreams:
|
||||
- tag: alidns_dns
|
||||
addr: https://223.5.5.5/dns-query
|
||||
port: 443
|
||||
idle_timeout: 30
|
||||
max_conns: 256
|
||||
insecure_skip_verify: false
|
||||
timeout: 5s
|
||||
enable_pipeline: false
|
||||
enable_http3: true
|
||||
- tag: dnspod_dns
|
||||
addr: https://1.12.12.12/dns-query
|
||||
port: 443
|
||||
idle_timeout: 30
|
||||
max_conns: 256
|
||||
insecure_skip_verify: false
|
||||
timeout: 5s
|
||||
enable_pipeline: false
|
||||
enable_http3: false
|
||||
short_circuit: true
|
||||
- tag: forward_remote
|
||||
type: forward
|
||||
args:
|
||||
concurrent: 2
|
||||
upstreams:
|
||||
- tag: google_dns
|
||||
addr: https://8.8.8.8/dns-query
|
||||
port: 443
|
||||
idle_timeout: 30
|
||||
max_conns: 256
|
||||
insecure_skip_verify: false
|
||||
timeout: 3s
|
||||
enable_http3: false
|
||||
- tag: cloudflare_dns
|
||||
addr: https://1.1.1.1/dns-query
|
||||
port: 443
|
||||
idle_timeout: 30
|
||||
max_conns: 256
|
||||
insecure_skip_verify: false
|
||||
enable_http3: false
|
||||
short_circuit: true
|
||||
- tag: forward_remote_proxy
|
||||
type: forward
|
||||
args:
|
||||
concurrent: 2
|
||||
upstreams:
|
||||
- tag: google_dns
|
||||
addr: https://8.8.8.8/dns-query
|
||||
port: 443
|
||||
socks5: 10.0.0.1:1080
|
||||
idle_timeout: 30
|
||||
max_conns: 256
|
||||
insecure_skip_verify: false
|
||||
timeout: 3s
|
||||
enable_http3: false
|
||||
- tag: cloudflare_dns
|
||||
addr: https://1.1.1.1/dns-query
|
||||
port: 443
|
||||
socks5: 10.0.0.1:1080
|
||||
idle_timeout: 30
|
||||
max_conns: 256
|
||||
insecure_skip_verify: false
|
||||
enable_http3: false
|
||||
short_circuit: true
|
||||
- tag: forward_remote_fallback_main
|
||||
type: fallback
|
||||
args:
|
||||
primary: forward_remote
|
||||
secondary: forward_remote_proxy
|
||||
threshold: 150
|
||||
always_standby: true
|
||||
short_circuit: true
|
||||
- tag: main_sequence
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $local_hosts
|
||||
- matches: question $ad_rules
|
||||
exec: goto blocked
|
||||
- exec: $cache_main
|
||||
- exec: $prefer_ipv4_main
|
||||
- matches: qname $proxy_domains
|
||||
exec: $forward_remote_fallback_main
|
||||
- matches: "!has_resp"
|
||||
exec: $forward_local
|
||||
- tag: udp_server
|
||||
type: udp_server
|
||||
args:
|
||||
entry: main_sequence
|
||||
listen: :5353
|
||||
- tag: tcp_server
|
||||
type: tcp_server
|
||||
args:
|
||||
entry: main_sequence
|
||||
listen: :5353
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
|
||||
INSTALL_DIR=/etc/oxidns
|
||||
CONF=/etc/oxidns/config.yaml
|
||||
BIN=/usr/bin/oxidns
|
||||
PID_FILE=/var/run/oxidns.pid
|
||||
|
||||
start_service() {
|
||||
local enabled
|
||||
config_load oxidns
|
||||
config_get_bool enabled main enabled 0
|
||||
|
||||
[ "$enabled" = "1" ] || return 0
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$BIN" start -c "$CONF" -d "$INSTALL_DIR"
|
||||
procd_set_param respawn 3600 5 0
|
||||
procd_set_param stdout 0
|
||||
procd_set_param stderr 0
|
||||
procd_set_param pidfile "$PID_FILE"
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
procd_send_signal oxidns
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop_service
|
||||
sleep 1
|
||||
start_service
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_config_trigger "config.change" "oxidns" "$0" "reload"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
config oxidns 'main'
|
||||
option enabled '0'
|
||||
option log_level 'info'
|
||||
option config '/etc/oxidns/config.yaml'
|
||||
Reference in new issue
Block a user