update 2023-03-22 16:22:20

This commit is contained in:
github-actions[bot] 2023-03-22 16:22:20 +08:00
parent abd85dbc81
commit 2ce3aa2ddf
11 changed files with 18 additions and 92 deletions

View File

@ -8,7 +8,6 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_SagerNet_Core \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks \
@ -38,8 +37,6 @@ LUCI_DEPENDS:= \
+PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray-core \
+PACKAGE_$(PKG_NAME)_INCLUDE_Xray:curl \
+PACKAGE_$(PKG_NAME)_INCLUDE_Xray:xray-core \
+PACKAGE_$(PKG_NAME)_INCLUDE_SagerNet_Core:curl \
+PACKAGE_$(PKG_NAME)_INCLUDE_SagerNet_Core:sagernet-core \
+PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG:chinadns-ng \
+PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria:hysteria \
+PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks:ipt2socks \
@ -109,9 +106,6 @@ choice
config PACKAGE_$(PKG_NAME)_INCLUDE_Xray
bool "Xray-core"
config PACKAGE_$(PKG_NAME)_INCLUDE_SagerNet_Core
bool "SagerNet-core (An enhanced edition of v2ray-core)"
endchoice
config PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG

View File

@ -57,12 +57,6 @@ o:value("https://ispip.clang.cn/all_cn_cidr.txt", translate("Clang.CN.CIDR"))
o:value("https://fastly.jsdelivr.net/gh/gaoyifan/china-operator-ip@ip-lists/china.txt", translate("china-operator-ip"))
o.default = "https://ispip.clang.cn/all_cn.txt"
o = s:option(ListValue, "default_packet_encoding", translate("Default Packet Encoding"))
o:value("none", translate("none"))
o:value("packet", translate("packet (v2ray-core v5+)"))
o:value("xudp", translate("xudp (Xray-core)"))
o.default = "xudp"
o = s:option(Flag, "netflix_enable", translate("Enable Netflix Mode"))
o.rmempty = false

View File

