Skip to content

Commit

Permalink
build under go 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzok8 committed Sep 2, 2021
1 parent f9259a6 commit 83ca634
Show file tree
Hide file tree
Showing 8 changed files with 376 additions and 340 deletions.
66 changes: 11 additions & 55 deletions xray-core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=xray-core
PKG_VERSION:=1.4.2
PKG_RELEASE:=$(AUTORELEASE)
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/xray-core/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=565255d8c67b254f403d498b9152fa7bc097d649c50cb318d278c2be644e92cc

#PKG_SOURCE_PROTO:=git
#PKG_SOURCE_URL:=https://github.com/XTLS/xray-core.git
#PKG_MIRROR_HASH:=19f3017d8279acc28d242d18689b95a39ca00a286e72329552d114f04a861ecb
#PKG_SOURCE_VERSION:=c345d4818efa763b07961d6c132afe1cf91845de
#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

PKG_MAINTAINER:=Tianling Shen <[email protected]>
PKG_LICENSE:=MPL-2.0
PKG_LICENSE_FILES:=LICENSE
Expand Down Expand Up @@ -49,35 +43,21 @@ define Package/xray-core
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
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
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

define Package/xray-core/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)

Expand All @@ -98,30 +78,24 @@ config XRAY_CORE_COMPRESS_UPX
endmenu
endef

define Package/xray-core/conffiles
/etc/xray/
/etc/config/xray
/usr/share/xray
endef

GEOIP_VER:=202103302203
GEOIP_VER:=202106030115
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)

define Download/geoip
URL:=https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/$(GEOIP_VER)/
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
URL_FILE:=geoip.dat
FILE:=$(GEOIP_FILE)
HASH:=969043ce2f307f79a617a2d82daa1dcfdba4ad72fefb7e4b70233ad45d221946
HASH:=acf231d7c6461d088ae479fe0c1cb143b5ee3cf7048a897c5a9b7807ab7005df
endef

GEOSITE_VER:=202103302203
GEOSITE_FILE:=geosite.dat.$(GEOSITE_VER)
GEOSITE_VER:=20210531212831
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)

define Download/geosite
URL:=https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/$(GEOSITE_VER)/
URL_FILE:=geosite.dat
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat
FILE:=$(GEOSITE_FILE)
HASH:=9fba42672073b3d21e9e2e514b26f4a12d08319718ab878a8eda6f6b375a1485
HASH:=332bbe53af49582dbf89bda04ee5e60e474f9293fc368ab55b517fdcd4a78ed2
endef

ifneq ($(CONFIG_XRAY_CORE_COMPRESS_GOPROXY),)
Expand All @@ -148,23 +122,6 @@ define Package/xray-core/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/xray

$(INSTALL_DIR) $(1)/etc/xray/
$(INSTALL_DATA) $(CURDIR)/files/config.json.example $(1)/etc/xray/

$(INSTALL_DIR) $(1)/etc/config/
$(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
$(INSTALL_DIR) $(1)/etc/xray/
$(INSTALL_DATA) $(CURDIR)/files/vpoint_socks_vmess.json $(1)/etc/xray/
$(INSTALL_DATA) $(CURDIR)/files/vpoint_vmess_freedom.json $(1)/etc/xray/
endef

define Package/xray-geodata/install
Expand All @@ -174,5 +131,4 @@ define Package/xray-geodata/install
endef

$(eval $(call BuildPackage,xray-core))
$(eval $(call BuildPackage,xray-example))
$(eval $(call BuildPackage,xray-geodata))
144 changes: 0 additions & 144 deletions xray-core/files/config.json.example

This file was deleted.

25 changes: 0 additions & 25 deletions xray-core/files/vpoint_socks_vmess.json

This file was deleted.

32 changes: 0 additions & 32 deletions xray-core/files/vpoint_vmess_freedom.json

This file was deleted.

10 changes: 0 additions & 10 deletions xray-core/files/xray.capabilities

This file was deleted.

11 changes: 0 additions & 11 deletions xray-core/files/xray.conf

This file was deleted.

Loading

0 comments on commit 83ca634

Please sign in to comment.