mirror of
https://github.com/kenzok8/small-package
synced 2025-01-08 13:27:36 +08:00
update 2025-01-05 16:22:42
This commit is contained in:
parent
8ffa764482
commit
91e91d58da
@ -1,7 +1,7 @@
|
||||
|
||||
config fchomo 'config'
|
||||
option __warning 'ACCESS CONTROL FIELDS'
|
||||
option common_tcpport '20-21,22,53,80,110,143,443,465,853,873,993,995,8080,8443,9418'
|
||||
option common_tcpport '20-21,22,53,80,110,143,443,465,853,873,993,995,5222,8080,8443,9418'
|
||||
option common_udpport '20-21,22,53,80,110,143,443,853,993,995,8080,8443,9418'
|
||||
option stun_port '3478,19302'
|
||||
option tun_name 'hmtun0'
|
||||
|
@ -57,7 +57,7 @@
|
||||
const uci = cursor();
|
||||
uci.load(cfgname);
|
||||
|
||||
const common_tcpport = uci.get(cfgname, 'config', 'common_tcpport') || '20-21,22,53,80,110,143,443,465,853,873,993,995,8080,8443,9418',
|
||||
const common_tcpport = uci.get(cfgname, 'config', 'common_tcpport') || '20-21,22,53,80,110,143,443,465,853,873,993,995,5222,8080,8443,9418',
|
||||
common_udpport = uci.get(cfgname, 'config', 'common_udpport') || '20-21,22,53,80,110,143,443,853,993,995,8080,8443,9418',
|
||||
stun_port = uci.get(cfgname, 'config', 'stun_port') || '3478,19302',
|
||||
tun_name = uci.get(cfgname, 'config', 'tun_name') || 'hmtun0',
|
||||
@ -119,7 +119,7 @@
|
||||
{%- function render_acl_src(inchain, outchain): %}
|
||||
chain {{ inchain }} {
|
||||
{% if (control_info.listen_interfaces): %}
|
||||
meta iifname != {{ array_to_nftarr([...control_info.listen_interfaces, ...filter(['lo'], ((l) => !~index(control_info.listen_interfaces, l)))]) }} counter return
|
||||
meta iifname != {{ array_to_nftarr(uniq([...control_info.listen_interfaces, ...['lo']])) }} counter return
|
||||
{% endif %}
|
||||
meta mark {{ self_mark }} counter return
|
||||
|
||||
|
@ -46,7 +46,7 @@ const ucisniff = 'sniff',
|
||||
ucisubro = 'subrules';
|
||||
|
||||
/* Hardcode options */
|
||||
const common_tcpport = uci.get(uciconf, ucifchm, 'common_tcpport') || '20-21,22,53,80,110,143,443,465,853,873,993,995,8080,8443,9418',
|
||||
const common_tcpport = uci.get(uciconf, ucifchm, 'common_tcpport') || '20-21,22,53,80,110,143,443,465,853,873,993,995,5222,8080,8443,9418',
|
||||
common_udpport = uci.get(uciconf, ucifchm, 'common_udpport') || '20-21,22,53,80,110,143,443,853,993,995,8080,8443,9418',
|
||||
stun_port = uci.get(uciconf, ucifchm, 'stun_port') || '3478,19302',
|
||||
tun_name = uci.get(uciconf, ucifchm, 'tun_name') || 'hmtun0',
|
||||
|
@ -42,6 +42,10 @@ for _, val in pairs(paths) do
|
||||
end
|
||||
o.default = default_path
|
||||
|
||||
o = s:option(Value, "root_pwd", "ROOT_PASSWORD")
|
||||
o.password = true
|
||||
o.datatype = "string"
|
||||
|
||||
o = s:option(Value, "time_zone", translate("Timezone"))
|
||||
o.datatype = "string"
|
||||
o:value("Asia/Shanghai", "Asia/Shanghai")
|
||||
|
@ -4,7 +4,16 @@ ACTION=${1}
|
||||
shift 1
|
||||
|
||||
do_install() {
|
||||
if echo `uname -m` | grep -Eqi 'x86_64'; then
|
||||
echo "Support x86_64"
|
||||
else
|
||||
echo "Not x86_64, only support x86_64, exit"
|
||||
sleep 3
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local config=`uci get pve.@pve[0].config_path 2>/dev/null`
|
||||
local root_pwd=`uci get pve.@pve[0].root_pwd 2>/dev/null`
|
||||
local IMAGE_NAME=`uci get pve.@pve[0].image_name 2>/dev/null`
|
||||
local tz=`uci get pve.@pve[0].time_zone 2>/dev/null`
|
||||
local port=`uci get pve.@pve[0].http_port 2>/dev/null`
|
||||
@ -43,6 +52,7 @@ do_install() {
|
||||
tz="`uci get system.@system[0].zonename | sed 's/ /_/g'`"
|
||||
fi
|
||||
[ -z "$tz" ] || cmd="$cmd -e TZ=\"$tz\""
|
||||
[ -z "$root_pwd" ] || cmd="$cmd -e root_password=\"$root_pwd\""
|
||||
|
||||
cmd="$cmd -v /mnt:/mnt"
|
||||
mountpoint -q /mnt && cmd="$cmd:rslave"
|
||||
|
Loading…
Reference in New Issue
Block a user