# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup golang 1.0 go.setup github.com/XTLS/Xray-core 1.8.13 v revision 0 name xray categories net security homepage https://xtls.github.io/ maintainers {i0ntempest @i0ntempest} openmaintainer license MPL-2 description Platform for building proxies to bypass network restrictions long_description Project X originates from XTLS protocol, provides a set of network tools such as Xray-core. \ Xray-core is a superset of v2ray-core, with various improvements such as XTLS, and is mostly \ compatible with v2ray-core. checksums rmd160 2ca06bab0f572cc53e43c91a531a259cfefb3f34 \ sha256 155ed372f7604bb4f6ec2fb52a09fa22f0a97d582a49ed754c82731576c92db4 \ size 631059 go.offline_build no # Since v1.8.6, building requires dependencies from a domain not supported by go PG: git.zx2c4.com depends_build-append \ port:wget build.args -o ./xray build.post_args -ldflags '-s -w -buildid=' build.dir ${worksrcpath}/main destroot { xinstall -m 0755 ${worksrcpath}/main/xray ${destroot}${prefix}/bin/ xinstall -d ${destroot}${prefix}/etc/xray # borrow v2ray example config system -W ${destroot}${prefix}/etc/xray "wget https://raw.githubusercontent.com/v2fly/v2ray-core/v4.44.0/release/config/config.json" } post-destroot { file rename ${destroot}${prefix}/etc/xray/config.json ${destroot}${prefix}/etc/xray/config.json.example } post-activate { if {![file exists ${prefix}/etc/xray/config.json]} { file copy ${prefix}/etc/xray/config.json.example ${prefix}/etc/xray/config.json } } startupitem.create yes startupitem.executable ${prefix}/bin/xray run --config ${prefix}/etc/xray/config.json variant geoip description {Install geoip and geosite from Project V, enables routing rules. Also provided by v2ray port.} { conflicts v2ray post-destroot { system -W ${destroot}${prefix}/bin "wget https://github.com/v2fly/geoip/raw/release/geoip.dat" system -W ${destroot}${prefix}/bin "wget https://github.com/v2fly/domain-list-community/raw/release/dlc.dat -O geosite.dat" } } notes " The default configuration file is copied to ${prefix}/etc/xray/config.json.\ It is used by the startup item (service). You should edit or replace it. "