mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 18:03:56 +08:00
🏅 Sync 2026-06-10 01:49:57
This commit is contained in:
1 parent
e09152a7bd
commit
e362307575
26 files changed
+1745
-1820
No files matched your search
@@ -1,9 +0,0 @@
|
|||||||
GNU Affero General Public License v3.0 only
|
|
||||||
|
|
||||||
The gecoosac package in this directory is distributed under the GNU
|
|
||||||
Affero General Public License version 3 only.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
Canonical license text:
|
|
||||||
https://www.gnu.org/licenses/agpl-3.0.txt
|
|
||||||
+1
-1
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=gecoosac
|
PKG_NAME:=gecoosac
|
||||||
PKG_VERSION:=2.2.20251015
|
PKG_VERSION:=2.2.20251015
|
||||||
PKG_RELEASE:=7
|
PKG_RELEASE:=8
|
||||||
|
|
||||||
ifeq ($(ARCH),aarch64)
|
ifeq ($(ARCH),aarch64)
|
||||||
PKG_ARCH:=ac_linux_arm64
|
PKG_ARCH:=ac_linux_arm64
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ const preset_outbound = {
|
|||||||
['REJECT'],
|
['REJECT'],
|
||||||
['REJECT-DROP'],
|
['REJECT-DROP'],
|
||||||
['PASS'],
|
['PASS'],
|
||||||
|
['PASS-RULE'],
|
||||||
['COMPATIBLE'],
|
['COMPATIBLE'],
|
||||||
['GLOBAL']
|
['GLOBAL']
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const parseProxyGroupYaml = hm.parseYaml.extend({
|
|||||||
if (!cfg.type)
|
if (!cfg.type)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// key mapping // 2025/02/13
|
// key mapping // 2026/06/06
|
||||||
let config = hm.removeBlankAttrs({
|
let config = hm.removeBlankAttrs({
|
||||||
id: this.id,
|
id: this.id,
|
||||||
label: this.label,
|
label: this.label,
|
||||||
@@ -23,6 +23,7 @@ const parseProxyGroupYaml = hm.parseYaml.extend({
|
|||||||
include_all: this.bool2str(cfg["include-all"]), // bool
|
include_all: this.bool2str(cfg["include-all"]), // bool
|
||||||
include_all_proxies: this.bool2str(cfg["include-all-proxies"]), // bool
|
include_all_proxies: this.bool2str(cfg["include-all-proxies"]), // bool
|
||||||
include_all_providers: this.bool2str(cfg["include-all-providers"]), // bool
|
include_all_providers: this.bool2str(cfg["include-all-providers"]), // bool
|
||||||
|
empty_fallback: cfg["empty-fallback"] ? hm.preset_outbound.full.map(([key, label]) => key).includes(cfg["empty-fallback"]) ? cfg["empty-fallback"] : this.calcID(hm.glossary["proxy_group"].field, cfg["empty-fallback"]) : null, // string
|
||||||
// Url-test fields
|
// Url-test fields
|
||||||
tolerance: cfg.tolerance,
|
tolerance: cfg.tolerance,
|
||||||
// Load-balance fields
|
// Load-balance fields
|
||||||
@@ -972,6 +973,7 @@ return view.extend({
|
|||||||
'- name: "load-balance"\n' +
|
'- name: "load-balance"\n' +
|
||||||
' type: load-balance\n' +
|
' type: load-balance\n' +
|
||||||
' include-all: true\n' +
|
' include-all: true\n' +
|
||||||
|
' empty-fallback: COMPATIBLE\n' +
|
||||||
' url: "https://cp.cloudflare.com/generate_204"\n' +
|
' url: "https://cp.cloudflare.com/generate_204"\n' +
|
||||||
' interval: 300\n' +
|
' interval: 300\n' +
|
||||||
' lazy: false\n' +
|
' lazy: false\n' +
|
||||||
@@ -1081,6 +1083,14 @@ return view.extend({
|
|||||||
so.default = so.disabled;
|
so.default = so.disabled;
|
||||||
so.editable = true;
|
so.editable = true;
|
||||||
|
|
||||||
|
so = ss.taboption('field_general', form.ListValue, 'empty_fallback', _('Empty fallback'));
|
||||||
|
so.default = 'COMPATIBLE';
|
||||||
|
hm.preset_outbound.full.forEach((res) => {
|
||||||
|
so.value.apply(so, res);
|
||||||
|
})
|
||||||
|
so.load = L.bind(hm.loadProxyGroupLabel, so, hm.preset_outbound.full);
|
||||||
|
so.modalonly = true;
|
||||||
|
|
||||||
/* Override fields */
|
/* Override fields */
|
||||||
so = ss.taboption('field_override', form.Flag, 'disable_udp', _('Disable UDP'));
|
so = ss.taboption('field_override', form.Flag, 'disable_udp', _('Disable UDP'));
|
||||||
so.default = so.disabled;
|
so.default = so.disabled;
|
||||||
|
|||||||
@@ -371,6 +371,9 @@ return view.extend({
|
|||||||
so = ss.option(form.DummyValue, '_asn_version', _('ASN version'));
|
so = ss.option(form.DummyValue, '_asn_version', _('ASN version'));
|
||||||
so.cfgvalue = function() { return renderResVersion.call(this, null, 'asn') };
|
so.cfgvalue = function() { return renderResVersion.call(this, null, 'asn') };
|
||||||
|
|
||||||
|
so = ss.option(form.DummyValue, '_bundlemrs_version', _('BundleMRS version'));
|
||||||
|
so.cfgvalue = function() { return renderResVersion.call(this, null, 'bundlemrs') };
|
||||||
|
|
||||||
so = ss.option(form.DummyValue, '_china_ip4_version', _('China IPv4 list version'));
|
so = ss.option(form.DummyValue, '_china_ip4_version', _('China IPv4 list version'));
|
||||||
so.cfgvalue = function() { return renderResVersion.call(this, null, 'china_ip4') };
|
so.cfgvalue = function() { return renderResVersion.call(this, null, 'china_ip4') };
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const parseRulesetYaml = hm.parseYaml.extend({
|
|||||||
if (!cfg.type)
|
if (!cfg.type)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// key mapping // 2026/01/17
|
// key mapping // 2026/06/06
|
||||||
let config = hm.removeBlankAttrs({
|
let config = hm.removeBlankAttrs({
|
||||||
id: this.id,
|
id: this.id,
|
||||||
label: this.label,
|
label: this.label,
|
||||||
@@ -22,6 +22,7 @@ const parseRulesetYaml = hm.parseYaml.extend({
|
|||||||
payload: cfg.payload, // string: array
|
payload: cfg.payload, // string: array
|
||||||
} : {
|
} : {
|
||||||
url: cfg.url,
|
url: cfg.url,
|
||||||
|
path_in_bundle: cfg["path-in-bundle"],
|
||||||
size_limit: cfg["size-limit"],
|
size_limit: cfg["size-limit"],
|
||||||
interval: cfg.interval,
|
interval: cfg.interval,
|
||||||
proxy: cfg.proxy ? hm.preset_outbound.full.map(([key, label]) => key).includes(cfg.proxy) ? cfg.proxy : this.calcID(hm.glossary["proxy_group"].field, cfg.proxy) : null,
|
proxy: cfg.proxy ? hm.preset_outbound.full.map(([key, label]) => key).includes(cfg.proxy) ? cfg.proxy : this.calcID(hm.glossary["proxy_group"].field, cfg.proxy) : null,
|
||||||
@@ -180,6 +181,13 @@ return view.extend({
|
|||||||
" - 'application/vnd.github.v3.raw'\n" +
|
" - 'application/vnd.github.v3.raw'\n" +
|
||||||
' Authorization:\n' +
|
' Authorization:\n' +
|
||||||
" - 'token 1231231'\n" +
|
" - 'token 1231231'\n" +
|
||||||
|
' cn:\n' +
|
||||||
|
' type: http\n' +
|
||||||
|
' path: ./provider/rule-set/geosite-cn.mrs\n' +
|
||||||
|
' url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cn.mrs"\n' +
|
||||||
|
' behavior: domain\n' +
|
||||||
|
' format: mrs\n' +
|
||||||
|
' path-in-bundle: "geo/geosite/cn.mrs"\n' +
|
||||||
' rule4:\n' +
|
' rule4:\n' +
|
||||||
' type: inline\n' +
|
' type: inline\n' +
|
||||||
' behavior: domain\n' +
|
' behavior: domain\n' +
|
||||||
@@ -269,6 +277,7 @@ return view.extend({
|
|||||||
['select', 'type'],
|
['select', 'type'],
|
||||||
['select', 'behavior'],
|
['select', 'behavior'],
|
||||||
['select', 'format'],
|
['select', 'format'],
|
||||||
|
['input', 'path_in_bundle'],
|
||||||
['textarea', '_editer']
|
['textarea', '_editer']
|
||||||
], ...arguments);
|
], ...arguments);
|
||||||
}
|
}
|
||||||
@@ -373,6 +382,12 @@ return view.extend({
|
|||||||
o.depends('type', 'http');
|
o.depends('type', 'http');
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
|
o = s.option(form.Value, 'path_in_bundle', _('Path in bundle'),
|
||||||
|
_('Path in bundle: <code>%s</code>').format('BundleMRS.7z'));
|
||||||
|
o.placeholder = 'geo/geosite/cn.mrs';
|
||||||
|
o.depends({'type': /^(file|http)$/, 'format': 'mrs'});
|
||||||
|
o.modalonly = true;
|
||||||
|
|
||||||
o = s.option(form.Value, 'size_limit', _('Size limit'),
|
o = s.option(form.Value, 'size_limit', _('Size limit'),
|
||||||
_('In bytes. <code>%s</code> will be used if empty.').format('0'));
|
_('In bytes. <code>%s</code> will be used if empty.').format('0'));
|
||||||
o.placeholder = '0';
|
o.placeholder = '0';
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -148,7 +148,7 @@ check_list_update() {
|
|||||||
|
|
||||||
local list_info="$($wget -O- "https://api.github.com/repos/$listrepo/commits?sha=$listref&path=$listname")"
|
local list_info="$($wget -O- "https://api.github.com/repos/$listrepo/commits?sha=$listref&path=$listname")"
|
||||||
local list_sha="$(echo -e "$list_info" | jsonfilter -e "@[0].sha")"
|
local list_sha="$(echo -e "$list_info" | jsonfilter -e "@[0].sha")"
|
||||||
local list_ver="$(echo -e "$list_info" | jsonfilter -e "@[0].commit.message" | grep -Eo "[0-9-]+" | tr -d '-')"
|
local list_ver="$(echo -e "$list_info" | jsonfilter -e "@[0].commit.message" | grep -Eo "[0-9-]+" | tr -d ' \n-')"
|
||||||
if [ -z "$list_sha" ] || [ -z "$list_ver" ]; then
|
if [ -z "$list_sha" ] || [ -z "$list_ver" ]; then
|
||||||
log "[$(to_upper "$listtype")] Failed to get the latest version, please retry later."
|
log "[$(to_upper "$listtype")] Failed to get the latest version, please retry later."
|
||||||
return 1
|
return 1
|
||||||
@@ -182,7 +182,7 @@ check_list_update() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
"ALL")
|
"ALL")
|
||||||
# Since the VER_PATH lock is not designed, parallelism is not currently supported.
|
# Since the VER_PATH lock is not designed, parallelism is not currently supported.
|
||||||
for _type in geoip geosite asn china_ip4 china_ip6 gfw_list china_list; do
|
for _type in geoip geosite asn bundlemrs china_ip4 china_ip6 gfw_list china_list; do
|
||||||
"$0" "$_type"
|
"$0" "$_type"
|
||||||
done
|
done
|
||||||
# dashboard
|
# dashboard
|
||||||
@@ -208,6 +208,10 @@ case "$1" in
|
|||||||
check_list_update "$1" "Loyalsoldier/geoip" "release" "GeoLite2-ASN.mmdb" &&
|
check_list_update "$1" "Loyalsoldier/geoip" "release" "GeoLite2-ASN.mmdb" &&
|
||||||
mv -f "$RESOURCES_DIR/asn.mmdb" "$RESOURCES_DIR/../asn.mmdb"
|
mv -f "$RESOURCES_DIR/asn.mmdb" "$RESOURCES_DIR/../asn.mmdb"
|
||||||
;;
|
;;
|
||||||
|
"bundlemrs")
|
||||||
|
check_list_update "$1" "MetaCubeX/meta-rules-dat" "release" "BundleMRS.7z" &&
|
||||||
|
mv -f "$RESOURCES_DIR/bundlemrs.7z" "$RESOURCES_DIR/../BundleMRS.7z"
|
||||||
|
;;
|
||||||
"china_ip4")
|
"china_ip4")
|
||||||
check_list_update "$1" "fcshark-org/route-list" "release" "china_ipv4.txt"
|
check_list_update "$1" "fcshark-org/route-list" "release" "china_ipv4.txt"
|
||||||
;;
|
;;
|
||||||
@@ -221,7 +225,7 @@ case "$1" in
|
|||||||
check_list_update "$1" "fcshark-org/route-list" "release" "china_list2.txt"
|
check_list_update "$1" "fcshark-org/route-list" "release" "china_list2.txt"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -e "Usage: $0 <ALL / dashboard / geoip / geosite / asn / china_ip4 / china_ip6 / gfw_list / china_list>"
|
echo -e "Usage: $0 <ALL / dashboard / geoip / geosite / asn / bundlemrs / china_ip4 / china_ip6 / gfw_list / china_list>"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -745,6 +745,7 @@ uci.foreach(uciconf, ucipgrp, (cfg) => {
|
|||||||
"include-all": strToBool(cfg.include_all),
|
"include-all": strToBool(cfg.include_all),
|
||||||
"include-all-proxies": strToBool(cfg.include_all_proxies),
|
"include-all-proxies": strToBool(cfg.include_all_proxies),
|
||||||
"include-all-providers": strToBool(cfg.include_all_providers),
|
"include-all-providers": strToBool(cfg.include_all_providers),
|
||||||
|
"empty-fallback": cfg.empty_fallback ? get_proxygroup(cfg.empty_fallback) : null,
|
||||||
// Url-test fields
|
// Url-test fields
|
||||||
tolerance: (cfg.type === 'url-test') ? strToInt(cfg.tolerance) ?? 150 : null,
|
tolerance: (cfg.type === 'url-test') ? strToInt(cfg.tolerance) ?? 150 : null,
|
||||||
// Load-balance fields
|
// Load-balance fields
|
||||||
@@ -839,6 +840,7 @@ uci.foreach(uciconf, ucirule, (cfg) => {
|
|||||||
} : {
|
} : {
|
||||||
path: HM_DIR + '/ruleset/' + cfg['.name'],
|
path: HM_DIR + '/ruleset/' + cfg['.name'],
|
||||||
url: cfg.url,
|
url: cfg.url,
|
||||||
|
"path-in-bundle": cfg.path_in_bundle,
|
||||||
"size-limit": bytesizeToByte(cfg.size_limit) || null,
|
"size-limit": bytesizeToByte(cfg.size_limit) || null,
|
||||||
interval: (cfg.type === 'http') ? durationToSecond(cfg.interval) ?? 259200 : null,
|
interval: (cfg.type === 'http') ? durationToSecond(cfg.interval) ?? 259200 : null,
|
||||||
proxy: get_proxygroup(cfg.proxy),
|
proxy: get_proxygroup(cfg.proxy),
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export const PRESET_OUTBOUND = [
|
|||||||
'REJECT',
|
'REJECT',
|
||||||
'REJECT-DROP',
|
'REJECT-DROP',
|
||||||
'PASS',
|
'PASS',
|
||||||
|
'PASS-RULE',
|
||||||
'COMPATIBLE',
|
'COMPATIBLE',
|
||||||
'GLOBAL'
|
'GLOBAL'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
LUCI_TITLE:=kai
|
LUCI_TITLE:=kai
|
||||||
PKG_VERSION:=1.0.2
|
PKG_VERSION:=1.0.0
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=9
|
||||||
LUCI_DEPENDS:=+kai +kai_session +luci-compat
|
LUCI_DEPENDS:=+kai +kai_session
|
||||||
LUCI_MINIFY_CSS:=0
|
LUCI_MINIFY_CSS:=0
|
||||||
LUCI_MINIFY_JS:=0
|
LUCI_MINIFY_JS:=0
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ define Package/luci-app-kai/conffiles
|
|||||||
/etc/config/kai
|
/etc/config/kai
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/luci-app-kai/postrm
|
define Package/luci-nginxer/postrm
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rm -f /tmp/luci-indexcache
|
rm -f /tmp/luci-indexcache
|
||||||
exit 0
|
exit 0
|
||||||
@@ -25,4 +25,4 @@ endef
|
|||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
# call BuildPackage - OpenWrt buildroot signature
|
# call BuildPackage - OpenWrt buildroot signature
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
local m, s
|
local m, s
|
||||||
|
|
||||||
m = Map("kai", translate("KAI"), translate("KAI is an efficient AI tool."))
|
m = Map("kai", translate("KAI"), translate("KAI is an efficient data transfer tool."))
|
||||||
m:section(SimpleSection).template = "kai/kai_status"
|
m:section(SimpleSection).template = "kai/kai_status"
|
||||||
|
|
||||||
s=m:section(TypedSection, "kai", translate("Global settings"))
|
s=m:section(TypedSection, "kai", translate("Global settings"))
|
||||||
@@ -8,25 +8,6 @@ s.addremove=false
|
|||||||
s.anonymous=true
|
s.anonymous=true
|
||||||
|
|
||||||
s:option(Flag, "enabled", translate("Enable")).rmempty=false
|
s:option(Flag, "enabled", translate("Enable")).rmempty=false
|
||||||
|
|
||||||
local kai_model = require "luci.model.kai"
|
|
||||||
local blocks = kai_model.blocks()
|
|
||||||
local home = kai_model.home()
|
|
||||||
|
|
||||||
local data_dir = s:option(Value, "data_dir", translate("Data directory"))
|
|
||||||
data_dir.rmempty = false
|
|
||||||
data_dir.description = translate("Required. KAI session will store cwd/cache/data/config/state under this directory (subfolders: cwd, cache, data, config, state).")
|
|
||||||
|
|
||||||
local paths, default_path = kai_model.find_paths(blocks, home, "Configs")
|
|
||||||
for _, val in pairs(paths) do
|
|
||||||
data_dir:value(val, val)
|
|
||||||
end
|
|
||||||
data_dir.default = default_path
|
|
||||||
|
|
||||||
local port = s:option(Value, "port", translate("API port"))
|
|
||||||
port.default = "8197"
|
|
||||||
port.rmempty = false
|
|
||||||
port.datatype = "port"
|
|
||||||
port.description = translate("Port for KAI HTTP server (kai_bin). kai_session will read OPENCODE_CONFIG via 127.0.0.1:<port>.")
|
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
||||||
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
local jsonc = require "luci.jsonc"
|
|
||||||
|
|
||||||
local kai = {}
|
|
||||||
|
|
||||||
kai.blocks = function()
|
|
||||||
local f = io.popen("lsblk -s -f -b -o NAME,FSSIZE,MOUNTPOINT --json", "r")
|
|
||||||
local vals = {}
|
|
||||||
if f then
|
|
||||||
local ret = f:read("*all")
|
|
||||||
f:close()
|
|
||||||
local obj = jsonc.parse(ret)
|
|
||||||
for _, val in pairs(obj and obj["blockdevices"] or {}) do
|
|
||||||
local fsize = val["fssize"]
|
|
||||||
if fsize ~= nil and string.len(fsize) > 10 and val["mountpoint"] then
|
|
||||||
vals[#vals + 1] = val["mountpoint"]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return vals
|
|
||||||
end
|
|
||||||
|
|
||||||
kai.home = function()
|
|
||||||
local uci = require "luci.model.uci".cursor()
|
|
||||||
local home_dirs = {}
|
|
||||||
home_dirs["main_dir"] = uci:get_first("quickstart", "main", "main_dir", "/root")
|
|
||||||
home_dirs["Configs"] = uci:get_first("quickstart", "main", "conf_dir", home_dirs["main_dir"] .. "/Configs")
|
|
||||||
home_dirs["Public"] = uci:get_first("quickstart", "main", "pub_dir", home_dirs["main_dir"] .. "/Public")
|
|
||||||
home_dirs["Downloads"] = uci:get_first("quickstart", "main", "dl_dir", home_dirs["Public"] .. "/Downloads")
|
|
||||||
home_dirs["Caches"] = uci:get_first("quickstart", "main", "tmp_dir", home_dirs["main_dir"] .. "/Caches")
|
|
||||||
return home_dirs
|
|
||||||
end
|
|
||||||
|
|
||||||
kai.find_paths = function(blocks, home_dirs, path_name)
|
|
||||||
local default_path = ""
|
|
||||||
local paths = {}
|
|
||||||
|
|
||||||
default_path = home_dirs[path_name] .. "/KAI"
|
|
||||||
if #blocks == 0 then
|
|
||||||
table.insert(paths, default_path)
|
|
||||||
else
|
|
||||||
for _, val in pairs(blocks) do
|
|
||||||
table.insert(paths, val .. "/" .. path_name .. "/KAI")
|
|
||||||
end
|
|
||||||
local without_conf_dir = "/root/" .. path_name .. "/KAI"
|
|
||||||
if default_path == without_conf_dir then
|
|
||||||
default_path = paths[1]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return paths, default_path
|
|
||||||
end
|
|
||||||
|
|
||||||
return kai
|
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ XHR.poll(5, '<%=url("admin/services/kai_status")%>', null,function(x, st){
|
|||||||
//]]></script>
|
//]]></script>
|
||||||
|
|
||||||
<fieldset class="cbi-section">
|
<fieldset class="cbi-section">
|
||||||
<legend><%:Status%></legend>
|
<legend>状态</legend>
|
||||||
<p id="kai_status">
|
<p id="kai_status">
|
||||||
<em><%:Collecting data...%></em>
|
<em><%:Collecting data...%></em>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-passwall
|
PKG_NAME:=luci-app-passwall
|
||||||
PKG_VERSION:=26.6.2
|
PKG_VERSION:=26.6.2
|
||||||
PKG_RELEASE:=157
|
PKG_RELEASE:=158
|
||||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
|||||||
@@ -322,15 +322,6 @@ o.rewrite_option = "method"
|
|||||||
for a, t in ipairs(ss_method_list) do o:value(t) end
|
for a, t in ipairs(ss_method_list) do o:value(t) end
|
||||||
o:depends({ [_n("protocol")] = "shadowsocks" })
|
o:depends({ [_n("protocol")] = "shadowsocks" })
|
||||||
|
|
||||||
o = s:option(Flag, _n("iv_check"), translate("IV Check"))
|
|
||||||
o:depends({ [_n("protocol")] = "shadowsocks", [_n("ss_method")] = "aes-128-gcm" })
|
|
||||||
o:depends({ [_n("protocol")] = "shadowsocks", [_n("ss_method")] = "aes-256-gcm" })
|
|
||||||
o:depends({ [_n("protocol")] = "shadowsocks", [_n("ss_method")] = "chacha20-poly1305" })
|
|
||||||
o:depends({ [_n("protocol")] = "shadowsocks", [_n("ss_method")] = "xchacha20-poly1305" })
|
|
||||||
|
|
||||||
o = s:option(Flag, _n("uot"), translate("UDP over TCP"))
|
|
||||||
o:depends({ [_n("protocol")] = "shadowsocks" })
|
|
||||||
|
|
||||||
o = s:option(ListValue, _n("flow"), translate("flow"))
|
o = s:option(ListValue, _n("flow"), translate("flow"))
|
||||||
o.default = ""
|
o.default = ""
|
||||||
o:value("", translate("Disable"))
|
o:value("", translate("Disable"))
|
||||||
@@ -420,7 +411,6 @@ o:value("http/1.1")
|
|||||||
o:value("h2,http/1.1")
|
o:value("h2,http/1.1")
|
||||||
o:value("h3,h2,http/1.1")
|
o:value("h3,h2,http/1.1")
|
||||||
o:depends({ [_n("tls")] = true, [_n("reality")] = false })
|
o:depends({ [_n("tls")] = true, [_n("reality")] = false })
|
||||||
o:depends({ [_n("protocol")] = "hysteria2" })
|
|
||||||
|
|
||||||
-- o = s:option(Value, _n("minversion"), translate("minversion"))
|
-- o = s:option(Value, _n("minversion"), translate("minversion"))
|
||||||
-- o.default = "1.3"
|
-- o.default = "1.3"
|
||||||
@@ -776,11 +766,6 @@ o.default = 0
|
|||||||
o = s:option(Flag, _n("tcpMptcp"), "tcpMptcp", translate("Enable Multipath TCP, need to be enabled in both server and client configuration."))
|
o = s:option(Flag, _n("tcpMptcp"), "tcpMptcp", translate("Enable Multipath TCP, need to be enabled in both server and client configuration."))
|
||||||
o.default = 0
|
o.default = 0
|
||||||
|
|
||||||
o = s:option(Value, _n("preconns"), translate("Pre-connections"), translate("Number of early established connections to reduce latency."))
|
|
||||||
o.datatype = "uinteger"
|
|
||||||
o.placeholder = 0
|
|
||||||
o:depends({ [_n("protocol")] = "vless" })
|
|
||||||
|
|
||||||
o = s:option(ListValue, _n("domain_resolver"), translate("Domain DNS Resolve"))
|
o = s:option(ListValue, _n("domain_resolver"), translate("Domain DNS Resolve"))
|
||||||
o.description = translate("If the node address is a domain name, this DNS will be used for resolution.") .. "<br>" .. string.format('<font color="red">%s</font>',
|
o.description = translate("If the node address is a domain name, this DNS will be used for resolution.") .. "<br>" .. string.format('<font color="red">%s</font>',
|
||||||
translate("Note: For node-specific DNS only. Keep Auto to avoid extra overhead."))
|
translate("Note: For node-specific DNS only. Keep Auto to avoid extra overhead."))
|
||||||
|
|||||||
@@ -97,9 +97,6 @@ o.rewrite_option = "method"
|
|||||||
for a, t in ipairs(x_ss_method_list) do o:value(t) end
|
for a, t in ipairs(x_ss_method_list) do o:value(t) end
|
||||||
o:depends({ [_n("protocol")] = "shadowsocks" })
|
o:depends({ [_n("protocol")] = "shadowsocks" })
|
||||||
|
|
||||||
o = s:option(Flag, _n("iv_check"), translate("IV Check"))
|
|
||||||
o:depends({ [_n("protocol")] = "shadowsocks" })
|
|
||||||
|
|
||||||
o = s:option(ListValue, _n("ss_network"), translate("Transport"))
|
o = s:option(ListValue, _n("ss_network"), translate("Transport"))
|
||||||
o.default = "tcp,udp"
|
o.default = "tcp,udp"
|
||||||
o:value("tcp", "TCP")
|
o:value("tcp", "TCP")
|
||||||
@@ -230,7 +227,6 @@ o:value("http/1.1")
|
|||||||
o:value("h2,http/1.1")
|
o:value("h2,http/1.1")
|
||||||
o:value("h3,h2,http/1.1")
|
o:value("h3,h2,http/1.1")
|
||||||
o:depends({ [_n("tls")] = true, [_n("reality")] = false })
|
o:depends({ [_n("tls")] = true, [_n("reality")] = false })
|
||||||
o:depends({ [_n("protocol")] = "hysteria2"})
|
|
||||||
|
|
||||||
o = s:option(Flag, _n("use_mldsa65Seed"), translate("ML-DSA-65"))
|
o = s:option(Flag, _n("use_mldsa65Seed"), translate("ML-DSA-65"))
|
||||||
o.default = "0"
|
o.default = "0"
|
||||||
|
|||||||
@@ -361,43 +361,18 @@ function gen_outbound(flag, node, tag, proxy_table)
|
|||||||
end)()
|
end)()
|
||||||
} or nil,
|
} or nil,
|
||||||
settings = {
|
settings = {
|
||||||
vnext = (node.protocol == "vmess" or node.protocol == "vless") and {
|
address = (node.protocol == "wireguard") and node.wireguard_local_address or node.address,
|
||||||
{
|
port = tonumber(node.port),
|
||||||
address = node.address,
|
id = (node.protocol == "vmess" or node.protocol == "vless") and node.uuid or nil,
|
||||||
port = tonumber(node.port),
|
encryption = (node.protocol == "vless") and ((node.encryption and node.encryption ~= "") and node.encryption or "none") or nil,
|
||||||
users = {
|
flow = (node.protocol == "vless" and (node.tls == "1" or (node.encryption and node.encryption ~= "" and node.encryption ~= "none"))
|
||||||
{
|
and node.flow and node.flow ~= "") and node.flow or nil,
|
||||||
id = node.uuid,
|
security = (node.protocol == "vmess") and node.security or nil,
|
||||||
level = 0,
|
user = (node.protocol == "socks" or node.protocol == "http") and node.username or nil,
|
||||||
security = (node.protocol == "vmess") and node.security or nil,
|
pass = (node.protocol == "socks" or node.protocol == "http") and node.password or nil,
|
||||||
testpre = (node.protocol == "vless") and tonumber(node.preconns) or nil,
|
password = (node.protocol == "shadowsocks" or node.protocol == "trojan") and node.password or nil,
|
||||||
encryption = (node.protocol == "vless") and ((node.encryption and node.encryption ~= "") and node.encryption or "none") or nil,
|
method = (node.protocol == "shadowsocks") and ((node.method == "chacha20-ietf-poly1305" and "chacha20-poly1305") or
|
||||||
flow = (node.protocol == "vless"
|
(node.method == "xchacha20-ietf-poly1305" and "xchacha20-poly1305") or (node.method ~= "" and node.method) or nil) or nil,
|
||||||
and (node.tls == "1" or (node.encryption and node.encryption ~= "" and node.encryption ~= "none"))
|
|
||||||
and node.flow and node.flow ~= "") and node.flow or nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} or nil,
|
|
||||||
servers = (node.protocol == "socks" or node.protocol == "http" or node.protocol == "shadowsocks" or node.protocol == "trojan") and {
|
|
||||||
{
|
|
||||||
address = node.address,
|
|
||||||
port = tonumber(node.port),
|
|
||||||
method = (node.method == "chacha20-ietf-poly1305" and "chacha20-poly1305") or
|
|
||||||
(node.method == "xchacha20-ietf-poly1305" and "xchacha20-poly1305") or
|
|
||||||
(node.method ~= "" and node.method) or nil,
|
|
||||||
ivCheck = (node.protocol == "shadowsocks") and node.iv_check == "1" or nil,
|
|
||||||
uot = (node.protocol == "shadowsocks") and node.uot == "1" or nil,
|
|
||||||
password = node.password or "",
|
|
||||||
users = (node.username and node.password) and {
|
|
||||||
{
|
|
||||||
user = node.username,
|
|
||||||
pass = node.password
|
|
||||||
}
|
|
||||||
} or nil
|
|
||||||
}
|
|
||||||
} or nil,
|
|
||||||
address = (node.protocol == "wireguard" and node.wireguard_local_address) or (node.protocol == "hysteria" and node.address) or nil,
|
|
||||||
secretKey = (node.protocol == "wireguard") and node.wireguard_secret_key or nil,
|
secretKey = (node.protocol == "wireguard") and node.wireguard_secret_key or nil,
|
||||||
peers = (node.protocol == "wireguard") and {
|
peers = (node.protocol == "wireguard") and {
|
||||||
{
|
{
|
||||||
@@ -409,8 +384,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
|||||||
} or nil,
|
} or nil,
|
||||||
mtu = (node.protocol == "wireguard" and node.wireguard_mtu) and tonumber(node.wireguard_mtu) or nil,
|
mtu = (node.protocol == "wireguard" and node.wireguard_mtu) and tonumber(node.wireguard_mtu) or nil,
|
||||||
reserved = (node.protocol == "wireguard" and node.wireguard_reserved) and node.wireguard_reserved or nil,
|
reserved = (node.protocol == "wireguard" and node.wireguard_reserved) and node.wireguard_reserved or nil,
|
||||||
port = (node.protocol == "hysteria" and node.port) and tonumber(node.port) or nil,
|
version = (node.protocol == "hysteria") and 2 or nil,
|
||||||
version = node.protocol == "hysteria" and 2 or nil
|
level = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -538,7 +513,6 @@ function gen_config_server(node)
|
|||||||
settings = {
|
settings = {
|
||||||
method = node.method,
|
method = node.method,
|
||||||
password = node.password,
|
password = node.password,
|
||||||
ivCheck = ("1" == node.iv_check) and true or false,
|
|
||||||
network = node.ss_network or "TCP,UDP"
|
network = node.ss_network or "TCP,UDP"
|
||||||
}
|
}
|
||||||
elseif node.protocol == "trojan" then
|
elseif node.protocol == "trojan" then
|
||||||
|
|||||||
@@ -1429,9 +1429,6 @@ msgstr "只推荐与 VLESS-TCP-XTLS-Vision 搭配使用。"
|
|||||||
msgid "Password"
|
msgid "Password"
|
||||||
msgstr "密码"
|
msgstr "密码"
|
||||||
|
|
||||||
msgid "IV Check"
|
|
||||||
msgstr "IV 检查"
|
|
||||||
|
|
||||||
msgid "UDP over TCP"
|
msgid "UDP over TCP"
|
||||||
msgstr "TCP 封装 UDP"
|
msgstr "TCP 封装 UDP"
|
||||||
|
|
||||||
@@ -1444,12 +1441,6 @@ msgstr "本地端口"
|
|||||||
msgid "Fast Open"
|
msgid "Fast Open"
|
||||||
msgstr "快速打开"
|
msgstr "快速打开"
|
||||||
|
|
||||||
msgid "Pre-connections"
|
|
||||||
msgstr "预连接"
|
|
||||||
|
|
||||||
msgid "Number of early established connections to reduce latency."
|
|
||||||
msgstr "预连接的数量,用于降低延迟。"
|
|
||||||
|
|
||||||
msgid "Need node support required"
|
msgid "Need node support required"
|
||||||
msgstr "需要节点支持"
|
msgstr "需要节点支持"
|
||||||
|
|
||||||
|
|||||||
@@ -8,17 +8,17 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
LUCI_TITLE:=Nginxer
|
LUCI_TITLE:=Nginxer
|
||||||
LUCI_DESCRIPTION:=Standard OpenWrt set including full admin with ppp support and the default Bootstrap theme
|
LUCI_DESCRIPTION:=Standard OpenWrt set including full admin with ppp support and the default Bootstrap theme
|
||||||
PKG_VERSION:=0.0.2
|
PKG_VERSION:=0.0.1
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
LUCI_DEPENDS:=+luci-nginx
|
LUCI_DEPENDS:=+luci-nginx
|
||||||
|
|
||||||
define Package/luci-nginxer/postrm
|
define Package/luci-nginxer/postrm
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
/etc/init.d/uhttpd enable
|
/etc/init.d/uhttpd enabled
|
||||||
/etc/init.d/uhttpd start
|
/etc/init.d/uhttpd start
|
||||||
exit 0
|
exit 0
|
||||||
endef
|
endef
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
# call BuildPackage - OpenWrt buildroot signature
|
# call BuildPackage - OpenWrt buildroot signature
|
||||||
@@ -8,11 +8,7 @@ if [ "$nginxer" != 1 ]; then
|
|||||||
uci set nginx._redirect2ssl.access_log='off; # logd openwrt'
|
uci set nginx._redirect2ssl.access_log='off; # logd openwrt'
|
||||||
uci set nginx.global.nginxer='1'
|
uci set nginx.global.nginxer='1'
|
||||||
uci commit nginx
|
uci commit nginx
|
||||||
|
|
||||||
# fix firmware upload failed
|
|
||||||
sed -i 's/client_max_body_size 128M;/client_max_body_size 256M;/g' /etc/nginx/uci.conf.template
|
|
||||||
|
|
||||||
# /etc/init.d/uhttpd running || /etc/init.d/uhttpd disable
|
# /etc/init.d/uhttpd running || /etc/init.d/uhttpd disable
|
||||||
/etc/init.d/nginx reload
|
/etc/init.d/nginx reload
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
VERSION="$1"
|
|
||||||
CURDIR="$2"
|
|
||||||
BIN_PATH="$3"
|
|
||||||
|
|
||||||
if [ -d "$CURDIR/.git" ]; then
|
|
||||||
config="$CURDIR/.git/config"
|
|
||||||
else
|
|
||||||
config="$(sed "s|^gitdir:\s*|$CURDIR/|;s|$|/config|" "$CURDIR/.git")"
|
|
||||||
fi
|
|
||||||
[ -n "$(sed -En '/^\[remote /{h;:top;n;/^\[/b;s,(https?://gitcode\.(com|net)),\1,;T top;H;x;s|\n\s*|: |;p;}' "$config")" ] && {
|
|
||||||
echo -e "#!/bin/sh\necho $VERSION" > "$BIN_PATH"
|
|
||||||
}
|
|
||||||
exit 0
|
|
||||||
+25
-30
@@ -1,32 +1,30 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
|
||||||
#
|
|
||||||
# Copyright (C) 2024-2026 Anya Lin <hukk1996@gmail.com>
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mihomo
|
PKG_NAME:=mihomo
|
||||||
PKG_VERSION:=1.19.26
|
PKG_VERSION:=1.19.26
|
||||||
PKG_RELEASE:=16
|
PKG_RELEASE:=17
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
|
||||||
|
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/metacubex/mihomo/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_HASH:=skip
|
PKG_MIRROR_HASH:=skip
|
||||||
|
|
||||||
PKG_MAINTAINER:=Anya Lin <hukk1996@gmail.com>
|
PKG_LICENSE:=GPL3.0+
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_MAINTAINER:=Joseph Mory <morytyann@gmail.com>
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=golang/host
|
PKG_BUILD_DEPENDS:=golang/host
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
PKG_BUILD_FLAGS:=no-mips16
|
PKG_BUILD_FLAGS:=no-mips16
|
||||||
|
|
||||||
GO_PKG:=github.com/metacubex/mihomo
|
PKG_BUILD_VERSION:=v$(PKG_VERSION)
|
||||||
|
PKG_BUILD_TIME:=$(shell date -u -Iseconds)
|
||||||
|
|
||||||
PKG_BUILD_TIME:=$(shell date -u +%FT%TZ%z)
|
GO_PKG:=github.com/metacubex/mihomo
|
||||||
GO_PKG_LDFLAGS_X:=\
|
GO_PKG_LDFLAGS_X:=$(GO_PKG)/constant.Version=$(PKG_BUILD_VERSION) $(GO_PKG)/constant.BuildTime=$(PKG_BUILD_TIME)
|
||||||
$(GO_PKG)/constant.Version=v$(PKG_VERSION) \
|
|
||||||
$(GO_PKG)/constant.BuildTime=$(PKG_BUILD_TIME)
|
|
||||||
GO_PKG_TAGS:=with_gvisor
|
GO_PKG_TAGS:=with_gvisor
|
||||||
|
GO_PKG_INSTALL_BIN_PATH:=/usr/libexec
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||||
@@ -34,27 +32,24 @@ include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|||||||
define Package/mihomo
|
define Package/mihomo
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
TITLE:=Another Mihomo Kernel.
|
TITLE:=A rule based proxy in Go.
|
||||||
URL:=https://wiki.metacubex.one
|
URL:=https://wiki.metacubex.one
|
||||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||||
PROVIDES:=mihomo
|
|
||||||
ALTERNATIVES:=\
|
ALTERNATIVES:=\
|
||||||
100:/usr/bin/mihomo:/usr/libexec/mihomo-core
|
300:/usr/bin/mihomo:/usr/libexec/mihomo
|
||||||
USERID:=mihomo=7890:mihomo=7890
|
endef
|
||||||
|
|
||||||
|
define Package/mihomo/description
|
||||||
|
Mihomo is a rule based proxy in Go.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/mihomo/install
|
||||||
|
$(call GoPackage/Package/Install/Bin,$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
$(Build/Prepare/Default)
|
$(Build/Prepare/Default)
|
||||||
# rm unit test
|
$(RM) -r $(PKG_BUILD_DIR)/rules/logic_test
|
||||||
rm -f $(PKG_BUILD_DIR)/rules/logic_test/logic_test.go
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mihomo/install
|
|
||||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
|
||||||
$(CURDIR)/.prepare.sh $(VERSION) $(CURDIR) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/libexec/
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/libexec/mihomo-core
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call GoBinPackage,mihomo))
|
$(eval $(call GoBinPackage,mihomo))
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=speedtest-web
|
PKG_NAME:=speedtest-web
|
||||||
PKG_VERSION:=1.1.5
|
PKG_VERSION:=1.1.5
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/ZeaKyX/speedtest-go.git
|
PKG_SOURCE_URL:=https://github.com/ZeaKyX/speedtest-go.git
|
||||||
PKG_SOURCE_VERSION:=d8ccc31d3ae0ed2833691e3b8fc6fd1795d1ec13
|
PKG_SOURCE_VERSION:=
|
||||||
PKG_MIRROR_HASH:=skip
|
PKG_MIRROR_HASH:=skip
|
||||||
|
|
||||||
PKG_LICENSE:=LGPL-3.0
|
PKG_LICENSE:=LGPL-3.0
|
||||||
|
|||||||
Reference in new issue
Block a user