Skip to content

Commit

Permalink
v2ray-geodata: add package v2ray-geosite-ir
Browse files Browse the repository at this point in the history
"Iran Hosted Domains" is a comprehensive list of Iranian domains and services that are hosted within the country.

Signed-off-by: Kaveh Dadgar <[email protected]>
(cherry picked from commit b1fc375)
  • Loading branch information
izhdahawrt authored and 1715173329 committed Oct 11, 2023
1 parent 277c4cb commit 0da9f62
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions net/v2ray-geodata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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),)
Expand All @@ -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
Expand All @@ -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))

0 comments on commit 0da9f62

Please sign in to comment.