update 2024-03-01 23:23:23
This commit is contained in:
parent
58918025f0
commit
6a961e63b0
|
@ -87,6 +87,10 @@ o.default = gfw
|
|||
o = s:option(ListValue, "dports", translate("Proxy Ports"))
|
||||
o:value("1", translate("All Ports"))
|
||||
o:value("2", translate("Only Common Ports"))
|
||||
o:value("3", translate("Custom Ports"))
|
||||
cp = s:option(Value, "custom_ports", translate("Enter Custom Ports"))
|
||||
cp:depends("dports", "3") -- 仅当用户选择“Custom Ports”时显示
|
||||
cp.placeholder = "e.g., 80,443,8080"
|
||||
o.default = 1
|
||||
|
||||
o = s:option(ListValue, "pdnsd_enable", translate("Resolve Dns Mode"))
|
||||
|
|
|
@ -1013,9 +1013,17 @@ start_rules() {
|
|||
all) echo "-z" ;;
|
||||
esac
|
||||
}
|
||||
if [ "$(uci_get_by_type global dports 1)" == "2" ]; then
|
||||
local proxyport="-m multiport --dports 22,53,587,465,995,993,143,80,443,853,9418"
|
||||
if [ "$(uci_get_by_type global dports)" == "3" ]; then
|
||||
local custom_ports=$(uci_get_by_name $GLOBAL_SERVER custom_ports) # custom_ports 存储了用户自定义的端口
|
||||
if [ -n "$custom_ports" ]; then
|
||||
local proxyport="-m multiport --dports $custom_ports"
|
||||
fi
|
||||
else
|
||||
if [ "$(uci_get_by_type global dports 1)" == "2" ]; then
|
||||
local proxyport="-m multiport --dports 22,53,587,465,995,993,143,80,443,853,9418"
|
||||
fi
|
||||
fi
|
||||
|
||||
get_arg_out() {
|
||||
case "$(uci_get_by_type access_control router_proxy 1)" in
|
||||
1) echo "-o" ;;
|
||||
|
@ -1141,6 +1149,7 @@ reset() {
|
|||
set shadowsocksr.@global[0].threads='0'
|
||||
set shadowsocksr.@global[0].run_mode='router'
|
||||
set shadowsocksr.@global[0].dports='2'
|
||||
set shadowsocksr.@global[0].custom_ports='80,443'
|
||||
set shadowsocksr.@global[0].pdnsd_enable='1'
|
||||
set shadowsocksr.@global[0].tunnel_forward='8.8.4.4:53'
|
||||
set shadowsocksr.@global[0].monitor_enable='1'
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=naiveproxy
|
||||
PKG_VERSION:=121.0.6167.71-1
|
||||
PKG_VERSION:=122.0.6261.43-1
|
||||
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:=8e6d3029a0249140595fab3d668103881689f6c7ef7c65230191f674a370b309
|
||||
PKG_HASH:=c45fbec6390791678490b7f5df7441c120eda4af92c1aaa6c15dbe5b4ca649b6
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
@ -55,22 +55,22 @@ ifneq ($(CONFIG_CCACHE),)
|
|||
export naive_ccache_flags=cc_wrapper="$(CCACHE)"
|
||||
endif
|
||||
|
||||
CLANG_VER:=18-init-12938-geb1d5065-1
|
||||
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:=fd1628fdb22157a7328c25802a745f17f92f5210a8b62591202deb92413f52e5
|
||||
HASH:=63009892f985488f9152bc064b43e9d3be197c437f2469b83efce6293887442b
|
||||
endef
|
||||
|
||||
PGO_VER:=6167-1705427108-cb39f8a22759d3159f79efc273ac8b13a0f3882a
|
||||
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:=7632c875db539cb1d4a0df6eb3acc9e155d2d477376dec1f815081bbae7cdd4f
|
||||
HASH:=3ee58646307e2b06c5c12eb7995b0a017c981aa7eec64a85f0be5140f8d24d9f
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
|
@ -102,9 +102,16 @@ define Build/Compile
|
|||
+$(NINJA) -C "$(PKG_BUILD_DIR)/src/out/Release" naive
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/conffiles
|
||||
/etc/config/naiveproxy
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/out/Release/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))
|
||||
|
|
Loading…
Reference in New Issue