update 2024-03-14 00:19:00

This commit is contained in:
github-actions[bot] 2024-03-14 00:19:00 +08:00
parent f65c136716
commit 260a5e2602
10 changed files with 47 additions and 203 deletions

View File

@ -9,9 +9,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
PKG_SOURCE_DATE:=2024-02-20
PKG_SOURCE_VERSION:=03d10f1657b4ddace618c34ab61b6357d1ae9c9a
PKG_MIRROR_HASH:=424f80efe89652aa226f8432f36166ab89c2cde5ad6b6f37a1f4224ce7bf560f
PKG_SOURCE_DATE:=2024-03-08
PKG_SOURCE_VERSION:=59c4bb920542ee903ee1df39097ae024e2e8226f
PKG_MIRROR_HASH:=604096e2804bd49b9d2ed6c6aaea1101db0d475a20ebfd2693dc4082e88cbdf6
PKG_LICENSE:=BSD 3-Clause
PKG_LICENSE_FILES:=LICENSE

View File

@ -3,7 +3,7 @@
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM 2152
#define LAST_COMMIT_POSITION "2152 (03d10f1657b4)"
#define LAST_COMMIT_POSITION_NUM 2157
#define LAST_COMMIT_POSITION "2157 (59c4bb920542)"
#endif // OUT_LAST_COMMIT_POSITION_H_

View File

@ -33,8 +33,9 @@ PKG_CONFIG_DEPENDS:= \
LUCI_TITLE:=LuCI support for PassWall
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+coreutils +coreutils-base64 +coreutils-nohup +curl \
+chinadns-ng +dns2socks +dns2tcp +ip-full +libuci-lua +lua +luci-compat +luci-lib-jsonc \
+microsocks +resolveip +tcping +unzip
+chinadns-ng +dns2socks +dns2tcp +dnsmasq-full +ip-full \
+libuci-lua +lua +luci-compat +luci-lib-jsonc \
+microsocks +resolveip +tcping
define Package/$(PKG_NAME)/config
menu "Configuration"
@ -42,7 +43,6 @@ menu "Configuration"
config PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy
bool "Iptables Transparent Proxy"
select PACKAGE_dnsmasq-full
select PACKAGE_ipset
select PACKAGE_ipt2socks
select PACKAGE_iptables
@ -56,7 +56,6 @@ config PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy
config PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy
bool "Nftables Transparent Proxy"
select PACKAGE_dnsmasq-full
select PACKAGE_ipt2socks
select PACKAGE_nftables
select PACKAGE_kmod-nft-socket
@ -149,6 +148,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin
config PACKAGE_$(PKG_NAME)_INCLUDE_Xray
bool "Include Xray"
select PACKAGE_xray-core
select PACKAGE_unzip
default y if aarch64||arm||i386||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_Xray_Plugin

View File

@ -550,10 +550,12 @@ local function processData(szType, content, add_mode, add_from)
result.protocol = 'shadowsocks'
end
if result.type == "SS-Rust" or result.type == "Xray" then
if method:lower() == "chacha20-ietf-poly1305" then
result.method = "chacha20-poly1305"
end
if result.type == "SS-Rust" and method:lower() == "chacha20-poly1305" then
result.method = "chacha20-ietf-poly1305"
end
if result.type == "Xray" and method:lower() == "chacha20-ietf-poly1305" then
result.method = "chacha20-poly1305"
end
if result.plugin then

View File

@ -25,7 +25,7 @@ export function socks_outbound(server, tag) {
address: server["server"],
port: v,
users: users
}
};
})
},
streamSettings: stream_settings_result

View File

@ -41,7 +41,7 @@ export function vless_outbound(server, tag) {
encryption: server["vless_encryption"]
}
]
}
};
})
},
streamSettings: stream_settings_result

View File

