🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
include $(TOPDIR)/rules.mk
PKG_LICENSE:=GPLv3
PKG_MAINTAINER:=Yu <mukaiu@live.com>
PKG_VERSION:=2.0.3
PKG_RELEASE:=1
LUCI_TITLE:=Domain Proxy for redsocks.
LUCI_DESCRIPTION:=Domain Proxy for redsocks.
LUCI_DEPENDS:=+luci-base
define Package/luci-app-domain-proxy/conffiles
/etc/config/domain-proxy
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
+3
View File
@@ -0,0 +1,3 @@
# luci-app-domain-proxy
配合 dnsmasq-full ipset redsocks 使用
@@ -0,0 +1,66 @@
'use strict';
'require view';
'require fs';
'require form';
'require uci';
'require dom';
return view.extend({
render: function () {
var m, s, o;
m = new form.Map('domain-proxy', _('Domain Proxy'));
s = m.section(form.TypedSection, 'proxy', _('Proxy config'));
s.anonymous = true;
o = s.option(form.Value, 'dns', _('Dns Server'));
o.datatype = 'ipaddrport';
o.placeholder = '127.0.0.1:5353';
o = s.option(
form.DynamicList,
'domain',
_('Domain'),
_('List of domains to proxy')
);
o.optional = true;
o.datatype = 'host';
o.placeholder = 'www.google.com';
return m.render();
},
handleSaveApply: null,
handleReset: null,
handleSave: function (ev) {
var tasks = [];
document
.getElementById('maincontent')
.querySelectorAll('.cbi-map')
.forEach(function (map) {
tasks.push(DOM.callClassMethod(map, 'save'));
});
return Promise.all(tasks)
.then(function () {
var proxy = uci.get_first('domain-proxy', 'proxy');
var dns = proxy.dns.replace(':', '#');
var ssfw = [];
proxy.domain.forEach(function (d) {
var dt = d.trim();
if (dt) {
ssfw.push(`server=/${dt}/${dns}`);
ssfw.push(`ipset=/${dt}/ssfw,ssfw6`);
}
});
return fs
.write('/etc/dnsmasq.d/ssfw.conf', ssfw.join('\n'))
.then(function () {
return fs.exec('/etc/init.d/dns-proxy', ['restart']);
});
})
.then(function () {
classes.ui.changes.apply(true);
});
},
});
@@ -0,0 +1,2 @@
config proxy
option dns '127.0.0.1:5353'
Whitespace-only changes.
@@ -0,0 +1,12 @@
{
"admin/services/domain-proxy": {
"title": "Domain Proxy",
"action": {
"type": "view",
"path": "domain-proxy"
},
"depends": {
"acl": ["luci-app-domain-proxy"]
}
}
}
@@ -0,0 +1,17 @@
{
"luci-app-domain-proxy": {
"description": "Grant access to LuCI app domain-proxy",
"read": {
"file": {
"/etc/init.d/dns-proxy restart": ["exec"]
},
"uci": ["domain-proxy"]
},
"write": {
"file": {
"/etc/dnsmasq.d/ssfw.conf": ["write"]
},
"uci": ["domain-proxy"]
}
}
}