From 0da9f622975aa1e4efe452da4acbae15479bee63 Mon Sep 17 00:00:00 2001 From: Kaveh Dadgar Date: Sat, 7 Oct 2023 21:44:02 +0200 Subject: [PATCH] v2ray-geodata: add package v2ray-geosite-ir "Iran Hosted Domains" is a comprehensive list of Iranian domains and services that are hosted within the country. Signed-off-by: Kaveh Dadgar (cherry picked from commit b1fc3754b3969edc9dca2f1fd5129edbd0a76517) --- net/v2ray-geodata/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/net/v2ray-geodata/Makefile b/net/v2ray-geodata/Makefile index 9cc4d32654..1ce0b2e732 100644 --- a/net/v2ray-geodata/Makefile +++ b/net/v2ray-geodata/Makefile @@ -30,6 +30,15 @@ define Download/geosite HASH:=d393deda756a446ec5247730ef09fed80ba9fb8d9204d1263c45a3604435fe57 endef +GEOSITE_IRAN_VER:=202309250024 +GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER) +define Download/geosite-ir + URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/ + URL_FILE:=iran.dat + FILE:=$(GEOSITE_IRAN_FILE) + HASH:=1eccf6e1514ceb338a91da0c938d62a0e0c1e1aee12f8d479fafcdadace5625a +endef + define Package/v2ray-geodata/template SECTION:=net CATEGORY:=Network @@ -54,6 +63,14 @@ define Package/v2ray-geosite LICENSE:=MIT endef +define Package/v2ray-geosite-ir + $(call Package/v2ray-geodata/template) + TITLE:=Iran Geosite List for V2Ray + PROVIDES:=xray-geosite-ir + VERSION:=$(GEOSITE_IRAN_VER)-$(PKG_RELEASE) + LICENSE:=MIT +endef + define Build/Prepare $(call Build/Prepare/Default) ifneq ($(CONFIG_PACKAGE_v2ray-geoip),) @@ -62,6 +79,9 @@ endif ifneq ($(CONFIG_PACKAGE_v2ray-geosite),) $(call Download,geosite) endif +ifneq ($(CONFIG_PACKAGE_v2ray-geosite-ir),) + $(call Download,geosite-ir) +endif endef define Build/Compile @@ -79,5 +99,12 @@ define Package/v2ray-geosite/install $(LN) ../v2ray/geosite.dat $(1)/usr/share/xray/geosite.dat endef +define Package/v2ray-geosite-ir/install + $(INSTALL_DIR) $(1)/usr/share/v2ray $(1)/usr/share/xray + $(INSTALL_DATA) $(DL_DIR)/$(GEOSITE_IRAN_FILE) $(1)/usr/share/v2ray/iran.dat + $(LN) ../v2ray/iran.dat $(1)/usr/share/xray/iran.dat +endef + $(eval $(call BuildPackage,v2ray-geoip)) $(eval $(call BuildPackage,v2ray-geosite)) +$(eval $(call BuildPackage,v2ray-geosite-ir))