@ -24,6 +24,7 @@ define Package/$(PKG_NAME)/description
endef
define Build/Compile
echo "luci-app-xray $(PKG_VERSION)-$(PKG_RELEASE) `git rev-parse HEAD` `date +%s`" > $(PKG_BUILD_DIR)/version.txt
endef
define Package/$(PKG_NAME)/install
@ -33,6 +34,8 @@ define Package/$(PKG_NAME)/install
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/luci-app-xray-status.json $(1)/usr/share/luci/menu.d/luci-app-xray-status.json
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/luci-app-xray-status.json $(1)/usr/share/rpcd/acl.d/luci-app-xray-status.json
$(INSTALL_DIR) $(1)/usr/share/xray
$(INSTALL_DATA) $(PKG_BUILD_DIR)/version.txt $(1)/usr/share/xray/version.txt
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -7,6 +7,13 @@
'require view';
'require view.xray.shared as shared';
function bool_translate(v) {
if (v === "1") {
return _("available");
}
return _("unavailable");
}
function greater_than_zero(n) {
if (n < 0) {
return 0;
@ -297,17 +304,24 @@ function inbound_stats(vars, config) {
return view.extend({
load: function () {
return uci.load(shared.variant);
return Promise.all([
uci.load(shared.variant),
fs.read("/usr/share/xray/version.txt")
]);
},
render: function (config) {
if (uci.get_first(config, "general", "metrics_server_enable") != "1") {
render: function (load_result) {
const config = load_result[0];
if (uci.get_first(config, "general", "metrics_server_enable") !== "1") {
return E([], [
E('h2', _('Xray (status)')),
E('p', { 'class': 'cbi-map-descr' }, _("Xray metrics server not enabled. Enable Xray metrics server to see details."))
]);
}
const info = E('p', { 'class': 'cbi-map-descr' }, _("Collecting data. If any error occurs, check if wget is installed correctly."));
const version = load_result[1].split(" ");
const stats_available = bool_translate(uci.get_first(config, "general", "stats"));
const observatory_available = bool_translate(uci.get_first(config, "general", "observatory"));
const info = E('p', { 'class': 'cbi-map-descr' }, `${version[0]} Version ${version[1]} (${version[2]}) Built ${new Date(version[3] * 1000).toLocaleString()}. Statistics: ${stats_available}. Observatory: ${observatory_available}.`);
const detail = E('div', {});
poll.add(function () {
fs.exec_direct("/usr/bin/wget", ["-O", "-", `http://127.0.0.1:${uci.get_first(config, "general", "metrics_server_port") || 18888}/debug/vars`], "json").then(function (vars) {
@ -319,7 +333,6 @@ return view.extend({
])
]);
ui.tabs.initTabGroup(result.lastElementChild.childNodes);
dom.content(info, _("Show some statistics of Xray. If nothing here, enable statistics and / or observatory for Xray."));
dom.content(detail, result);
});
});

View File

@ -5,31 +5,18 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=naiveproxy
PKG_VERSION:=122.0.6261.43-1
PKG_VERSION:=122.0.6261.43-2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=c45fbec6390791678490b7f5df7441c120eda4af92c1aaa6c15dbe5b4ca649b6
PKG_SOURCE:=naiveproxy-v$(PKG_VERSION)-openwrt-$(ARCH_PACKAGES).tar.xz
PKG_SOURCE_URL:=https://github.com/klzgrad/naiveproxy/releases/download/v$(PKG_VERSION)/
PKG_HASH:=skip
PKG_LICENSE:=BSD 3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_BUILD_DEPENDS:=gn/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16
ifneq ($(CONFIG_CPU_TYPE)," ")
CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
CPU_SUBTYPE:=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE)))
ifeq ($(CPU_SUBTYPE),)
CPU_SUBTYPE:=""
endif
else
CPU_TYPE:=""
CPU_SUBTYPE:=""
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/naiveproxy-v$(PKG_VERSION)-openwrt-$(ARCH_PACKAGES)
include $(INCLUDE_DIR)/package.mk
@ -48,73 +35,19 @@ define Package/naiveproxy/description
ensures best practices in performance and security.
endef
ifneq ($(CONFIG_CCACHE),)
export CCACHE_SLOPPINESS=time_macros
export CCACHE_BASEDIR=$(PKG_BUILD_DIR)/src
export CCACHE_CPP2=yes
export naive_ccache_flags=cc_wrapper="$(CCACHE)"
endif
CLANG_VER:=18-init-16072-gc4146121e940-5
CLANG_FILE:=clang-llvmorg-$(CLANG_VER).tgz
define Download/CLANG
URL:=https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64
URL_FILE:=$(CLANG_FILE)
FILE:=$(CLANG_FILE)
HASH:=63009892f985488f9152bc064b43e9d3be197c437f2469b83efce6293887442b
endef
PGO_VER:=6261-1707846690-1391fcc4772c0b31e214f533af5cafa87e4ccf40
PGO_FILE:=chrome-linux-$(PGO_VER).profdata
define Download/PGO_PROF
URL:=https://storage.googleapis.com/chromium-optimization-profiles/pgo_profiles
URL_FILE:=$(PGO_FILE)
FILE:=$(PGO_FILE)
HASH:=3ee58646307e2b06c5c12eb7995b0a017c981aa7eec64a85f0be5140f8d24d9f
endef
define Build/Prepare
$(call Build/Prepare/Default)
( \
pushd $(PKG_BUILD_DIR)/src ; \
mkdir -p "chrome/build/pgo_profiles" ; \
$(CP) "$(DL_DIR)/$(PGO_FILE)" "chrome/build/pgo_profiles" ; \
mkdir -p "third_party/llvm-build/Release+Asserts" ; \
$(TAR) -xzf "$(DL_DIR)/$(CLANG_FILE)" -C "third_party/llvm-build/Release+Asserts" ; \
echo -e "llvmorg-$(CLANG_VER)" > "third_party/llvm-build/Release+Asserts/cr_build_revision" ; \
popd ; \
)
endef
define Build/Configure
( \
pushd "$(PKG_BUILD_DIR)/src" ; \
. ../init_env.sh "$(ARCH)" $(CPU_TYPE) $(CPU_SUBTYPE) "$(TOOLCHAIN_DIR)" ; \
export naive_flags+=" $$$${naive_ccache_flags}" ; \
mkdir -p "out" ; \
gn gen "out/Release" --args="$$$${naive_flags}" --script-executable="$(PYTHON)" ; \
popd ; \
)
endef
define Build/Compile
+$(NINJA) -C "$(PKG_BUILD_DIR)/src/out/Release" naive
endef
define Package/naiveproxy/conffiles
/etc/config/naiveproxy
endef
define Build/Compile
endef
define Package/naiveproxy/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/out/Release/naive $(1)/usr/bin/naive
$(INSTALL_BIN) $(PKG_BUILD_DIR)/naive $(1)/usr/bin/naive
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
$(INSTALL_CONF) $(CURDIR)/files/naiveproxy.config $(1)/etc/config/naiveproxy
$(INSTALL_BIN) $(CURDIR)/files/naiveproxy.init $(1)/etc/init.d/naiveproxy
endef
$(eval $(call Download,CLANG))
$(eval $(call Download,PGO_PROF))
$(eval $(call BuildPackage,naiveproxy))

View File

@ -1,107 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
# --------------------------------------------------------
# Init build dependencies for naiveproxy
# Read args from shell
target_arch="$1"
cpu_type="$2"
cpu_subtype="$3"
toolchain_dir="$4"
# Set arch info
case "${target_arch}" in
"aarch64")
naive_arch="arm64"
;;
"i386")
naive_arch="x86"
;;
"x86_64")
naive_arch="x64"
;;
*)
naive_arch="${target_arch}"
;;
esac
# OS detection
[ "$(uname)" != "Linux" -o "$(uname -m)" != "x86_64" ] && { echo -e "Support Linux AMD64 only."; exit 1; }
# Create TMP dir
mkdir -p "$PWD/tmp"
export TMPDIR="$PWD/tmp"
# Set ENV
export DEPOT_TOOLS_WIN_TOOLCHAIN=0
export naive_flags="
is_official_build=true
exclude_unwind_tables=true
enable_resource_allowlist_generation=false
symbol_level=0
is_clang=true
use_sysroot=false
fatal_linker_warnings=false
treat_warnings_as_errors=false
enable_base_tracing=false
use_udev=false
use_aura=false
use_ozone=false
use_gio=false
use_gtk=false
use_platform_icu_alternatives=true
use_glib=false
disable_file_support=true
enable_websockets=false
use_kerberos=false
enable_mdns=false
enable_reporting=false
include_transport_security_state_preload_list=false
use_nss_certs=false
enable_backup_ref_ptr_support=false
enable_dangling_raw_ptr_checks=false
target_os=\"openwrt\"
target_cpu=\"${naive_arch}\"
target_sysroot=\"${toolchain_dir}\""
case "${target_arch}" in
"arm")
naive_flags+=" arm_version=0 arm_cpu=\"${cpu_type}\""
case "${cpu_type}" in "arm1176jzf-s"|"arm926ej-s"|"mpcore"|"xscale") naive_flags+=" arm_use_thumb=false" ;; esac
if [ -n "${cpu_subtype}" ]; then
if grep -q "neon" <<< "${cpu_subtype}"; then
neon_flag="arm_use_neon=true"
else
neon_flag="arm_use_neon=false"
fi
naive_flags+=" arm_fpu=\"${cpu_subtype}\" arm_float_abi=\"hard\" ${neon_flag}"
else
naive_flags+=" arm_float_abi=\"soft\" arm_use_neon=false"
fi
;;
"arm64")
[ -n "${cpu_type}" ] && naive_flags+=" arm_cpu=\"${cpu_type}\""
;;
"mipsel"|"mips64el")
naive_flags+=" use_thin_lto=false chrome_pgo_phase=0"
if [ -z "${cpu_type}" ]; then
naive_flags+=" mips_arch_variant=\"r1\""
else
naive_flags+=" mips_arch_variant=\"r2\""
fi
if [ "${target_arch}" == "mipsel" ]; then
if [ "${cpu_subtype}" == "24kf" ]; then
naive_flags+=" mips_float_abi=\"hard\""
else
naive_flags+=" mips_float_abi=\"soft\""
fi
fi
;;
esac