PROVIDES:=v2ray-core
endef
+define Package/xray-example
+ $(call Package/xray/template)
+ TITLE+= (example configs)
+ DEPENDS:=xray-core
+ PKGARCH:=all
+endef
+
define Package/xray-geodata
$(call Package/xray/template)
TITLE+= (geodata files)
DEPENDS:=xray-core
+ PKGARCH:=all
endef
define Package/xray/description
$(call Package/xray/description)
endef
+define Package/xray-example/description
+ $(call Package/xray/description)
+
+ This includes example configuration files for xray-core.
+endef
+
define Package/xray-geodata/description
$(call Package/xray/description)
$(LN) xray $(1)/usr/bin/v2ray
endef
+define Package/xray-example/install
+ $(INSTALL_DIR) $(1)/etc/xray/
+ $(INSTALL_CONF) $(CURDIR)/files/vpoint_socks_vmess.json $(1)/etc/xray/
+ $(INSTALL_CONF) $(CURDIR)/files/vpoint_vmess_freedom.json $(1)/etc/xray/
+endef
+
define Package/xray-geodata/install
$(INSTALL_DIR) $(1)/usr/share/xray/
$(INSTALL_DATA) $(DL_DIR)/$(GEOIP_FILE) $(1)/usr/share/xray/geoip.dat
endef
$(eval $(call BuildPackage,xray-core))
+$(eval $(call BuildPackage,xray-example))
$(eval $(call BuildPackage,xray-geodata))
--- /dev/null
+{
+ "inbounds": [{
+ "port": 10086,
+ "protocol": "vmess",
+ "settings": {
+ "clients": [
+ {
+ "id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
+ "level": 1,
+ "alterId": 64
+ }
+ ]
+ }
+ }],
+ "outbounds": [{
+ "protocol": "freedom",
+ "settings": {}
+ },{
+ "protocol": "blackhole",
+ "settings": {},
+ "tag": "blocked"
+ }],
+ "routing": {
+ "rules": [
+ {
+ "type": "field",
+ "ip": ["geoip:private"],
+ "outboundTag": "blocked"
+ }
+ ]
+ }
+}