Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
6d1695a
Some refines related to direct/freedom and `targetStrategy`; More int…
patterniha Aug 19, 2025
87b643a
Bump google.golang.org/grpc from 1.74.2 to 1.75.0 (#5039)
dependabot[bot] Aug 20, 2025
33272a0
Bump google.golang.org/protobuf from 1.36.7 to 1.36.8 (#5042)
dependabot[bot] Aug 21, 2025
b65da77
Bump github.com/stretchr/testify from 1.10.0 to 1.11.0 (#5061)
dependabot[bot] Aug 25, 2025
11f0513
Commands: Add `-outpbfile` for `convert pb` (#5048)
KobeArthurScofield Aug 27, 2025
2ee372e
common/signal/timer.go: Refator to use sync.Once (#5052)
Fangliding Aug 27, 2025
5fa5f3f
WireGuard outbound: Fix close closed (#5054)
Fangliding Aug 27, 2025
ef640ed
checkSystemNetwork(): Use c.root-servers.net (#5059)
xqzr Aug 27, 2025
c2141f0
Test_parseResponse(t *testing.T): Use dns.google for IPv6 (#5060)
xqzr Aug 27, 2025
7951a5c
VLESS protocol: Add lightweight, Post-Quantum ML-KEM-768-based PFS 1-…
RPRX Aug 28, 2025
702d2c0
README.md: Update Donation & NFTs
RPRX Aug 28, 2025
12b077f
Update github.com/xtls/reality to 20250828044527
RPRX Aug 28, 2025
fcdd4df
Bump github.com/stretchr/testify from 1.11.0 to 1.11.1 (#5068)
dependabot[bot] Aug 28, 2025
4976085
Socks/HTTP inbound: Fix unexpected rawConn copy (#5041)
Fangliding Aug 28, 2025
56a45ad
First step of upcoming refactor for Xray-core: Add TimeoutWrapperRead…
RPRX Aug 29, 2025
82ea7a3
VLESS Encryption: Re-add automatically ChaCha20-Poly1305
RPRX Aug 29, 2025
593eded
Trojan-UoT & UDP-nameserver: Fix forgotten release buffer; UDP dispat…
patterniha Aug 29, 2025
ea1a3ae
Trojan UoT: Fix memory/goroutine leak (#5064)
patterniha Aug 29, 2025
81b7cd7
v25.8.29
RPRX Aug 29, 2025
79325ea
common/buf/buffer.go: Replace copy zero with clear() (#5071)
Fangliding Aug 30, 2025
a31842f
Commands/run: Try all suffixes for default config
RPRX Aug 30, 2025
fbb0ecf
Chore: Fix tests
RPRX Aug 30, 2025
e8b02cd
VLESS Encryption: Add customizable 1-RTT padding parameters; Decrease…
RPRX Aug 31, 2025
6768a22
VLESS Encryption: Switch to "probability-from-to" format for customiz…
RPRX Aug 31, 2025
6830089
v25.8.31
RPRX Aug 31, 2025
fd54b10
TimeoutWrapperReader: Fix latency issue
RPRX Sep 1, 2025
4c6fd94
VLESS Encryption: Server checks one specific zero-bit in the peer-sen…
RPRX Sep 1, 2025
2acd206
Direct/Freedom outbound: Use proxy.IsRAWTransport(conn) (#5074)
yuhan6665 Sep 1, 2025
4064f8d
XTLS Vision: Refactor code to use DispatchLink() in VLESS inbound (#5…
yuhan6665 Sep 1, 2025
e943de5
proxy/proxy.go: IsRAWTransport() -> IsRAWTransportWithoutSecurity()
RPRX Sep 2, 2025
19f8907
VLESS Encryption: Randomize seconds in ticket and simplify expiration…
RPRX Sep 2, 2025
d20397c
DispatchLink(): Fix user stats
RPRX Sep 3, 2025
cbade89
VLESS Encryption: Improve server-side tickets' expiration mechanism
RPRX Sep 4, 2025
8b579bf
Commands: Add `vlessenc` (generate complete json pair directly) (#5078)
Fangliding Sep 4, 2025
197b319
DNS outbound: Fix some issues (#5081)
patterniha Sep 4, 2025
118131f
v25.9.5
RPRX Sep 5, 2025
6ec0291
app/reverse/bridge.go: Fix DispatchLink() returns immediately
RPRX Sep 5, 2025
4b0ee28
app/reverse/portal.go: Fix HandleConnection() returns immediately (fr…
RPRX Sep 7, 2025
4740ba2
app/reverse/portal.go: Fix goroutine leak & Add EndpointOverride (#5100)
patterniha Sep 7, 2025
ab1fa13
Commands: Fix "with SNI" printing fixed port 443 for `tls ping` (#5099)
AndyChiang888 Sep 7, 2025
2b82366
mKCP: Fix key derivation for obfuscation (#5106)
Fangliding Sep 8, 2025
a0c63ba
VMess: Returns clearer error in AuthIDDecoderHolder (#5090)
Fangliding Sep 8, 2025
845010b
VLESS protocol: Add Reverse Proxy (4) Command and extremely simple co…
RPRX Sep 9, 2025
1e2f251
Bump golang.org/x/crypto from 0.41.0 to 0.42.0 (#5113)
dependabot[bot] Sep 9, 2025
8276a44
Bump actions/github-script from 7 to 8 (#5086)
dependabot[bot] Sep 9, 2025
ae44b86
Bump actions/setup-go from 5 to 6 (#5087)
dependabot[bot] Sep 9, 2025
1f4fc2e
README.md: Add X-Panel to Web Panels (#5094)
xeefei Sep 9, 2025
4ae4971
Update github.com/xtls/reality to 20250904214705
RPRX Sep 10, 2025
a387ae9
Bump golang.org/x/net from 0.43.0 to 0.44.0 (#5116)
dependabot[bot] Sep 10, 2025
11f670c
Bump google.golang.org/protobuf from 1.36.8 to 1.36.9 (#5115)
dependabot[bot] Sep 10, 2025
ce5c51d
TPROXY: Prevent TCP loopback (#5114)
Fangliding Sep 10, 2025
9f5dcb1
MUX: Prevent goroutine leak (#5110)
patterniha Sep 10, 2025
cced147
v25.9.10
RPRX Sep 10, 2025
30e10be
Fix https://github.com/XTLS/Xray-core/pull/5114#issuecomment-32730171…
Fangliding Sep 10, 2025
d3248a4
app/reverse/bridge.go: Add timer nil check (#5119)
patterniha Sep 10, 2025
3edfb0e
v25.9.11
RPRX Sep 10, 2025
5148c57
app/dispatcher/default.go: Add comment on run-time rejecting non-exis…
RPRX Sep 10, 2025
3167e5c
app/dispatcher/default.go: Close link when routedDispatch() failed (#…
patterniha Sep 11, 2025
1a48453
Bump google.golang.org/grpc from 1.75.0 to 1.75.1 (#5129)
dependabot[bot] Sep 11, 2025
83c5370
Config: Outbound proxy config no need to be nested (#5124)
KobeArthurScofield Sep 11, 2025
fe57507
Outbound: One endpoint and at most one user only (#5144)
KobeArthurScofield Sep 15, 2025
a6ebb30
Bump google.golang.org/protobuf from 1.36.9 to 1.36.10 (#5203)
dependabot[bot] Oct 5, 2025
d0344bc
Bump github.com/quic-go/quic-go from 0.54.0 to 0.54.1 (#5180)
dependabot[bot] Oct 5, 2025
c0c88f3
Fix vless reverse panic in vision (#5189)
Fangliding Oct 5, 2025
2f366ae
feat(config): add unix socket HTTP config loader support (#5200)
kastov Oct 5, 2025
514c9e5
Bump github.com/quic-go/quic-go from 0.54.1 to 0.55.0 (#5208)
dependabot[bot] Oct 6, 2025
4a825c0
fix: darwin arm64 always has AESGCMHardwareSupport (#5176)
wwqgtxx Oct 6, 2025
1952488
Fix shadowsocks2022 memory leak (#5166)
Fangliding Oct 6, 2025
1762d6c
Bump github.com/refraction-networking/utls from 1.8.0 to 1.8.1 (#5229)
dependabot[bot] Oct 14, 2025
40f0a54
transport/internet/reality/reality.go: Safely get negotiated CurveID …
RPRX Oct 14, 2025
8dd0e38
Bump google.golang.org/grpc from 1.75.1 to 1.76.0 (#5212)
dependabot[bot] Oct 14, 2025
898db92
Bump golang.org/x/net from 0.44.0 to 0.46.0 (#5215)
dependabot[bot] Oct 14, 2025
dcfde8d
Update github.com/xtls/reality to 20251014195629
RPRX Oct 14, 2025
7f436f5
README.md: Add PasarGuard to Web Panels (#5224)
M03ED Oct 14, 2025
21a9658
Router: Use built-in-dns only once for all rules (in "IPOnDemand"/"IP…
patterniha Oct 14, 2025
9cc7907
XHTTP client: Change default `maxConcurrency` to 1 for speed testing
RPRX Oct 14, 2025
12f4a01
VLESS Reverse Proxy: Transfer real Source & Local (IP & port), enable…
RPRX Oct 15, 2025
b69a376
v25.10.15
RPRX Oct 15, 2025
cb4f943
Bump actions/upload-artifact from 4 to 5 (#5259)
dependabot[bot] Nov 1, 2025
9491b67
Bump github.com/quic-go/quic-go from 0.55.0 to 0.56.0 (#5292)
dependabot[bot] Nov 15, 2025
412bc17
Bump google.golang.org/grpc from 1.76.0 to 1.77.0 (#5308)
dependabot[bot] Nov 19, 2025
1a32d18
REALITY config: Return error when short id is too long (#5276)
RPRX Nov 19, 2025
18a4104
Fix wireguard not discarding broken connection on android (#5304)
Exclude0122 Nov 15, 2025
4e8ee30
README.md: Add Remnawave & Happ to Sponsors
RPRX Nov 19, 2025
8a4b0a9
README.md: Add TRX & TON & BTC & XMR & SOL to Donation & NFTs
RPRX Nov 19, 2025
1ec2966
Bump golang.org/x/net (#5318)
dependabot[bot] Nov 20, 2025
2f1fabb
README.md: Add v2rayN to macOS & Linux Clients (#5271)
alen420 Nov 20, 2025
b16a5f0
Socks: Fix buffer full panic when encoding large UDP packets (#5252)
Nov 20, 2025
b24ef88
Docker: Use more aggressive inlining for higher efficiency (#5242)
Meo597 Nov 20, 2025
f9dd3ae
Refactor WrapLink logic (#5288)
Fangliding Nov 20, 2025
acfda31
Bump actions/checkout from 5 to 6 (#5324)
dependabot[bot] Nov 21, 2025
e914183
HTTP outbound: Read negotiated protocol from uTLS (#5251)
hax0r31337 Nov 21, 2025
27ad487
DNS: Fix wrong protocol parse (#5232)
vanserox Nov 21, 2025
b40bf56
refactor(dns): enhance cache safety, optimize performance, and refact…
Meo597 Nov 21, 2025
fcfb0a3
perf(GeoIPMatcher): faster heuristic matching with reduced memory usa…
Meo597 Nov 21, 2025
2185a73
perf(router): adjust the order of rules to optimize performance (#5267)
Meo597 Nov 21, 2025
4956e65
perf(dns): cache network capability check (#5244)
Meo597 Nov 21, 2025
cd51f57
feat(dns): add optimistic caching (#5237)
Meo597 Nov 21, 2025
f14fd1c
feat(dns): add parallel query (#5239)
Meo597 Nov 21, 2025
d418401
Router: Remove the deprecated UseIP option (#5323)
Meo597 Nov 21, 2025
2969a18
Sockopt config: Add `trustedXForwardedFor` (for XHTTP, WS, HU inbound…
RPRX Nov 23, 2025
a83253f
VLESS Reverse Proxy: Forbid reverse-proxy UUID using forward-proxy, e…
RPRX Nov 23, 2025
d60ef65
Bump github.com/quic-go/quic-go from 0.56.0 to 0.57.0 (#5335)
dependabot[bot] Nov 24, 2025
9d3401b
Bump github.com/quic-go/quic-go from 0.57.0 to 0.57.1 (#5352)
dependabot[bot] Nov 27, 2025
ed5f7e7
fix(dns): inheritance issue with disableCache (#5351)
Meo597 Nov 27, 2025
c6afcd5
XTLS Vision: Check TLS record isComplete (#5179)
yuhan6665 Nov 30, 2025
cadcb47
XTLS Vision: Add `testpre` (outbound pre-connect) and `testseed` (out…
RPRX Dec 1, 2025
36cb0f0
v25.12.1
RPRX Dec 1, 2025
93312d2
XTLS Vision: Fix IsCompleteRecord() (#5365)
Fangliding Dec 2, 2025
c123f16
XTLS Vision: Discard expired pre-connect conn automatically
RPRX Dec 2, 2025
e403abe
v25.12.2
RPRX Dec 2, 2025
903214a
XTLS Vision: Fix enabled uplink splice flag by mistake (#5391)
yuhan6665 Dec 8, 2025
bd7503d
XTLS Vision: LogInfo() -> LogDebug()
RPRX Dec 8, 2025
aea1238
Chore: Remove ctlcmd and leftover envvar (#5392)
KobeArthurScofield Dec 8, 2025
81f8f39
v25.12.8
RPRX Dec 8, 2025
b451f89
Bump golang.org/x/net from 0.47.0 to 0.48.0 (#5397)
dependabot[bot] Dec 10, 2025
a610a4c
Chore: Remove all double gonet import (#5402)
Fangliding Dec 10, 2025
a903e80
Bump actions/cache from 4 to 5 (#5411)
dependabot[bot] Dec 12, 2025
9cf2211
Bump github.com/miekg/dns from 1.1.68 to 1.1.69 (#5410)
dependabot[bot] Dec 12, 2025
a3ba3ee
Wireguard: Decouple server endpoint DNS from address option (#5417)
Meo597 Dec 14, 2025
c40326d
Bump google.golang.org/protobuf from 1.36.10 to 1.36.11 (#5424)
dependabot[bot] Dec 15, 2025
74df63a
Bump actions/upload-artifact from 5 to 6 (#5425)
dependabot[bot] Dec 15, 2025
6bf0376
Bump github.com/quic-go/quic-go from 0.57.1 to 0.58.0 (#5459)
dependabot[bot] Dec 22, 2025
04b433d
Bump github.com/cloudflare/circl from 1.6.1 to 1.6.2 (#5465)
dependabot[bot] Dec 23, 2025
dd757ca
VLESS inbound: Print invalid UUID string (#5426)
xtlsee Dec 23, 2025
3572209
REALITY client: Clearer log when receiving real certificate (#5427)
ari-ahm Dec 23, 2025
a6792dd
TLS ECH: Increase DOH timeout (#5455)
patterniha Dec 23, 2025
fa64775
Tunnel/Dokodemo: Fix stats conn unwrap (#5440)
Fangliding Dec 23, 2025
7f6ceb3
DomainMatcher: Prevent illegal domain rules from causing core startup…
Meo597 Dec 23, 2025
3696890
Bump google.golang.org/grpc from 1.77.0 to 1.78.0 (#5469)
dependabot[bot] Dec 25, 2025
6738ecf
common/uuid: fix panic when parsing 32-len invalid UUID string. (#5468)
ari-ahm Dec 26, 2025
ad468e4
API: Add GetAllOnlineUsers RPC to StatsService for retrieving online …
mr1cloud Dec 26, 2025
5d94a62
Geofiles: Implement mmap in filesystem to reduce ram usage (#5480)
hossinasaadi Dec 31, 2025
a54e1f2
Remove redundant stats in mux and bridge dispatcher (#5466)
yuhan6665 Dec 31, 2025
e7c72c0
XHTTP server: Fix ScStreamUpServerSecs' non-default value (#5486)
fanymagnet Jan 5, 2026
7265b5a
Routing config: Add `processName` (#5489)
Fangliding Jan 5, 2026
b38a412
README.md: Re-add 3X-UI to Web Panels
RPRX Jan 5, 2026
c715154
Routing: Reduce peak memory usage (#5488)
hossinasaadi Jan 5, 2026
961c352
DNS: Fix parse domain and geoip (#5499)
hossinasaadi Jan 6, 2026
ced3e75
README.md: Add TX-UI to Web Panels (#4981)
Incognito-Coder Jan 6, 2026
d902585
transport/pipe/impl.go: Remove runtime.Gosched() in WriteMultiBuffer(…
Fangliding Jan 6, 2026
446df14
Routing config: Replace `processName` with `process` (full-name/abs-p…
Fangliding Jan 6, 2026
394e117
GitHub Actions: Add wintun.dll into Windows zips; Workflow refinement…
KobeArthurScofield Jan 7, 2026
39ba1f7
Proxy: Add TUN inbound for Windows & Linux, including Android (#5464)
Owersun Jan 7, 2026
36425d2
Tests: Improve geosite & geoip tests (#5502)
hossinasaadi Jan 8, 2026
0ca1345
TLS config: Add `pinnedPeerCertSha256`; Remove `pinnedPeerCertificate…
Fangliding Jan 9, 2026
07a0daf
DNS: Check err for UDP dns.PackMessage(req.msg) (#5512)
Fangliding Jan 9, 2026
14e171a
TUN inbound: Implement UDP FullCone NAT (#5509)
Copilot Jan 11, 2026
0c09f43
TUN inbound: Fix log, CanSpliceCopy, tag, sniffing, and port config i…
Copilot Jan 12, 2026
7726fbe
TUN inbound: Make udp_fullcone pure side effect free udp connection (…
Owersun Jan 12, 2026
e742e84
Upgrade gVisor to latest version v0.0.0-20260109181451-4be7c433dae2 (…
Owersun Jan 12, 2026
de6be7c
Bump golang.org/x/net from 0.48.0 to 0.49.0 (#5530)
dependabot[bot] Jan 13, 2026
8a9dbd4
Bump github.com/miekg/dns from 1.1.69 to 1.1.70 (#5528)
dependabot[bot] Jan 13, 2026
92ada2d
Proxy: Add Hysteria outbound & transport (version 2, udphop) and Sala…
LjhAUMEM Jan 13, 2026
ef2a967
TUN inbound: Close connection when handling is done (#5531)
Owersun Jan 13, 2026
4bdf6e5
TLS client: Verify leaf cert (name, time) when pinning self-signed CA…
Fangliding Jan 13, 2026
9a121a4
v26.1.13
RPRX Jan 13, 2026
0443de7
Bump github.com/refraction-networking/utls from 1.8.1 to 1.8.2 (#5535)
dependabot[bot] Jan 14, 2026
649e989
Hysteria: Fix transport's "udphop without salamander" dialing issue; …
LjhAUMEM Jan 14, 2026
a384be0
SS2022 outbound: Fix UDP leak (#5544)
Fangliding Jan 14, 2026
7c41848
README.md: Add Happ RU to iOS & macOS Clients (#5551)
mangustyura Jan 16, 2026
d75b33a
Commands: "xray run -dump" supports reading JSON from STDIN (#5550)
vrnobody Jan 16, 2026
760223a
TLS client: Skip TLS' built-in verification when using `pinnedPeerCer…
RPRX Jan 16, 2026
09f619d
TLS client: Add pin_test.go for leaf and CA (#5553)
Fangliding Jan 17, 2026
5f74741
Geofiles: Revert related changes for now, waiting for better changes …
Fangliding Jan 17, 2026
cfc78b3
Hysteria transport: Add `congestion` config (""/"reno"/"bbr"/"brutal"…
LjhAUMEM Jan 17, 2026
6d6c045
TUN inbound: Add macOS support (#5559)
osypai Jan 18, 2026
5836f36
Config: Add Warning for deprecated features (allowInsecure, Shadowsoc…
RPRX Jan 18, 2026
a6aca10
Hysteria outbound: Fix ContextWithRequireDatagram() (#5558)
LjhAUMEM Jan 18, 2026
1cf5662
Create SECURITY.md
RPRX Jan 18, 2026
7ff06f6
v26.1.18
RPRX Jan 18, 2026
6662894
Bump github.com/pires/go-proxyproto from 0.8.1 to 0.9.0 (#5582)
dependabot[bot] Jan 21, 2026
e813a37
TUN inbound: Cancel ctx when handling is done (#5565)
patterniha Jan 21, 2026
a778d3d
Tests: Reduce RAM usage (#5577)
Fangliding Jan 21, 2026
30d6a52
README.md: Update links for PassWall & PassWall 2 (#5572)
gamekiller0010 Jan 21, 2026
777e313
Router: Fix panic in ProcessNameMatcher when source IPs are empty (#5…
Fangliding Jan 21, 2026
2627705
README.md: Add fancyss to Asuswrt-Merlin Clients
RPRX Jan 22, 2026
2d2102f
Hysteria transport: Fix speedtest issue (#5587)
LjhAUMEM Jan 22, 2026
48164c8
Bump github.com/cloudflare/circl from 1.6.2 to 1.6.3 (#5589)
dependabot[bot] Jan 23, 2026
e0ee235
Bump github.com/miekg/dns from 1.1.70 to 1.1.72 (#5590)
dependabot[bot] Jan 23, 2026
5846f94
Log config: More flexible `maskAddress` (#5570)
Fangliding Jan 23, 2026
59dc2ce
API: Add ListRule() for routing (#5569)
IAMouMeng Jan 23, 2026
cd8aab9
common/errors/feature_errors.go: Add PrintNonRemovalDeprecatedFeature…
KobeArthurScofield Jan 23, 2026
0a42dba
v26.1.23
RPRX Jan 23, 2026
445c0d4
TUN inbound: Disable RACK/TLP recovery to fix connection stalls (#5600)
KiGamji Jan 24, 2026
daf9cba
XUDP client: Initialize Global ID's BaseKey correctly (#5602)
Fangliding Jan 24, 2026
5173e5c
TUN inbound: Enhance Darwin interface support (#5598)
Owersun Jan 25, 2026
f1aee0b
Hysteria transport: Support range & random for `interval` in `udphop`…
LjhAUMEM Jan 25, 2026
1951a27
Bump github.com/pires/go-proxyproto from 0.9.0 to 0.9.1 (#5608)
dependabot[bot] Jan 26, 2026
9a04eec
Geodat: Reduce peak memory usage (#5581)
Meo597 Jan 26, 2026
c3af657
TUN inbound: Add iOS support (#5612)
evozi-team Jan 26, 2026
077070d
Bump github.com/pires/go-proxyproto from 0.9.1 to 0.9.2 (#5614)
dependabot[bot] Jan 27, 2026
f6a7e93
VMess inbound: Optimize replay filter (#5562)
Fangliding Jan 27, 2026
19186ed
README.md: Add Egern & Quantumult X to Others (#5624)
nasaboy Jan 30, 2026
9c46a2d
Upgrade gVisor to latest version v0.0.0-20260122175437-89a5d21be8f0
RPRX Jan 30, 2026
2c92339
TLS config: `allowInsecure`->`pinnedPeerCertSha256`; `verifyPeerCertI…
RPRX Jan 30, 2026
afcfdbc
Commands: Print leaf cert's SHA256 in `tls ping` (#5628)
Fangliding Jan 31, 2026
61e1153
MPH domian matcher: Support building & using cache directly (instead …
hossinasaadi Jan 31, 2026
5b849d5
XHTTP transport: New options for bypassing CDN's detection (#5414)
paqx Jan 31, 2026
c180c59
Finalmask: Add XDNS (relies mKCP, like DNSTT), header-*, mkcp-* (#5560)
LjhAUMEM Jan 31, 2026
20cf00c
v26.1.31
RPRX Jan 31, 2026
a6ec3b6
XHTTP transport: Fix "auto" mode with REALITY (#5638)
paqx Feb 2, 2026
25d1691
Finalmask: Add XICMP (relies mKCP/QUIC or WireGuard) (#5633)
LjhAUMEM Feb 2, 2026
af2f048
v26.2.2
RPRX Feb 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /src
COPY . .
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags "-s -w -buildid=" ./main

# Download geodat into a staging directory
ADD https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat /tmp/geodat/geoip.dat
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile.usa
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /src
COPY . .
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags "-s -w -buildid=" ./main

# Download geodat into a staging directory
ADD https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat /tmp/geodat/geoip.dat
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
echo "LATEST=$LATEST" >>${GITHUB_ENV}

- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
68 changes: 50 additions & 18 deletions .github/workflows/release-win7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Restore Geodat Cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: resources
key: xray-geodat-

- name: Restore Wintun Cache
uses: actions/cache/restore@v5
with:
path: resources
key: xray-wintun-

- name: Check Assets Existence
id: check-assets
run: |
Expand All @@ -34,6 +40,18 @@ jobs:
break
fi
done
LIST=('amd64' 'x86')
for ARCHITECTURE in "${LIST[@]}"
do
echo -e "Checking wintun.dll for ${ARCHITECTURE}..."
if [ -s "./resources/wintun/bin/${ARCHITECTURE}/wintun.dll" ]; then
echo -e "wintun.dll for ${ARCHITECTURE} exists."
else
echo -e "wintun.dll for ${ARCHITECTURE} is missing."
echo "missing=true" >> $GITHUB_OUTPUT
break
fi
done

- name: Sleep for 90 seconds if Assets Missing
if: steps.check-assets.outputs.missing == 'true'
Expand Down Expand Up @@ -63,7 +81,7 @@ jobs:
CGO_ENABLED: 0
steps:
- name: Checkout codebase
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Show workflow information
run: |
Expand All @@ -72,7 +90,7 @@ jobs:
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
Expand All @@ -95,20 +113,38 @@ jobs:
COMMID=$(git describe --always --dirty)
echo 'Building Xray for Windows 7...'
go build -o build_assets/xray.exe -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main
echo 'CreateObject("Wscript.Shell").Run "xray.exe -config config.json",0' > build_assets/xray_no_window.vbs
echo 'Start-Process -FilePath ".\xray.exe" -ArgumentList "-config .\config.json" -WindowStyle Hidden' > build_assets/xray_no_window.ps1
# The line below is for without running conhost.exe version. Commented for not being used. Provided for reference.
# go build -o build_assets/wxray.exe -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-H windowsgui -X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main

- name: Restore Geodat Cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: resources
key: xray-geodat-

- name: Restore Wintun Cache
uses: actions/cache/restore@v5
with:
path: resources
key: xray-wintun-

- name: Add additional assets into package
run: |
mv -f resources/geo* build_assets/
if [[ ${GOOS} == 'windows' ]]; then
echo 'CreateObject("Wscript.Shell").Run "xray.exe -config config.json",0' > build_assets/xray_no_window.vbs
echo 'Start-Process -FilePath ".\xray.exe" -ArgumentList "-config .\config.json" -WindowStyle Hidden' > build_assets/xray_no_window.ps1
if [[ ${GOARCH} == 'amd64' ]]; then
mv resources/wintun/bin/amd64/wintun.dll build_assets/
fi
if [[ ${GOARCH} == '386' ]]; then
mv resources/wintun/bin/x86/wintun.dll build_assets/
fi
mv resources/wintun/LICENSE.txt build_assets/LICENSE-wintun.txt
fi

- name: Copy README.md & LICENSE
run: |
mv -f resources/* build_assets
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE

Expand All @@ -127,17 +163,6 @@ jobs:
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
done

- name: Change the name
run: |
mv build_assets Xray-${{ env.ASSET_NAME }}

- name: Upload files to Artifacts
uses: actions/upload-artifact@v4
with:
name: Xray-${{ env.ASSET_NAME }}
path: |
./Xray-${{ env.ASSET_NAME }}/*

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'release'
Expand All @@ -146,3 +171,10 @@ jobs:
file: ./Xray-${{ env.ASSET_NAME }}.zip*
tag: ${{ github.ref }}
file_glob: true

- name: Upload files to Artifacts
uses: actions/upload-artifact@v6
with:
name: Xray-${{ env.ASSET_NAME }}
path: |
./build_assets/*
77 changes: 58 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Restore Geodat Cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: resources
key: xray-geodat-

- name: Restore Wintun Cache
uses: actions/cache/restore@v5
with:
path: resources
key: xray-wintun-

- name: Check Assets Existence
id: check-assets
run: |
Expand All @@ -34,10 +40,22 @@ jobs:
break
fi
done
LIST=('amd64' 'x86' 'arm64' 'arm')
for ARCHITECTURE in "${LIST[@]}"
do
echo -e "Checking wintun.dll for ${ARCHITECTURE}..."
if [ -s "./resources/wintun/bin/${ARCHITECTURE}/wintun.dll" ]; then
echo -e "wintun.dll for ${ARCHITECTURE} exists."
else
echo -e "wintun.dll for ${ARCHITECTURE} is missing."
echo "missing=true" >> $GITHUB_OUTPUT
break
fi
done

- name: Trigger Asset Update Workflow if Assets Missing
if: steps.check-assets.outputs.missing == 'true'
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down Expand Up @@ -153,7 +171,7 @@ jobs:
CGO_ENABLED: 0
steps:
- name: Checkout codebase
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up NDK
if: matrix.goos == 'android'
Expand All @@ -176,7 +194,7 @@ jobs:
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
Expand All @@ -191,8 +209,6 @@ jobs:
if [[ ${GOOS} == 'windows' ]]; then
echo 'Building Xray for Windows...'
go build -o build_assets/xray.exe -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main
echo 'CreateObject("Wscript.Shell").Run "xray.exe -config config.json",0' > build_assets/xray_no_window.vbs
echo 'Start-Process -FilePath ".\xray.exe" -ArgumentList "-config .\config.json" -WindowStyle Hidden' > build_assets/xray_no_window.ps1
# The line below is for without running conhost.exe version. Commented for not being used. Provided for reference.
# go build -o build_assets/wxray.exe -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-H windowsgui -X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main
else
Expand All @@ -207,14 +223,41 @@ jobs:
fi

- name: Restore Geodat Cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: resources
key: xray-geodat-

- name: Restore Wintun Cache
if: matrix.goos == 'windows'
uses: actions/cache/restore@v5
with:
path: resources
key: xray-wintun-

- name: Add additional assets into package
run: |
mv -f resources/geo* build_assets/
if [[ ${GOOS} == 'windows' ]]; then
echo 'CreateObject("Wscript.Shell").Run "xray.exe -config config.json",0' > build_assets/xray_no_window.vbs
echo 'Start-Process -FilePath ".\xray.exe" -ArgumentList "-config .\config.json" -WindowStyle Hidden' > build_assets/xray_no_window.ps1
if [[ ${GOARCH} == 'amd64' ]]; then
mv resources/wintun/bin/amd64/wintun.dll build_assets/
fi
if [[ ${GOARCH} == '386' ]]; then
mv resources/wintun/bin/x86/wintun.dll build_assets/
fi
if [[ ${GOARCH} == 'arm64' ]]; then
mv resources/wintun/bin/arm64/wintun.dll build_assets/
fi
if [[ ${GOARCH} == 'arm' ]]; then
mv resources/wintun/bin/arm/wintun.dll build_assets/
fi
mv resources/wintun/LICENSE.txt build_assets/LICENSE-wintun.txt
fi

- name: Copy README.md & LICENSE
run: |
mv -f resources/* build_assets
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE

Expand All @@ -233,17 +276,6 @@ jobs:
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
done

- name: Change the name
run: |
mv build_assets Xray-${{ env.ASSET_NAME }}

- name: Upload files to Artifacts
uses: actions/upload-artifact@v4
with:
name: Xray-${{ env.ASSET_NAME }}
path: |
./Xray-${{ env.ASSET_NAME }}/*

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'release'
Expand All @@ -252,3 +284,10 @@ jobs:
file: ./Xray-${{ env.ASSET_NAME }}.zip*
tag: ${{ github.ref }}
file_glob: true

- name: Upload files to Artifacts
uses: actions/upload-artifact@v6
with:
name: Xray-${{ env.ASSET_NAME }}
path: |
./build_assets/*
70 changes: 67 additions & 3 deletions .github/workflows/scheduled-assets-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Scheduled assets update
# routine manner, for example: GeoIP/GeoSite.
# Currently updating:
# - Geodat (GeoIP/Geosite)
# - Wintun (wintun.dll)

on:
workflow_dispatch:
Expand All @@ -21,11 +22,11 @@ on:

jobs:
geodat:
if: github.event.schedule == '30 22 * * *' || github.event_name == 'push'|| github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
if: github.event.schedule == '30 22 * * *' || github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Restore Geodat Cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: resources
key: xray-geodat-
Expand Down Expand Up @@ -58,8 +59,71 @@ jobs:
done

- name: Save Geodat Cache
uses: actions/cache/save@v4
uses: actions/cache/save@v5
if: ${{ steps.update.outputs.unhit }}
with:
path: resources
key: xray-geodat-${{ github.sha }}-${{ github.run_number }}

wintun:
if: github.event.schedule == '30 22 * * *' || github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Restore Wintun Cache
uses: actions/cache/restore@v5
with:
path: resources
key: xray-wintun-

- name: Force downloading if run manually or on file update
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
run: |
echo "FORCE_UPDATE=true" >> $GITHUB_ENV

- name: Update Wintun
id: update
uses: nick-fields/retry@v3
with:
timeout_minutes: 60
retry_wait_seconds: 60
max_attempts: 60
command: |
[ -d 'resources' ] || mkdir resources
LIST=('amd64' 'x86' 'arm64' 'arm')
for ARCHITECTURE in "${LIST[@]}"
do
FILE_PATH="resources/wintun/bin/${ARCHITECTURE}/wintun.dll"
echo -e "Checking if wintun.dll for ${ARCHITECTURE} exists..."
if [ -s "./resources/wintun/bin/${ARCHITECTURE}/wintun.dll" ]; then
echo -e "wintun.dll for ${ARCHITECTURE} exists"
continue
else
echo -e "wintun.dll for ${ARCHITECTURE} is missing"
missing=true
fi
done
if [ -s "./resources/wintun/LICENSE.txt" ]; then
echo -e "LICENSE for Wintun exists"
else
echo -e "LICENSE for Wintun is missing"
missing=true
fi
if [[ -v FORCE_UPDATE ]]; then
missing=true
fi
if [[ "$missing" == true ]]; then
FILENAME=wintun.zip
DOWNLOAD_FILE=wintun-0.14.1.zip
echo -e "Downloading https://www.wintun.net/builds/${DOWNLOAD_FILE}..."
curl -L "https://www.wintun.net/builds/${DOWNLOAD_FILE}" -o "${FILENAME}"
echo -e "Unpacking wintun..."
unzip -u ${FILENAME} -d resources/
echo "unhit=true" >> $GITHUB_OUTPUT
fi

- name: Save Wintun Cache
uses: actions/cache/save@v5
if: ${{ steps.update.outputs.unhit }}
with:
path: resources
key: xray-wintun-${{ github.sha }}-${{ github.run_number }}
Loading