@ -184,9 +184,6 @@ o:value("vless", translate("VLESS"))
o:value("vmess", translate("VMess"))
o:value("trojan", translate("Trojan"))
o:value("shadowsocks", translate("Shadowsocks"))
if is_installed("sagernet-core") then
o:value("shadowsocksr", translate("ShadowsocksR"))
end
if is_finded("xray") then
o:value("wireguard", translate("WireGuard"))
end
@ -244,7 +241,6 @@ o:depends({type = "socks5", auth_enable = true})
o:depends({type = "v2ray", v2ray_protocol = "http", auth_enable = true})
o:depends({type = "v2ray", v2ray_protocol = "socks", socks_ver = "5", auth_enable = true})
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
o:depends({type = "v2ray", v2ray_protocol = "trojan"})
o = s:option(ListValue, "encrypt_method", translate("Encrypt Method"))
@ -253,7 +249,6 @@ for _, v in ipairs(encrypt_methods) do
end
o.rmempty = true
o:depends("type", "ssr")
o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
o = s:option(ListValue, "encrypt_method_ss", translate("Encrypt Method"))
for _, v in ipairs(encrypt_methods_ss) do
@ -277,10 +272,10 @@ o.default = "1"
-- Shadowsocks Plugin
o = s:option(Value, "plugin", translate("Obfs"))
o:value("none", translate("None"))
if is_finded("obfs-local") or is_installed("sagernet-core") then
if is_finded("obfs-local") then
o:value("obfs-local", translate("obfs-local"))
end
if is_finded("v2ray-plugin") or is_installed("sagernet-core") then
if is_finded("v2ray-plugin") then
o:value("v2ray-plugin", translate("v2ray-plugin"))
end
if is_finded("xray-plugin") then
@ -288,16 +283,10 @@ if is_finded("xray-plugin") then
end
o.rmempty = true
o:depends("type", "ss")
if is_installed("sagernet-core") then
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
end
o = s:option(Value, "plugin_opts", translate("Plugin Opts"))
o.rmempty = true
o:depends("type", "ss")
if is_installed("sagernet-core") then
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
end
o = s:option(ListValue, "protocol", translate("Protocol"))
for _, v in ipairs(protocol) do
@ -305,11 +294,9 @@ for _, v in ipairs(protocol) do
end
o.rmempty = true
o:depends("type", "ssr")
o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
o = s:option(Value, "protocol_param", translate("Protocol param (optional)"))
o:depends("type", "ssr")
o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
o = s:option(ListValue, "obfs", translate("Obfs"))
for _, v in ipairs(obfs) do
@ -317,11 +304,9 @@ for _, v in ipairs(obfs) do
end
o.rmempty = true
o:depends("type", "ssr")
o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
o = s:option(Value, "obfs_param", translate("Obfs param (optional)"))
o:depends("type", "ssr")
o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
-- [[ Hysteria ]]--
o = s:option(ListValue, "hysteria_protocol", translate("Protocol"))
@ -478,21 +463,17 @@ o:depends("transport", "ws")
o.rmempty = true
if is_finded("v2ray") then
-- 启用WS前置数据
o = s:option(Flag, "ws_ed_enable", translate("Enable early data"))
o:depends("transport", "ws")
-- WS前置数据
o = s:option(Value, "ws_ed", translate("Max Early Data"))
o:depends("ws_ed_enable", true)
o.datatype = "uinteger"
o.default = 2048
o.value("2048")
o.rmempty = true
-- WS前置数据标头
o = s:option(Value, "ws_ed_header", translate("Early Data Header Name"))
o:depends("ws_ed_enable", true)
o.default = "Sec-WebSocket-Protocol"
o.value("Sec-WebSocket-Protocol")
o.rmempty = true
end
@ -513,19 +494,16 @@ o = s:option(Value, "serviceName", translate("gRPC Service Name"))
o:depends("transport", "grpc")
o.rmempty = true
if is_finded("xray") or is_installed("sagernet-core") then
if is_finded("xray") then
-- gPRC模式
o = s:option(ListValue, "grpc_mode", translate("gRPC Mode"))
o:depends("transport", "grpc")
o:value("gun", translate("Gun"))
o:value("multi", translate("Multi"))
if is_installed("sagernet-core") then
o:value("raw", translate("Raw"))
end
o.rmempty = true
end
if is_finded("xray") or is_installed("sagernet-core") then
if is_finded("xray") then
-- gRPC初始窗口
o = s:option(Value, "initial_windows_size", translate("Initial Windows Size"))
o.datatype = "uinteger"
@ -824,17 +802,6 @@ o:depends("type", "ss")
o:depends("type", "trojan")
o:depends("type", "hysteria")
if is_installed("sagernet-core") then
o = s:option(ListValue, "packet_encoding", translate("Packet Encoding"))
o:value("none", translate("none"))
o:value("packet", translate("packet (v2ray-core v5+)"))
o:value("xudp", translate("xudp (Xray-core)"))
o.default = "xudp"
o.rmempty = true
o:depends({type = "v2ray", v2ray_protocol = "vless"})
o:depends({type = "v2ray", v2ray_protocol = "vmess"})
end
o = s:option(Flag, "switch_enable", translate("Enable Auto Switch"))
o.rmempty = false
o.default = "1"

View File

@ -742,9 +742,6 @@ msgstr "WebSocket 主机名"
msgid "WebSocket Path"
msgstr "WebSocket 路径"
msgid "Enable early data"
msgstr "启用前置数据"
msgid "Max Early Data"
msgstr "最大前置数据"
@ -829,9 +826,6 @@ msgstr "节点公钥"
msgid "Pre-shared key"
msgstr "预共享密钥"
msgid "Packet Encoding"
msgstr "数据包编码"
msgid "Network interface to use"
msgstr "使用的网络接口"
@ -856,8 +850,5 @@ msgstr "重新应用"
msgid "Apply"
msgstr "应用"
msgid "Default Packet Encoding"
msgstr "默认数据包编码"
msgid "Enable Netflix Mode"
msgstr "启用 Netflix 分流模式"

View File

