nikki: sync upstream

last commit: 1dd1fac110
This commit is contained in:
gitea-action 2025-02-25 22:00:25 +08:00
parent d504fb2a55
commit 292ebaf908
3 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=nikki PKG_NAME:=nikki
PKG_RELEASE:=6 PKG_RELEASE:=7
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git

View File

@ -84,6 +84,7 @@ config mixin 'mixin'
list 'tun_dns_hijacks' 'udp://any:53' list 'tun_dns_hijacks' 'udp://any:53'
option 'tun_endpoint_independent_nat' '0' option 'tun_endpoint_independent_nat' '0'
option 'dns_port' '1053' option 'dns_port' '1053'
option 'dns_ipv6' '1'
option 'dns_mode' 'fake-ip' option 'dns_mode' 'fake-ip'
option 'fake_ip_range' '198.18.0.1/16' option 'fake_ip_range' '198.18.0.1/16'
option 'fake_ip_filter' '0' option 'fake_ip_filter' '0'
@ -92,7 +93,6 @@ config mixin 'mixin'
option 'fake_ip_cache' '1' option 'fake_ip_cache' '1'
option 'dns_respect_rules' '0' option 'dns_respect_rules' '0'
option 'dns_doh_prefer_http3' '0' option 'dns_doh_prefer_http3' '0'
option 'dns_ipv6' '0'
option 'dns_system_hosts' '0' option 'dns_system_hosts' '0'
option 'dns_hosts' '1' option 'dns_hosts' '1'
option 'hosts' '0' option 'hosts' '0'

View File

@ -30,9 +30,6 @@ config['external-ui-name'] = uci.get('nikki', 'mixin', 'ui_name') ?? '';
config['external-ui-url'] = uci.get('nikki', 'mixin', 'ui_url'); config['external-ui-url'] = uci.get('nikki', 'mixin', 'ui_url');
config['external-controller'] = '0.0.0.0' + ':' + (uci.get('nikki', 'mixin', 'api_port') ?? '9090'); config['external-controller'] = '0.0.0.0' + ':' + (uci.get('nikki', 'mixin', 'api_port') ?? '9090');
config['secret'] = uci.get('nikki', 'mixin', 'api_secret') ?? '666666'; config['secret'] = uci.get('nikki', 'mixin', 'api_secret') ?? '666666';
config['profile'] = {};
config['profile']['store-selected'] = uci_bool(uci.get('nikki', 'mixin', 'selection_cache'));
config['profile']['store-fake-ip'] = uci_bool(uci.get('nikki', 'mixin', 'fake_ip_cache'));
config['allow-lan'] = uci_bool(uci.get('nikki', 'mixin', 'allow_lan')); config['allow-lan'] = uci_bool(uci.get('nikki', 'mixin', 'allow_lan'));
config['port'] = int(uci.get('nikki', 'mixin', 'http_port') ?? '8080'); config['port'] = int(uci.get('nikki', 'mixin', 'http_port') ?? '8080');
@ -73,6 +70,7 @@ if (uci.get('nikki', 'proxy', 'tcp_transparent_proxy_mode') == 'tun' || uci.get(
config['dns'] = {}; config['dns'] = {};
config['dns']['enable'] = true; config['dns']['enable'] = true;
config['dns']['listen'] = '0.0.0.0' + ':' + (uci.get('nikki', 'mixin', 'dns_port') ?? '1053'); config['dns']['listen'] = '0.0.0.0' + ':' + (uci.get('nikki', 'mixin', 'dns_port') ?? '1053');
config['dns']['ipv6'] = uci_bool(uci.get('nikki', 'mixin', 'dns_ipv6'));
config['dns']['enhanced-mode'] = uci.get('nikki', 'mixin', 'dns_mode') ?? 'redir-host'; config['dns']['enhanced-mode'] = uci.get('nikki', 'mixin', 'dns_mode') ?? 'redir-host';
config['dns']['fake-ip-range'] = uci.get('nikki', 'mixin', 'fake_ip_range') ?? '198.18.0.1/16'; config['dns']['fake-ip-range'] = uci.get('nikki', 'mixin', 'fake_ip_range') ?? '198.18.0.1/16';
if (uci_bool(uci.get('nikki', 'mixin', 'fake_ip_filter'))) { if (uci_bool(uci.get('nikki', 'mixin', 'fake_ip_filter'))) {
@ -82,7 +80,6 @@ if (uci_bool(uci.get('nikki', 'mixin', 'fake_ip_filter'))) {
if (mixin) { if (mixin) {
config['dns']['respect-rules'] = uci_bool(uci.get('nikki', 'mixin', 'dns_respect_rules')); config['dns']['respect-rules'] = uci_bool(uci.get('nikki', 'mixin', 'dns_respect_rules'));
config['dns']['prefer-h3'] = uci_bool(uci.get('nikki', 'mixin', 'dns_doh_prefer_http3')); config['dns']['prefer-h3'] = uci_bool(uci.get('nikki', 'mixin', 'dns_doh_prefer_http3'));
config['dns']['ipv6'] = uci_bool(uci.get('nikki', 'mixin', 'dns_ipv6'));
config['dns']['use-system-hosts'] = uci_bool(uci.get('nikki', 'mixin', 'dns_system_hosts')); config['dns']['use-system-hosts'] = uci_bool(uci.get('nikki', 'mixin', 'dns_system_hosts'));
config['dns']['use-hosts'] = uci_bool(uci.get('nikki', 'mixin', 'dns_hosts')); config['dns']['use-hosts'] = uci_bool(uci.get('nikki', 'mixin', 'dns_hosts'));
if (uci_bool(uci.get('nikki', 'mixin', 'hosts'))) { if (uci_bool(uci.get('nikki', 'mixin', 'hosts'))) {
@ -145,6 +142,10 @@ if (mixin) {
} }
} }
config['profile'] = {};
config['profile']['store-selected'] = uci_bool(uci.get('nikki', 'mixin', 'selection_cache'));
config['profile']['store-fake-ip'] = uci_bool(uci.get('nikki', 'mixin', 'fake_ip_cache'));
if (uci_bool(uci.get('nikki', 'mixin', 'rule_provider'))) { if (uci_bool(uci.get('nikki', 'mixin', 'rule_provider'))) {
config['rule-providers'] = {}; config['rule-providers'] = {};
uci.foreach('nikki', 'rule_provider', (section) => { uci.foreach('nikki', 'rule_provider', (section) => {