update 2023-01-18 20:18:16

This commit is contained in:
github-actions[bot] 2023-01-18 20:18:16 +08:00
parent 1403dff397
commit 28d7ec8e63
8 changed files with 47 additions and 34 deletions

View File

@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=alist
PKG_VERSION:=3.8.0
PKG_WEB_VERSION:=3.8.0
PKG_VERSION:=3.9.0
PKG_WEB_VERSION:=3.9.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/alist-org/alist/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=dc00c2c1282bf265be4df760a8a34d35911a0c662f1b3bcdb46a332e3eb16d0e
PKG_HASH:=676b2bacd96e7856080ca837e94da1fc19abb5b219679bebf700f780611f25e3
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
@ -23,7 +23,7 @@ define Download/$(PKG_NAME)-web
FILE:=$(PKG_NAME)-web-$(PKG_WEB_VERSION).tar.gz
URL_FILE:=dist.tar.gz
URL:=https://github.com/alist-org/alist-web/releases/download/$(PKG_WEB_VERSION)/
HASH:=7ebca75ce684c6a20f60d40d3aff03e40d86f4e1befe7e990d9fc6558a7e26e1
HASH:=f72953d765e29a36303379db8742a8ff039ba027d6862ac827458faad03ba08b
endef
PKG_CONFIG_DEPENDS:= \

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-xray
PKG_VERSION:=1.24.0
PKG_VERSION:=1.25.0
PKG_RELEASE:=1
PKG_LICENSE:=MPLv2
@ -43,6 +43,10 @@ config PACKAGE_XRAY_RESTART_DNSMASQ_ON_IFACE_CHANGE
bool "Restart dnsmasq on interface change (select this if using dnsmasq v2.87)"
default n
config PACKAGE_XRAY_IGNORE_TP_SPEC_DEF_GW
bool "Ignore TP_SPEC_DEF_GW (select this if using private IPv4 address)"
default n
choice
prompt "Limit memory use by setting rlimit_data (experimental)"
default PACKAGE_XRAY_RLIMIT_DATA_UNLIMITED
@ -107,6 +111,9 @@ endif
$(INSTALL_DIR) $(1)/usr/share/xray
$(LN) /var/run/xray.pid $(1)/usr/share/xray/xray.pid
$(LN) /usr/bin/xray $(1)/usr/share/xray/xray
ifdef CONFIG_PACKAGE_XRAY_IGNORE_TP_SPEC_DEF_GW
$(INSTALL_DATA) ./root/usr/share/xray/ignore_tp_spec_def_gw $(1)/usr/share/xray/ignore_tp_spec_def_gw
endif
ifdef CONFIG_PACKAGE_XRAY_RESTART_DNSMASQ_ON_IFACE_CHANGE
$(INSTALL_DATA) ./root/usr/share/xray/restart_dnsmasq_on_iface_change $(1)/usr/share/xray/restart_dnsmasq_on_iface_change
endif

View File