@ -981,7 +981,6 @@ reset() {
set shadowsocksr.@global[0].switch_time='667'
set shadowsocksr.@global[0].switch_timeout='5'
set shadowsocksr.@global[0].switch_try_count='3'
set shadowsocksr.@global[0].default_packet_encoding='xudp'
set shadowsocksr.@global[0].gfwlist_url='https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt'
set shadowsocksr.@global[0].chnroute_url='https://ispip.clang.cn/all_cn.txt'
set shadowsocksr.@global[0].nfip_url='https://fastly.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt'

View File

@ -26,35 +26,22 @@ function vmess_vless()
}
}
}
},
packetEncoding = server.packet_encoding or nil
}
}
end
function trojan_shadowsocks()
outbound_settings = {
plugin = ((server.v2ray_protocol == "shadowsocks") and server.plugin ~= "none" and server.plugin) or (server.v2ray_protocol == "shadowsocksr" and "shadowsocksr") or nil,
pluginOpts = (server.v2ray_protocol == "shadowsocks") and server.plugin_opts or nil,
pluginArgs = (server.v2ray_protocol == "shadowsocksr") and {
"--protocol=" .. server.protocol,
"--protocol-param=" .. (server.protocol_param or ""),
"--obfs=" .. server.obfs,
"--obfs-param=" .. (server.obfs_param or "")
} or nil,
servers = {
{
address = server.server,
port = tonumber(server.server_port),
password = server.password,
method = ((server.v2ray_protocol == "shadowsocks") and server.encrypt_method_ss) or ((server.v2ray_protocol == "shadowsocksr") and server.encrypt_method) or nil,
method = ((server.v2ray_protocol == "shadowsocks") and server.encrypt_method_ss) or nil,
uot = (server.v2ray_protocol == "shadowsocks") and (server.uot == '1') or nil,
ivCheck = (server.v2ray_protocol == "shadowsocks") and (server.ivCheck == '1') or nil,
}
}
}
if server.v2ray_protocol == "shadowsocksr" then
server.v2ray_protocol = "shadowsocks"
end
end
function socks_http()
outbound_settings = {
@ -108,9 +95,6 @@ function outbound:handleIndex(index)
shadowsocks = function()
trojan_shadowsocks()
end,
shadowsocksr = function()
trojan_shadowsocks()
end,
socks = function()
socks_http()
end,
@ -224,7 +208,6 @@ local Xray = {
grpcSettings = (server.transport == "grpc") and {
-- grpc
serviceName = server.serviceName or "",
mode = (server.grpc_mode ~= "gun") and server.grpc_mode or nil,
multiMode = (server.grpc_mode == "multi") and true or false,
idle_timeout = tonumber(server.idle_timeout) or nil,
health_check_timeout = tonumber(server.health_check_timeout) or nil,
@ -235,8 +218,7 @@ local Xray = {
mux = (server.mux == "1" and server.transport ~= "grpc") and {
-- mux
enabled = true,
concurrency = tonumber(server.concurrency),
packetEncoding = (server.v2ray_protocol == "vmess" or server.v2ray_protocol == "vless") and server.packet_encoding or nil
concurrency = tonumber(server.concurrency)
} or nil
} or nil
}

View File

@ -27,9 +27,7 @@ local switch = ucic:get_first(name, 'server_subscribe', 'switch', '1')
local subscribe_url = ucic:get_first(name, 'server_subscribe', 'subscribe_url', {})
local filter_words = ucic:get_first(name, 'server_subscribe', 'filter_words', '过期时间/剩余流量')
local save_words = ucic:get_first(name, 'server_subscribe', 'save_words', '')
local packet_encoding = luci.model.ipkg.installed("sagernet-core") and ucic:get_first(name, 'global', 'default_packet_encoding', 'xudp') or nil
local v2_ss = luci.sys.exec('type -t -p ss-redir sslocal') ~= "" and "ss" or "v2ray"
local v2_ssr = luci.sys.exec('type -t -p ssr-redir') ~= "" and "ssr" or "v2ray"
local v2_tj = luci.sys.exec('type -t -p trojan') ~= "" and "trojan" or "v2ray"
local log = function(...)
print(os.date("%Y-%m-%d %H:%M:%S ") .. table.concat({...}, " "))
@ -149,8 +147,7 @@ local function processData(szType, content)
if szType == 'ssr' then
local dat = split(content, "/%?")
local hostInfo = split(dat[1], ':')
result.type = v2_ssr
result.v2ray_protocol = (v2_ssr == "v2ray") and "shadowsocksr" or nil
result.type = 'ssr'
result.server = hostInfo[1]
result.server_port = hostInfo[2]
result.protocol = hostInfo[3]
@ -178,7 +175,6 @@ local function processData(szType, content)
result.transport = info.net
result.vmess_id = info.id
result.alias = info.ps
result.packet_encoding = packet_encoding
-- result.mux = 1
-- result.concurrency = 8
if info.net == 'ws' then
@ -361,7 +357,6 @@ local function processData(szType, content)
result.vmess_id = url.user
result.vless_encryption = params.encryption or "none"
result.transport = params.type or "tcp"
result.packet_encoding = packet_encoding
result.tls = (params.security == "tls" or params.security == "xtls") and "1" or "0"
result.tls_host = params.sni
result.tls_flow = (params.security == "tls") and params.flow or nil

View File

@ -89,7 +89,7 @@ make V=s
- If there is a bug, please raise an issue
- The theme's personal color matching may not meet the public's appetite, welcome to provide color matching suggestions
### preview
### Preview
<details> <summary>iOS</summary>
<img src="./preview/webapp_home.PNG"/>

View File

@ -216,6 +216,9 @@
} else {
$("header").css("box-shadow", "0 2px 4px rgb(0 0 0 / 8%)")
}
if (showSide) {
$("header").css("box-shadow", "17rem 2px 4px rgb(0 0 0 / 8%)")
}
});
/**

View File

@ -8,4 +8,5 @@ $(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function(){
lastNode.removeClass("active");$(this).parent().addClass("active");$(".main > .loading").fadeIn("fast");return true;});$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function(){if(lastNode!=undefined)
lastNode.removeClass("active");$(this).addClass("active");$(".main > .loading").fadeIn("fast");window.location=$($(this).find("a")[0]).attr("href");return false;});if(getCurrentNodeByUrl()){mainNodeName="node-"+luciLocation[0]+"-"+luciLocation[1];mainNodeName=mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase();$("body").addClass(mainNodeName);}
$(".cbi-button-up").val("");$(".cbi-button-down").val("");$("#maincontent > .container").find("a").each(function(){var that=$(this);var onclick=that.attr("onclick");if(onclick==undefined||onclick==""){that.click(function(){var href=that.attr("href");if(href.indexOf("#")==-1){$(".main > .loading").fadeIn("fast");return true;}});}});var showSide=false;$(".showSide").click(function(){if(showSide){$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");showSide=false;}else{$(".darkMask").stop(true).fadeIn("fast");$(".main-left").stop(true).animate({width:"17rem"},"fast");$(".main-right").css("overflow-y","hidden");$(".showSide").css("display","none");$("header").css("box-shadow","17rem 2px 4px rgb(0 0 0 / 8%)")
showSide=true;}});$(".darkMask").click(function(){if(showSide){showSide=false;$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$(".showSide").css("display","");$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")}});$(window).resize(function(){if($(window).width()>992){$(".showSide").css("display","");$(".main-left").css("width","");$(".darkMask").stop(true);$(".darkMask").css("display","none");showSide=false;$("header").css("box-shadow","17rem 2px 4px rgb(0 0 0 / 8%)")}else{$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")}});$("legend").each(function(){var that=$(this);that.after("<span class='panel-title'>"+that.text()+"</span>");});$(".main-right").focus();$(".main-right").blur();$("input").attr("size","0");if(mainNodeName!=undefined){switch(mainNodeName){case "node-status-system_log":case "node-status-kernel_log":$("#syslog").focus(function(){$("#syslog").blur();$(".main-right").focus();$(".main-right").blur();});break;case "node-status-firewall":var button=$(".node-status-firewall > .main fieldset li > a");button.addClass("cbi-button cbi-button-reset a-to-btn");break;case "node-system-reboot":var button=$(".node-system-reboot > .main > .main-right p > a");button.addClass("cbi-button cbi-input-reset a-to-btn");break;}}})(jQuery);
showSide=true;}});$(".darkMask").click(function(){if(showSide){showSide=false;$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$(".showSide").css("display","");$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")}});$(window).resize(function(){if($(window).width()>992){$(".showSide").css("display","");$(".main-left").css("width","");$(".darkMask").stop(true);$(".darkMask").css("display","none");showSide=false;$("header").css("box-shadow","17rem 2px 4px rgb(0 0 0 / 8%)")}else{$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")}
if(showSide){$("header").css("box-shadow","17rem 2px 4px rgb(0 0 0 / 8%)")}});$("legend").each(function(){var that=$(this);that.after("<span class='panel-title'>"+that.text()+"</span>");});$(".main-right").focus();$(".main-right").blur();$("input").attr("size","0");if(mainNodeName!=undefined){switch(mainNodeName){case "node-status-system_log":case "node-status-kernel_log":$("#syslog").focus(function(){$("#syslog").blur();$(".main-right").focus();$(".main-right").blur();});break;case "node-status-firewall":var button=$(".node-status-firewall > .main fieldset li > a");button.addClass("cbi-button cbi-button-reset a-to-btn");break;case "node-system-reboot":var button=$(".node-system-reboot > .main > .main-right p > a");button.addClass("cbi-button cbi-input-reset a-to-btn");break;}}})(jQuery);

View File

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=v2rayA
PKG_VERSION:=2.0.1
PKG_VERSION:=2.0.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=5f79a42c4a720dec778a5c03c925dbbeb8d0fedebbb38ddf90d2d9712480b6a4
PKG_HASH:=fb0c60d95cd208e3306cf9c5488f41fe7cf6697d58dc377e5e7d471e37ce9060
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
PKG_LICENSE:=AGPL-3.0-only