mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 03:43:29 +00:00
Add V2Ray configuration in menuconfig.
只选择v2ray主程序的话压缩后占用体积将可以降到4M以下。 另外测试了裁剪后的v2ray,发现如果只裁掉如ss等协议的话减重效果并不好。。 裁掉tls+wss或是kcp倒是能省下一部分空间,但就没什么意思了。。所以还是上软路由吧(
This commit is contained in:
parent
a734742e20
commit
bd31b9e86b
@ -45,11 +45,38 @@ define Package/$(PKG_NAME)
|
||||
URL:=https://github.com/v2ray/v2ray-core
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
menu "V2Ray Configuration"
|
||||
depends on PACKAGE_v2ray
|
||||
|
||||
config PACKAGE_V2RAY_INCLUDE_V2RAY
|
||||
bool "Include v2ray"
|
||||
default y
|
||||
|
||||
config PACKAGE_V2RAY_INCLUDE_V2CTL
|
||||
bool "Include v2ctl"
|
||||
depends on PACKAGE_V2RAY_INCLUDE_V2RAY
|
||||
default y
|
||||
|
||||
config PACKAGE_V2RAY_INCLUDE_GEOIP
|
||||
bool "Include geoip.dat"
|
||||
depends on PACKAGE_V2RAY_INCLUDE_V2CTL
|
||||
default n
|
||||
|
||||
config PACKAGE_V2RAY_INCLUDE_GEOSITE
|
||||
bool "Include geosite.dat"
|
||||
depends on PACKAGE_V2RAY_INCLUDE_V2CTL
|
||||
default n
|
||||
|
||||
endmenu
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
V2Ray is a cross-platform proxy software
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
|
||||
wget https://github.com/v2ray/v2ray-core/releases/download/$(PKG_VERSION)/v2ray-$(PKG_ARCH_V2RAY).zip -O $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY).zip
|
||||
unzip -o $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY).zip -d $(PKG_BUILD_DIR)
|
||||
endef
|
||||
@ -62,8 +89,18 @@ endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/v2ray
|
||||
ifdef CONFIG_PACKAGE_V2RAY_INCLUDE_V2RAY
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY)/v2ray $(1)/usr/bin/v2ray/
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_V2RAY_INCLUDE_V2CTL
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY)/v2ctl $(1)/usr/bin/v2ray/
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_V2RAY_INCLUDE_GEOIP
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY)/geoip.dat $(1)/usr/bin/v2ray/
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_V2RAY_INCLUDE_GEOSITE
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY)/geosite.dat $(1)/usr/bin/v2ray/
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
Loading…
Reference in New Issue
Block a user