mirror of
https://github.com/kenzok8/small-package
synced 2025-01-08 13:27:36 +08:00
update-10.29
This commit is contained in:
parent
5a294472a4
commit
b0353c71bc
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=aliyundrive-webdav
|
||||
PKG_VERSION:=0.4.8
|
||||
PKG_VERSION:=0.5.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
|
@ -11,3 +11,4 @@ config server
|
||||
option cache_ttl '600'
|
||||
option root '/'
|
||||
option no_trash '0'
|
||||
option domain_id ''
|
||||
|
@ -25,15 +25,20 @@ start_service() {
|
||||
local host=$(uci_get_by_type server host 127.0.0.1)
|
||||
local port=$(uci_get_by_type server port 8080)
|
||||
local root=$(uci_get_by_type server root /)
|
||||
local no_trash=$(uci_get_by_type server no_trash 0)
|
||||
local domain_id=$(uci_get_by_type server domain_id)
|
||||
|
||||
local extra_options="-I"
|
||||
case "$no_trash" in
|
||||
1|on|true|yes|enabled)
|
||||
extra_options="$extra_options --no-trash"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
if [[ ! -z "$domain_id" ]]; then
|
||||
extra_options="$extra_options --domain-id $domain_id"
|
||||
else
|
||||
case "$(uci_get_by_type server no_trash 0)" in
|
||||
1|on|true|yes|enabled)
|
||||
extra_options="$extra_options --no-trash"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options --host $host --port $port --root $root -S $read_buf_size --cache-size $cache_size --cache-ttl $cache_ttl --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1"
|
||||
|
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-aliyundrive-webdav
|
||||
PKG_VERSION:=0.4.8
|
||||
PKG_VERSION:=0.5.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
||||
|
||||
|
@ -46,6 +46,9 @@ cache_ttl.datatype = "uinteger"
|
||||
no_trash = e:option(Flag, "no_trash", translate("Delete file permanently instead of trashing"))
|
||||
no_trash.rmempty = false
|
||||
|
||||
domain_id = e:option(Value, "domain_id", translate("Domain ID"),
|
||||
translate("Input domain_id option will use <a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">Aliyun PDS</a> instead of <a href=\"https://www.aliyundrive.com\" target=\"_blank\">AliyunDrive</a>"))
|
||||
|
||||
debug = e:option(Flag, "debug", translate("Debug Mode"))
|
||||
debug.rmempty = false
|
||||
|
||||
|
@ -66,3 +66,9 @@ msgstr "限制只能访问该云盘目录,默认为 / 表示不限制,注意
|
||||
|
||||
msgid "Delete file permanently instead of trashing"
|
||||
msgstr "删除文件不放入回收站"
|
||||
|
||||
msgid "Domain ID"
|
||||
msgstr "阿里云相册与云盘服务 domainId"
|
||||
|
||||
msgid "Input domain_id option will use <a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">Aliyun PDS</a> instead of <a href=\"https://www.aliyundrive.com\" target=\"_blank\">AliyunDrive</a>"
|
||||
msgid "填写此选项将使用<a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">阿里云相册与网盘服务</a>而不是<a href=\"https://www.aliyundrive.com\" target=\"_blank\">阿里云盘</a>"
|
||||
|
@ -1,204 +1,238 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-core
|
||||
PKG_VERSION:=4.43.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)?
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-core
|
||||
PKG_VERSION:=4.43.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_V2RAY_CORE_COMPRESS_GOPROXY \
|
||||
CONFIG_V2RAY_CORE_COMPRESS_UPX \
|
||||
CONFIG_V2RAY_CTL_COMPRESS_GOPROXY \
|
||||
CONFIG_V2RAY_CTL_COMPRESS_UPX
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/v2fly/v2ray-core/v4
|
||||
GO_PKG_BUILD_PKG:=github.com/v2fly/v2ray-core/v4/main
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG).build=OpenWrt \
|
||||
$(GO_PKG).version=$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/v2ray/template
|
||||
TITLE:=A platform for building proxies to bypass network restrictions
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
URL:=https://www.v2fly.org
|
||||
endef
|
||||
|
||||
define Package/v2ray-core
|
||||
$(call Package/v2ray/template)
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
endef
|
||||
|
||||
define Package/v2ray-ctl
|
||||
$(call Package/v2ray/template)
|
||||
DEPENDS:=v2ray-core
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra
|
||||
$(call Package/v2ray/template)
|
||||
TITLE+= (extra resources)
|
||||
DEPENDS:=v2ray-core
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata
|
||||
$(call Package/v2ray/template)
|
||||
TITLE+= (geodata files)
|
||||
DEPENDS:=v2ray-core
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/v2ray/description
|
||||
Project V is a set of network tools that help you to build your own computer network.
|
||||
It secures your network connections and thus protects your privacy.
|
||||
endef
|
||||
|
||||
define Package/v2ray-core/description
|
||||
$(call Package/v2ray/description)
|
||||
endef
|
||||
|
||||
define Package/v2ray-ctl/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes configuration tool for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes extra resources for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes GEO datas used for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-core/config
|
||||
menu "v2ray-core Configuration"
|
||||
depends on PACKAGE_v2ray-core
|
||||
|
||||
config V2RAY_CORE_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config V2RAY_CORE_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
depends on !mips64
|
||||
default y
|
||||
endmenu
|
||||
endef
|
||||
|
||||
define Package/v2ray-ctl/config
|
||||
menu "v2ray-ctl Configuration"
|
||||
depends on PACKAGE_v2ray-ctl
|
||||
|
||||
config V2RAY_CTL_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config V2RAY_CTL_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
depends on !mips64
|
||||
default y
|
||||
endmenu
|
||||
endef
|
||||
|
||||
GEOIP_VER:=202106030115
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
|
||||
define Download/geoip
|
||||
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=acf231d7c6461d088ae479fe0c1cb143b5ee3cf7048a897c5a9b7807ab7005df
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20210531212831
|
||||
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
|
||||
|
||||
define Download/geosite
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=332bbe53af49582dbf89bda04ee5e60e474f9293fc368ab55b517fdcd4a78ed2
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_V2RAY_CORE_COMPRESS_GOPROXY)$(CONFIG_V2RAY_CTL_COMPRESS_GOPROXY),)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.io
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
ifneq ($(CONFIG_PACKAGE_v2ray-geodata),)
|
||||
$(call Download,geoip)
|
||||
$(call Download,geosite)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call GoPackage/Build/Compile)
|
||||
mv $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/v2ray
|
||||
ifneq ($(CONFIG_V2RAY_CORE_COMPRESS_UPX),)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_v2ray-ctl),)
|
||||
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG)/infra/control/main)
|
||||
$(call GoPackage/Build/Compile)
|
||||
mv $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/v2ctl
|
||||
ifneq ($(CONFIG_V2RAY_CTL_COMPRESS_UPX),)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ctl
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/v2ray-core/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v2ray $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/v2ray-ctl/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v2ctl $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray/
|
||||
$(CP) $(PKG_BUILD_DIR)/release/extra/* $(1)/usr/share/v2ray/
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray/
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOIP_FILE) $(1)/usr/share/v2ray/geoip.dat
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOSITE_FILE) $(1)/usr/share/v2ray/geosite.dat
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,v2ray-core))
|
||||
$(eval $(call BuildPackage,v2ray-ctl))
|
||||
$(eval $(call BuildPackage,v2ray-extra))
|
||||
$(eval $(call BuildPackage,v2ray-geodata))
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_V2RAY_CORE_COMPRESS_GOPROXY \
|
||||
CONFIG_V2RAY_CORE_COMPRESS_UPX \
|
||||
CONFIG_V2RAY_CTL_COMPRESS_GOPROXY \
|
||||
CONFIG_V2RAY_CTL_COMPRESS_UPX
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/v2fly/v2ray-core/v4
|
||||
GO_PKG_BUILD_PKG:=github.com/v2fly/v2ray-core/v4/main
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG).build=OpenWrt \
|
||||
$(GO_PKG).version=$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/v2ray/template
|
||||
TITLE:=A platform for building proxies to bypass network restrictions
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
URL:=https://www.v2fly.org
|
||||
endef
|
||||
|
||||
define Package/v2ray-core
|
||||
$(call Package/v2ray/template)
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
endef
|
||||
|
||||
define Package/v2ray-ctl
|
||||
$(call Package/v2ray/template)
|
||||
DEPENDS:=v2ray-core
|
||||
endef
|
||||
|
||||
define Package/v2ray-example
|
||||
$(call Package/v2ray/template)
|
||||
TITLE+= (example configs)
|
||||
DEPENDS:=v2ray-core
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra
|
||||
$(call Package/v2ray/template)
|
||||
TITLE+= (extra resources)
|
||||
DEPENDS:=v2ray-core
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata
|
||||
$(call Package/v2ray/template)
|
||||
TITLE+= (geodata files)
|
||||
DEPENDS:=v2ray-core
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/v2ray/description
|
||||
Project V is a set of network tools that help you to build your own computer network.
|
||||
It secures your network connections and thus protects your privacy.
|
||||
endef
|
||||
|
||||
define Package/v2ray-core/description
|
||||
$(call Package/v2ray/description)
|
||||
endef
|
||||
|
||||
define Package/v2ray-ctl/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes configuration tool for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-example/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes example configuration files for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes extra resources for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes GEO datas used for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-core/config
|
||||
menu "v2ray-core Configuration"
|
||||
depends on PACKAGE_v2ray-core
|
||||
|
||||
config V2RAY_CORE_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config V2RAY_CORE_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
depends on !mips64
|
||||
default y
|
||||
endmenu
|
||||
endef
|
||||
|
||||
define Package/v2ray-ctl/config
|
||||
menu "v2ray-ctl Configuration"
|
||||
depends on PACKAGE_v2ray-ctl
|
||||
|
||||
config V2RAY_CTL_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config V2RAY_CTL_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
depends on !mips64
|
||||
default y
|
||||
endmenu
|
||||
endef
|
||||
|
||||
|
||||
define Package/v2ray-core/conffiles
|
||||
/etc/config/v2ray
|
||||
/etc/v2ray/
|
||||
endef
|
||||
|
||||
GEOIP_VER:=202110210032
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
|
||||
define Download/geoip
|
||||
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=932cd484471f8066c040ab84a04fdd70df6c5cee99545de610e1f337bb696220
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20211018134657
|
||||
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
|
||||
|
||||
define Download/geosite
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=60b2388b11f1f9b6e14794fbacdf3bf693e3101e3ec651ce5423d8caceda5497
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_V2RAY_CORE_COMPRESS_GOPROXY)$(CONFIG_V2RAY_CTL_COMPRESS_GOPROXY),)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.baidu.com
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
ifneq ($(CONFIG_PACKAGE_v2ray-geodata),)
|
||||
$(call Download,geoip)
|
||||
$(call Download,geosite)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call GoPackage/Build/Compile)
|
||||
mv $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/v2ray
|
||||
ifneq ($(CONFIG_V2RAY_CORE_COMPRESS_UPX),)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_v2ray-ctl),)
|
||||
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG)/infra/control/main)
|
||||
$(call GoPackage/Build/Compile)
|
||||
mv $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/v2ctl
|
||||
ifneq ($(CONFIG_V2RAY_CTL_COMPRESS_UPX),)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ctl
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/v2ray-core/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v2ray $(1)/usr/bin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/config.json $(1)/etc/v2ray/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_CONF) $(CURDIR)/files/v2ray.conf $(1)/etc/config/v2ray
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(CURDIR)/files/v2ray.init $(1)/etc/init.d/v2ray
|
||||
endef
|
||||
|
||||
define Package/v2ray-ctl/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v2ctl $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/v2ray-example/install
|
||||
$(INSTALL_DIR) $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/vpoint_socks_vmess.json $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/vpoint_vmess_freedom.json $(1)/etc/v2ray/
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray/
|
||||
$(CP) $(PKG_BUILD_DIR)/release/extra/* $(1)/usr/share/v2ray/
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray/
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOIP_FILE) $(1)/usr/share/v2ray/geoip.dat
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOSITE_FILE) $(1)/usr/share/v2ray/geosite.dat
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,v2ray-core))
|
||||
$(eval $(call BuildPackage,v2ray-ctl))
|
||||
$(eval $(call BuildPackage,v2ray-example))
|
||||
$(eval $(call BuildPackage,v2ray-extra))
|
||||
$(eval $(call BuildPackage,v2ray-geodata))
|
||||
|
10
v2ray-core/files/v2ray.conf
Normal file
10
v2ray-core/files/v2ray.conf
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
config v2ray 'enabled'
|
||||
option enabled '0'
|
||||
|
||||
config v2ray 'config'
|
||||
option confdir '/etc/v2ray'
|
||||
list conffiles '/etc/v2ray/config.json'
|
||||
option datadir '/usr/share/v2ray'
|
||||
option format 'json'
|
||||
|
54
v2ray-core/files/v2ray.init
Executable file
54
v2ray-core/files/v2ray.init
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
USE_PROCD=1
|
||||
START=99
|
||||
|
||||
CONF="v2ray"
|
||||
PROG="/usr/bin/v2ray"
|
||||
CAPA_FILE="/etc/capabilities/v2ray.json"
|
||||
|
||||
start_service() {
|
||||
config_load "$CONF"
|
||||
|
||||
local enabled
|
||||
config_get enabled "enabled" "enabled" "0"
|
||||
[ "$enabled" -eq "0" ] && exit 1
|
||||
|
||||
local confdir
|
||||
local conffiles
|
||||
local datadir
|
||||
local format
|
||||
|
||||
config_get confdir "config" "confdir"
|
||||
config_get conffiles "config" "conffiles"
|
||||
config_get datadir "config" "datadir" "/usr/share/v2ray"
|
||||
config_get format "config" "format" "json"
|
||||
|
||||
procd_open_instance "$CONF"
|
||||
procd_set_param command "$PROG" run
|
||||
[ -n "$confdir" ] && procd_append_param command -confdir "$confdir"
|
||||
[ -n "$conffiles" ] && {
|
||||
for i in $conffiles
|
||||
do
|
||||
procd_append_param command -config "$i"
|
||||
done
|
||||
}
|
||||
[ -n "$format" ] && procd_append_param command -format "$format"
|
||||
procd_set_param env v2ray.local.asset="$datadir"
|
||||
procd_set_param file $conffiles
|
||||
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "$CONF"
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-plugin
|
||||
PKG_VERSION:=4.42.2
|
||||
PKG_VERSION:=4.43.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
|
@ -64,7 +64,7 @@ define Package/xray-geodata
|
||||
endef
|
||||
|
||||
define Package/xray/description
|
||||
Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
|
||||
Xray, Penetrates Everything. It helps you to build your own computer network.
|
||||
It secures your network connections and thus protects your privacy.
|
||||
endef
|
||||
|
||||
@ -157,9 +157,6 @@ define Package/xray-core/install
|
||||
$(INSTALL_CONF) $(CURDIR)/files/xray.conf $(1)/etc/config/xray
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(CURDIR)/files/xray.init $(1)/etc/init.d/xray
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/capabilities/
|
||||
$(INSTALL_DATA) $(CURDIR)/files/xray.capabilities $(1)/etc/capabilities/xray.json
|
||||
endef
|
||||
|
||||
define Package/xray-example/install
|
||||
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"ambient": [
|
||||
"CAP_NET_ADMIN",
|
||||
"CAP_NET_BIND_SERVICE"
|
||||
],
|
||||
"bounding": [
|
||||
"CAP_NET_ADMIN",
|
||||
"CAP_NET_BIND_SERVICE"
|
||||
]
|
||||
}
|
@ -5,7 +5,6 @@ START=99
|
||||
|
||||
CONF="xray"
|
||||
PROG="/usr/bin/xray"
|
||||
CAPA_FILE="/etc/capabilities/xray.json"
|
||||
|
||||
start_service() {
|
||||
config_load "$CONF"
|
||||
@ -44,12 +43,6 @@ start_service() {
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
|
||||
[ -x "/sbin/ujail" -a -e "$CAPA_FILE" ] && {
|
||||
procd_add_jail "$CONF"
|
||||
procd_set_param capabilities "$CAPA_FILE"
|
||||
procd_set_param user nobody
|
||||
procd_set_param no_new_privs 1
|
||||
}
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user