Skip to content

Commit

Permalink
add vless flow customize
Browse files Browse the repository at this point in the history
  • Loading branch information
xsm1997 committed Oct 12, 2020
1 parent 316135f commit f3d51df
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ local securitys = {
"chacha20-poly1305"
}

local flows = {
"xtls-rprx-origin",
"xtls-rprx-origin-udp443",
"xtls-rprx-direct",
"xtls-rprx-direct-udp443"
}

m = Map(shadowsocksr, translate("Edit ShadowSocksR Server"))
m.redirect = luci.dispatcher.build_url("admin/services/shadowsocksr/servers")
if m.uci:get(shadowsocksr, sid) ~= "servers" then
Expand Down Expand Up @@ -404,6 +411,13 @@ o.rmempty = true
o.default = "0"
o:depends({type="vless", tls="1"})

-- Flow
o = s:option(Value, "vless_flow", translate("Flow"))
for _, v in ipairs(flows) do o:value(v, v) end
o.rmempty = true
o.default = "xtls-rprx-origin"
o:depends("xtls", "1")

-- [[ Mux ]]--
o = s:option(Flag, "mux", translate("Mux"))
o.rmempty = true
Expand Down
3 changes: 3 additions & 0 deletions luci-app-ssr-plus/po/zh-cn/ssr-plus.po
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ msgstr "加密方式"
msgid "VLESS Encryption"
msgstr "VLESS 加密"

msgid "Flow"
msgstr "流控 (Flow)"

msgid "Transport"
msgstr "传输协议"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ outbound = {
users = {
{
id = server.vmess_id,
flow = (server.xtls == '1') and "xtls-rprx-origin" or nil,
flow = (server.xtls == '1') and (server.vless_flow and server.vless_flow or "xtls-rprx-origin") or nil,
encryption = server.vless_encryption
}
}
Expand Down

0 comments on commit f3d51df

Please sign in to comment.