From c2078b506e0b715686cf69ec44588bf100c77d4e Mon Sep 17 00:00:00 2001 From: nivalxer Date: Fri, 26 Jul 2019 13:55:43 +0800 Subject: [PATCH 1/7] Update subscribe.sh : v2ray tls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 部分v2ray订阅链接返回的tls参数不是0,1,可能是"tls":"tls",因此更新节点不会勾上tls选项。 因而增加了判断 --- .../root/usr/share/shadowsocksr/subscribe.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh index 3c73d36c39..9567c4ef3a 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh @@ -154,7 +154,11 @@ do json_get_var ssr_ws_host host json_get_var ssr_ws_path path json_get_var ssr_tls tls - + if [ "$ssr_tls" == "tls" -o "$ssr_tls" == "1" ]; then + ssr_tls="1" + else + ssr_tls="0" + fi fi From 20a0ab0f31d20af55da8ee52f4aa82b53036fbf6 Mon Sep 17 00:00:00 2001 From: cnzgray Date: Fri, 26 Jul 2019 13:56:01 +0800 Subject: [PATCH 2/7] luci-ssr-plus: optimize subscribe group and node identity method --- .../root/usr/share/shadowsocksr/subscribe.sh | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh index 9567c4ef3a..bcfb3a6405 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh @@ -16,6 +16,8 @@ echo_date(){ Server_Update() { local uci_set="uci -q set $name.$1." + ${uci_set}grouphashkey="$ssr_grouphashkey" + ${uci_set}hashkey="$ssr_hashkey" ${uci_set}alias="[$ssr_group] $ssr_remarks" ${uci_set}auth_enable="0" ${uci_set}switch_enable="1" @@ -35,6 +37,7 @@ Server_Update() { ${uci_set}kcp_port="0" ${uci_set}kcp_param="--nocomp" + if [ "$ssr_type" = "v2ray" ]; then #v2ray ${uci_set}alter_id="$ssr_alter_id" ${uci_set}vmess_id="$ssr_vmess_id" @@ -44,6 +47,7 @@ Server_Update() { ${uci_set}ws_host="$ssr_ws_host" ${uci_set}ws_path="$ssr_ws_path" ${uci_set}tls="$ssr_tls" + fi } name=shadowsocksr @@ -58,6 +62,8 @@ do echo_date "开始下载订阅链接到本地临时文件,请稍等..." subscribe_data=$(wget-ssl --user-agent="User-Agent: Mozilla" --no-check-certificate -T 3 -O- ${subscribe_url[o]}) curl_code=$? + # 计算group的hashkey + ssr_grouphashkey=$(echo "${subscribe_url[o]}" | md5sum | cut -d ' ' -f1) if [ ! $curl_code -eq 0 ];then echo_date "下载订阅成功..." echo_date "开始解析节点信息..." @@ -99,9 +105,10 @@ do curr_ssr=$(uci show $name | grep @servers | grep -c server=) for ((x=0;x<$curr_ssr;x++)) # 循环已有服务器信息,匹配当前订阅群组 do - temp_alias=$(uci -q get $name.@servers[$x].alias | grep "\[$ssr_group\]") - [ -n "$temp_alias" ] && temp_host_o[${#temp_host_o[@]}]=$(uci get $name.@servers[$x].server) + temp_alias=$(uci -q get $name.@servers[$x].grouphashkey | grep "$ssr_grouphashkey") + [ -n "$temp_alias" ] && temp_host_o[${#temp_host_o[@]}]=$(uci get $name.@servers[$x].hashkey) done + for ((x=0;x<$subscribe_max;x++)) # 循环链接 do [ ${#subscribe_max_x[@]} -eq 0 ] && temp_x=$x || temp_x=${subscribe_max_x[x]} @@ -109,6 +116,9 @@ do if [[ "$result" != "" ]] then temp_info=$(urlsafe_b64decode ${ssr_url[temp_x]//ssr:\/\//}) # 解码 SSR 链接 + # 计算hashkey + ssr_hashkey=$(echo "$temp_info" | md5sum | cut -d ' ' -f1) + info=${temp_info///?*/} temp_info_array=(${info//:/ }) @@ -141,6 +151,9 @@ do done else temp_info=$(urlsafe_b64decode ${ssr_url[temp_x]//vmess:\/\//}) # 解码 Vmess 链接 + # 计算hashkey + ssr_hashkey=$(echo "$temp_info" | md5sum | cut -d ' ' -f1) + ssr_type="v2ray" json_load "$temp_info" json_get_var ssr_host add @@ -161,14 +174,17 @@ do fi fi + if [ -z "ssr_remarks" ]; then # 没有备注的话则生成一个 + ssr_remarks="$ssr_host:$ssr_port"; + fi - uci_name_tmp=$(uci show $name | grep -w $ssr_host | awk -F . '{print $2}') + uci_name_tmp=$(uci show $name | grep -w "$ssr_hashkey" | awk -F . '{print $2}') if [ -z "$uci_name_tmp" ]; then # 判断当前服务器信息是否存在 uci_name_tmp=$(uci add $name servers) subscribe_n=$(($subscribe_n + 1)) fi Server_Update $uci_name_tmp - subscribe_x=$subscribe_x$ssr_host" " + subscribe_x=$subscribe_x$ssr_hashkey" " ssrtype=$(echo $ssr_type | tr '[a-z]' '[A-Z]') echo_date "$ssrtype节点:【$ssr_remarks】" @@ -206,4 +222,4 @@ else logger -st $log_name[$$] -p3 "${subscribe_url[$o]} 订阅数据获取失败 错误代码: $curl_code" fi done -/etc/init.d/$name restart >/dev/null 2>&1 +/etc/init.d/$name restart >/dev/null 2>&1 \ No newline at end of file From 26a3952b51b9492185970ed5f55e9370b9e5fa9a Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Thu, 25 Jul 2019 23:04:53 -0700 Subject: [PATCH 3/7] mt76: fix kernel Oops by updating to the latest version --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index f37aa4c745..de56ee56d6 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2019-07-13 -PKG_SOURCE_VERSION:=410923fa24de770c042ea816cff6c18b9b184a2d -PKG_MIRROR_HASH:=0f546ba43bb8212ec7851ac22f5d0d32e8dddb1b893aa6d0209c48488122df04 +PKG_SOURCE_DATE:=2019-07-22 +PKG_SOURCE_VERSION:=75656a4590a3288503d42194adf014f4a9eeaa84 +PKG_MIRROR_HASH:=fd647dbcfb0e2623de717f888a944850150438660589c1b64468d1cba047a09c PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 From fc0965634622c7a2864f303693daeed53a719e51 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Thu, 25 Jul 2019 23:07:12 -0700 Subject: [PATCH 4/7] mac80211: add config tweak for tx bursting when using VHT --- .../kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 0426cb60f7..6dc4e5bf5f 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -23,6 +23,7 @@ drv_mac80211_init_device_config() { config_add_string path phy 'macaddr:macaddr' config_add_string hwmode + config_add_string tx_burst config_add_int beacon_int chanbw frag rts config_add_int rxantenna txantenna antenna_gain txpower distance config_add_boolean noscan ht_coex @@ -97,9 +98,10 @@ mac80211_hostapd_setup_base() { [ "$auto_channel" -gt 0 ] && json_get_values channel_list channels json_get_vars noscan ht_coex - json_get_values ht_capab_list ht_capab + json_get_values ht_capab_list ht_capab tx_burst [ -n "$noscan" -a "$noscan" -gt 0 ] && hostapd_noscan=1 + [ "$tx_burst" = 0 ] && tx_burst= ieee80211n=1 ht_capab= @@ -229,6 +231,7 @@ mac80211_hostapd_setup_base() { vht_link_adapt:3 \ vht160:2 + set_default tx_burst 2.0 append base_cfg "ieee80211ac=1" "$N" vht_cap=0 for cap in $(iw phy "$phy" info | awk -F "[()]" '/VHT Capabilities/ { print $2 }'); do @@ -310,6 +313,7 @@ mac80211_hostapd_setup_base() { ${channel:+channel=$channel} ${channel_list:+chanlist=$channel_list} ${hostapd_noscan:+noscan=1} +${tx_burst:+tx_queue_data2_burst=$tx_burst} $base_cfg EOF From a9442ddd7b77a9e5b575e0ae0d5b9c57028c7fb7 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Thu, 25 Jul 2019 23:11:13 -0700 Subject: [PATCH 5/7] ramips: add kmod-mt7615e to Phicomm K2P images --- target/linux/ramips/image/mt7621.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 152187dbb6..1e7ff45898 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -232,6 +232,7 @@ define Device/k2p DTS := K2P IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := Phicomm K2P + DEVICE_PACKAGES := kmod-mt7615e wpad-basic endef TARGET_DEVICES += k2p From 4aa5ec7a02f2b4f9e5ab66dc7dbe06fbf7b34df8 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Fri, 26 Jul 2019 02:33:46 -0700 Subject: [PATCH 6/7] ramips: fix mac addresses used by Phicomm K2P --- target/linux/ramips/base-files/etc/board.d/02_network | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 09c6f9b0c9..8850e71e7d 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -569,6 +569,10 @@ ramips_setup_macs() wan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(macaddr_setbit_la "$wan_mac") ;; + k2p) + lan_mac=$(mtd_get_mac_binary factory 0xe000) + wan_mac=$(mtd_get_mac_binary factory 0xe006) + ;; m3|\ m4-4M|\ m4-8M|\ From 0c4430f0af8b26cf7c09153e64030cd1d894399c Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Fri, 26 Jul 2019 02:43:35 -0700 Subject: [PATCH 7/7] Revert "mt76: fix kernel Oops by updating to the latest version" This reverts commit 26a3952b51b9492185970ed5f55e9370b9e5fa9a. --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index de56ee56d6..f37aa4c745 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2019-07-22 -PKG_SOURCE_VERSION:=75656a4590a3288503d42194adf014f4a9eeaa84 -PKG_MIRROR_HASH:=fd647dbcfb0e2623de717f888a944850150438660589c1b64468d1cba047a09c +PKG_SOURCE_DATE:=2019-07-13 +PKG_SOURCE_VERSION:=410923fa24de770c042ea816cff6c18b9b184a2d +PKG_MIRROR_HASH:=0f546ba43bb8212ec7851ac22f5d0d32e8dddb1b893aa6d0209c48488122df04 PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1