1 # SPDX-License-Identifier: GPL-3.0-only
3 # Copyright (C) 2021 ImmortalWrt.org
5 include $(TOPDIR)/rules.mk
9 PKG_RELEASE:=$(AUTORELEASE)
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
13 PKG_HASH:=54c6a687dd463b25afe8d8eb44d37e18b8177f58308207cd1d74f6cd04619854
15 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
17 PKG_LICENSE_FILES:=LICENSE
19 PKG_BUILD_DEPENDS:=golang/host
23 GO_PKG:=github.com/xtls/xray-core
24 GO_PKG_BUILD_PKG:=github.com/xtls/xray-core/main
26 $(GO_PKG)/core.build=OpenWrt \
27 $(GO_PKG)/core.version=$(PKG_VERSION)
29 include $(INCLUDE_DIR)/package.mk
30 include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
32 define Package/xray-core
33 TITLE:=A platform for building proxies to bypass network restrictions
36 URL:=https://xtls.github.io
37 DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
40 define Package/xray-core/description
41 Xray, Penetrates Everything. It helps you to build your own computer network.
42 It secures your network connections and thus protects your privacy.
45 define Package/xray-core/install
46 $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
47 $(INSTALL_DIR) $(1)/usr/bin/
48 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/xray
51 $(eval $(call BuildPackage,xray-core))