@ -27,6 +27,7 @@ Focus on making the most of Xray (HTTP/HTTPS/Socks/TProxy inbounds, multiple pro
## Changelog 2023
* 2023-01-01 feat: optional restart of dnsmasq on interface change
* 2023-01-18 `[OpenWrt 22.03 or above only]` feat: option to ignore TP_SPEC_DEF_GW
## Changelog 2022

View File

@ -1,15 +1,18 @@
#!/bin/sh
DEFAULT_GATEWAY=$(ip route get 1.1.1.1 | grep -Eoe "src (\d+.\d+.\d+.\d+)" | awk '{print $NF}')
if [ -n "$DEFAULT_GATEWAY" ] ; then
logger -st transparent-proxy-ipset[$$] -p6 "default gateway available at $DEFAULT_GATEWAY"
nft -f - <<-EOF
add set inet fw4 tp_spec_def_gw { type ipv4_addr; }
flush set inet fw4 tp_spec_def_gw
add element inet fw4 tp_spec_def_gw { $DEFAULT_GATEWAY }
EOF
if [ -s /usr/share/xray/restart_dnsmasq_on_iface_change ] ; then
service dnsmasq restart
if [ ! -s /usr/share/xray/ignore_tp_spec_def_gw ] ; then
DEFAULT_GATEWAY=$(ip route get 1.1.1.1 | grep -Eoe "src (\d+.\d+.\d+.\d+)" | awk '{print $NF}')
if [ -n "$DEFAULT_GATEWAY" ] ; then
logger -st transparent-proxy-ipset[$$] -p6 "default gateway available at $DEFAULT_GATEWAY"
nft -f - <<-EOF
add set inet fw4 tp_spec_def_gw { type ipv4_addr; }
flush set inet fw4 tp_spec_def_gw
add element inet fw4 tp_spec_def_gw { $DEFAULT_GATEWAY }
EOF
else
logger -st transparent-proxy-ipset[$$] -p6 "default gateway not available, please wait for interface ready"
fi
else
logger -st transparent-proxy-ipset[$$] -p6 "default gateway not available, please wait for interface ready"
fi
if [ -s /usr/share/xray/restart_dnsmasq_on_iface_change ] ; then
service dnsmasq restart
fi

View File

@ -1,6 +1,7 @@
#!/usr/bin/utpl
{%
const uci = require("uci");
const fs = require("fs");
const cursor = uci.cursor();
cursor.load("xray");
const config = cursor.get_all("xray");
@ -15,6 +16,7 @@
push(wan_fw_ips_no_dns, split(general.secure_dns, ":")[0]);
const wan_bp_ips = uniq(wan_bp_ips_no_dns);
const wan_fw_ips = uniq(wan_fw_ips_no_dns);
const ignore_tp_spec_def_gw = fs.stat("/usr/share/xray/ignore_tp_spec_def_gw");
%}
set tp_spec_src_ac {
type ether_addr
@ -64,11 +66,13 @@
elements = { {{ join(", ", wan_fw_ips)}} }
}
{% if (ignore_tp_spec_def_gw != null): %}
set tp_spec_def_gw {
type ipv4_addr
size 65536
flags interval
}
{% endif %}
chain xray_prerouting {
type filter hook prerouting priority filter; policy accept;
@ -92,7 +96,9 @@
ip daddr @tp_spec_dst_fw goto tp_spec_lan_re
ip daddr @tp_spec_dst_sp return
ip daddr @tp_spec_dst_bp return
{% if (ignore_tp_spec_def_gw != null): %}
ip daddr @tp_spec_def_gw return
{% endif %}
goto tp_spec_lan_re
}
@ -117,7 +123,9 @@
ip daddr @tp_spec_dst_fw goto tp_spec_wan_re
ip daddr @tp_spec_dst_sp return
ip daddr @tp_spec_dst_bp return
{% if (ignore_tp_spec_def_gw != null): %}
ip daddr @tp_spec_def_gw return
{% endif %}
goto tp_spec_wan_re
}

View File

@ -0,0 +1 @@
Ignore TP_SPEC_DEF_GW (nftables only). TP_SPEC_DEF_GW is only useful when you have publicly routable IPv4 address on your router.

View File

@ -1,21 +1,13 @@
#
# Copyright (C) 2021 ImmortalWrt
# (https://immortalwrt.org)
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=sub-web
PKG_VERSION:=1.0.0
PKG_RELEASE:=6
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/CareyWang/sub-web.git
PKG_SOURCE_DATE:=2021-09-08
PKG_SOURCE_VERSION:=f3a997d6054fae3bcf0aa4989f1d80d83d30af17
PKG_MIRROR_HASH:=85e482f049d849c44792028fa8a1091f7319906081fc0862897dd75c56265372
PKG_SOURCE_DATE:=2022-11-10
PKG_SOURCE_VERSION:=71e53414a89b5fd5ec0ef453e32202194993d0cf
PKG_MIRROR_HASH:=2910c8a782c6a3b2886f91b1621a973a8d5923b9f6d979c9b3defaf0acca4e06
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
@ -41,15 +33,16 @@ endef
define Build/Compile
( \
cd $(PKG_BUILD_DIR); \
pushd "$(PKG_BUILD_DIR)"; \
yarn install; \
yarn build; \
NODE_OPTIONS=--openssl-legacy-provider yarn build; \
popd ; \
)
endef
define Package/sub-web/install
$(INSTALL_DIR) $(1)/www
$(CP) $(PKG_BUILD_DIR)/dist $(1)/www/sub-web
$(INSTALL_DIR) $(1)/www/sub-web
$(CP) $(PKG_BUILD_DIR)/dist/* $(1)/www/sub-web/
endef
$(eval $(call BuildPackage,sub-web))

View File

@ -10,7 +10,7 @@ Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
--- a/src/views/Subconverter.vue
+++ b/src/views/Subconverter.vue
@@ -258,6 +258,110 @@ export default {
@@ -299,6 +299,110 @@ export default {
backendOptions: [{ value: "http://127.0.0.1:25500/sub?" }],
remoteConfig: [
{