MCPcopy
hub / github.com/XTLS/Xray-core

github.com/XTLS/Xray-core @v26.3.27 sqlite

repository ↗ · DeepWiki ↗ · release v26.3.27 ↗
8,115 symbols 29,710 edges 844 files 1,820 documented · 22%
README

Project X

Project X originates from XTLS protocol, providing a set of network tools such as Xray-core and REALITY.

README is open, so feel free to submit your project here.

Sponsors

Remnawave

Happ

BlancVPN

Sponsor Xray-core

Donation & NFTs

Collect a Project X NFT to support the development of Project X!

Project X NFT

  • TRX(Tron)/USDT/USDC: TNrDh5VSfwd4RPrwsohr6poyNTfFefNYan
  • TON: UQApeV-u2gm43aC1uP76xAC1m6vCylstaN1gpfBmre_5IyTH
  • BTC: 1JpqcziZZuqv3QQJhZGNGBVdCBrGgkL6cT
  • XMR: 4ABHQZ3yJZkBnLoqiKvb3f8eqUnX4iMPb6wdant5ZLGQELctcerceSGEfJnoCk6nnyRZm73wrwSgvZ2WmjYLng6R7sR67nq
  • SOL/USDT/USDC: 3x5NuXHzB5APG6vRinPZcsUv5ukWUY1tBGRSJiEJWtZa
  • ETH/USDT/USDC: 0xDc3Fe44F0f25D13CACb1C4896CD0D321df3146Ee
  • Project X NFT: https://opensea.io/item/ethereum/0x5ee362866001613093361eb8569d59c4141b76d1/1
  • VLESS NFT: https://opensea.io/collection/vless
  • REALITY NFT: https://opensea.io/item/ethereum/0x5ee362866001613093361eb8569d59c4141b76d1/2
  • Related links: VLESS Post-Quantum Encryption, XHTTP: Beyond REALITY, Announcement of NFTs by Project X

License

Mozilla Public License Version 2.0

Documentation

Project X Official Website

Telegram

Project X

Project X Channel

Project VLESS (Русский)

Project XHTTP (Persian)

Installation

Usage

GUI Clients

Others that support VLESS, XTLS, REALITY, XUDP, PLUX...

Contributing

Code of Conduct

Ask DeepWiki

Credits

One-line Compilation

Windows (PowerShell)

$env:CGO_ENABLED=0
go build -o xray.exe -trimpath -buildvcs=false -ldflags="-s -w -buildid=" -v ./main

Linux / macOS

CGO_ENABLED=0 go build -o xray -trimpath -buildvcs=false -ldflags="-s -w -buildid=" -v ./main

Reproducible Releases

Make sure that you are using the same Go version, and remember to set the git commit id (7 bytes):

CGO_ENABLED=0 go build -o xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=REPLACE -s -w -buildid=" -v ./main

If you are compiling a 32-bit MIPS/MIPSLE target, use this command instead:

CGO_ENABLED=0 go build -o xray -trimpath -buildvcs=false -gcflags="-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=REPLACE -s -w -buildid=" -v ./main

Stargazers over time

Stargazers over time

Extension points exported contracts — how you extend this code

Server (Interface)
Server is an instance of Xray. At any time, there must be at most one Server instance running. [6 implementers]
core/xray.go
Inbound (Interface)
An Inbound processes inbound connections. [15 implementers]
proxy/proxy.go
Stack (Interface)
Stack interface implement ip protocol stack, bridging raw network packets and data streams [51 implementers]
proxy/tun/stack.go
ResponseConfig (Interface)
ResponseConfig is the configuration for blackhole responses. [26 implementers]
proxy/blackhole/config.go
Server (Interface)
Server is the interface for Name Server. [6 implementers]
app/dns/nameserver.go
Service (Interface)
Service is a Commander service. [6 implementers]
app/commander/service.go
Closable (Interface)
Closable is the interface for objects that can release its resources. xray:api:beta [130 implementers]
common/interfaces.go
Account (Interface)
Account is a user identity used for authentication. [8 implementers]
common/protocol/account.go

Core symbols most depended-on inside this repo

New
called by 1285
common/errors/errors.go
ToTypedMessage
called by 882
common/serial/typed_message.go
Must
called by 835
common/common.go
Base
called by 537
common/errors/errors.go
Error
called by 379
common/buf/copy.go
String
called by 336
common/log/log.go
NewIPOrDomain
called by 275
common/net/address.go
Fatal
called by 253
common/singbridge/logger.go

Shape

Method 4,663
Function 2,107
Struct 1,085
Interface 143
TypeAlias 84
FuncType 33

Languages

Go100%

Modules by API surface

app/router/config.pb.go162 symbols
app/proxyman/command/command.pb.go153 symbols
app/router/command/command.pb.go145 symbols
transport/internet/config.pb.go135 symbols
app/stats/command/command.pb.go91 symbols
app/dns/config.pb.go84 symbols
infra/conf/transport_internet.go77 symbols
transport/internet/kcp/config.pb.go75 symbols
app/policy/config.pb.go71 symbols
app/proxyman/config.pb.go69 symbols
proxy/shadowsocks_2022/config.pb.go65 symbols
app/observatory/config.pb.go62 symbols

Dependencies from manifests, versioned

github.com/andybalholm/brotliv1.0.6 · 1×
github.com/apernet/quic-gov0.59.1-0.2026021709 · 1×
github.com/cloudflare/circlv1.6.3 · 1×
github.com/ghodss/yamlv1.0.1-0.20220118164 · 1×
github.com/golang/mockv1.7.0-rc.1 · 1×
github.com/google/btreev1.1.2 · 1×
github.com/klauspost/cpuid/v2v2.3.0 · 1×

For agents

$ claude mcp add Xray-core \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact