luci-app-passwall: bump to 3.9-68

This commit is contained in:
CN_SZTL 2020-10-07 03:09:56 +08:00
parent 3988c2ef29
commit 23d7257629
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
7 changed files with 31 additions and 36 deletions

View File

@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall
PKG_VERSION:=3.9
PKG_RELEASE:=66
PKG_DATE:=20201004
PKG_RELEASE:=68
PKG_DATE:=20201006
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

View File

@ -4,17 +4,13 @@ local node_section = arg[1]
local run_type = arg[2]
local local_addr = arg[3]
local local_port = arg[4]
local relay_port = arg[5]
local server_host = arg[5]
local server_port = arg[6]
local node = ucursor:get_all("passwall", node_section)
if relay_port and relay_port ~= "nil" then
node.address = "127.0.0.1"
node.port = tonumber(relay_port)
end
local config = {
listen = run_type .. "://" .. local_addr .. ":" .. local_port,
proxy = node.protocol .. "://" .. node.username .. ":" .. node.password .. "@" .. node.address .. ":" .. node.port
proxy = node.protocol .. "://" .. node.username .. ":" .. node.password .. "@" .. (server_host or node.address) .. ":" .. (server_port or node.port)
}
print(jsonc.stringify(config, 1))

View File

@ -1,15 +1,16 @@
local ucursor = require "luci.model.uci".cursor()
local jsonc = require "luci.jsonc"
local node_section = arg[1]
local local_port = arg[2]
local server_host = arg[3]
local server_port = arg[4]
local local_addr = arg[2]
local local_port = arg[3]
local server_host = arg[4]
local server_port = arg[5]
local node = ucursor:get_all("passwall", node_section)
local config = {
server = server_host or node.address,
server_port = server_port or tonumber(node.port),
local_address = "0.0.0.0",
server_port = tonumber(server_port) or tonumber(node.port),
local_address = local_addr,
local_port = tonumber(local_port),
password = node.password,
method = node.method,

View File

@ -4,7 +4,8 @@ local node_section = arg[1]
local run_type = arg[2]
local local_addr = arg[3]
local local_port = arg[4]
local relay_port = arg[5]
local server_host = arg[5]
local server_port = arg[6]
local node = ucursor:get_all("passwall", node_section)
local cipher = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-SHA:AES256-SHA:DES-CBC3-SHA"
@ -13,8 +14,8 @@ local trojan = {
run_type = run_type,
local_addr = local_addr,
local_port = tonumber(local_port),
remote_addr = node.address,
remote_port = tonumber(node.port),
remote_addr = server_host or node.address,
remote_port = tonumber(server_port) or tonumber(node.port),
password = {node.password},
log_level = 1,
ssl = {
@ -68,8 +69,4 @@ if node.type == "Trojan-Go" then
password = node.ss_aead_pwd or ""
} or nil
end
if relay_port and relay_port ~= "nil" then
trojan.remote_addr = "127.0.0.1"
trojan.remote_port = tonumber(relay_port)
end
print(json.stringify(trojan, 1))

View File

@ -127,7 +127,7 @@ local function gen_outbound(node, tag, relay_port)
level = node.level and tonumber(node.level) or 0,
security = (node.protocol == "vmess") and node.security or nil,
encryption = node.encryption or "none",
flow = (node.stream_security == "xtls") and node.flow or nil
flow = node.flow or nil
}
}
}

View File

@ -374,6 +374,14 @@ level:depends({ type = "V2ray", protocol = "vmess" })
level:depends({ type = "V2ray", protocol = "vless" })
level:depends({ type = "V2ray", protocol = "trojan" })
flow = s:option(Value, "flow", translate("flow"))
flow.placeholder = "xtls-rprx-origin"
--flow:value("xtls-rprx-origin")
--flow:value("xtls-rprx-origin-udp443")
--flow:value("xtls-rprx-direct")
--flow:value("xtls-rprx-direct-udp443")
flow:depends({ type = "V2ray", protocol = "vless" })
stream_security = s:option(ListValue, "stream_security", translate("Transport Layer Encryption"), translate('Whether or not transport layer encryption is enabled, "none" for unencrypted, "tls" for using TLS, "xtls" for using XTLS.'))
stream_security:value("none", "none")
stream_security:value("tls", "tls")
@ -394,12 +402,6 @@ stream_security.validate = function(self, value)
return value
end
flow = s:option(Value, "flow", translate("flow"))
flow.default = "xtls-rprx-origin"
flow:value("xtls-rprx-origin")
flow:value("xtls-rprx-origin-udp443")
flow:depends("stream_security", "xtls")
-- [[ TLS部分 ]] --
tls_sessionTicket = s:option(Flag, "tls_sessionTicket", translate("Session Ticket"))
tls_sessionTicket.default = "0"

View File

@ -318,7 +318,6 @@ run_socks() {
[ -n "$relay_port" ] && {
server_host="127.0.0.1"
port=$relay_port
echo $relay_port
}
local msg tmp
@ -353,15 +352,15 @@ run_socks() {
ln_start_bin "$(first_type $(config_t_get global_app v2ray_file notset)/v2ray v2ray)" v2ray -config="$config_file"
;;
trojan-go)
lua $API_GEN_TROJAN $node client $bind $local_port $port > $config_file
lua $API_GEN_TROJAN $node client $bind $local_port $server_host $port > $config_file
ln_start_bin "$(first_type $(config_t_get global_app trojan_go_file notset) trojan-go)" trojan-go -config "$config_file"
;;
trojan*)
lua $API_GEN_TROJAN $node client $bind $local_port $port > $config_file
lua $API_GEN_TROJAN $node client $bind $local_port $server_host $port > $config_file
ln_start_bin "$(first_type ${type})" "${type}" -c "$config_file"
;;
naiveproxy)
lua $API_GEN_NAIVE $node socks $bind $local_port $port > $config_file
lua $API_GEN_NAIVE $node socks $bind $local_port $server_host $port > $config_file
ln_start_bin "$(first_type naive)" naive "$config_file"
;;
brook)
@ -373,7 +372,7 @@ run_socks() {
ln_start_bin "$(first_type $(config_t_get global_app brook_file notset) brook)" "brook_SOCKS_$5" "$protocol" --socks5 "$bind:$local_port" -s "$server_host:$port" -p "$(config_n_get $node password)"
;;
ss|ssr)
lua $API_GEN_SS $node $local_port $server_host $port > $config_file
lua $API_GEN_SS $node "0.0.0.0" $local_port $server_host $port > $config_file
ln_start_bin "$(first_type ${type}-local)" "${type}-local" -c "$config_file" -b "$bind" -u
;;
esac
@ -438,7 +437,7 @@ run_redir() {
fi
;;
ss|ssr)
lua $API_GEN_SS $node $local_port > $config_file
lua $API_GEN_SS $node "0.0.0.0" $local_port > $config_file
ln_start_bin "$(first_type ${type}-redir)" "${type}-redir" -c "$config_file" -U
;;
esac
@ -514,11 +513,11 @@ run_redir() {
;;
ss|ssr)
if [ "$kcptun_use" == "1" ]; then
lua $API_GEN_SS $node $local_port 127.0.0.1 $KCPTUN_REDIR_PORT > $config_file
lua $API_GEN_SS $node "0.0.0.0" $local_port "127.0.0.1" $KCPTUN_REDIR_PORT > $config_file
process=1
[ "$6" == 1 ] && [ "$UDP_NODE1" == "tcp" ] && echolog "Kcptun不支持UDP转发"
else
lua $API_GEN_SS $node $local_port > $config_file
lua $API_GEN_SS $node "0.0.0.0" $local_port > $config_file
[ "$6" == 1 ] && [ "$UDP_NODE1" == "tcp" ] && extra_param="-u"
fi
for k in $(seq 1 $process); do