├── docs ├── LoggerService.md ├── StatsService.md └── HandlerService.md ├── examples ├── restartLogger.go ├── removeInbound.go ├── getSystemStats.go ├── restartLogger_test.go ├── removeInbound_test.go ├── addInbound_test.go ├── getSystemStats_test.go ├── getInboundUsers.go ├── getInboundUsers_test.go ├── queryTraffic_test.go ├── alterInbound_test.go ├── init.go ├── structures.go ├── queryTraffic.go ├── alterInbound.go └── addInbound.go ├── README.md ├── go.mod └── go.sum /docs/LoggerService.md: -------------------------------------------------------------------------------- 1 | # LoggerService 2 | > 这部分控制由 LoggerServiceClient 承载 3 | 4 | 支持的接口方法 5 | ```shell 6 | restartLogger() 7 | ``` 8 | ## restartLogger 9 | 重启日志服务。 10 | -------------------------------------------------------------------------------- /docs/StatsService.md: -------------------------------------------------------------------------------- 1 | # StatsService 2 | > 这部分控制由 StatsServiceClient 承载 3 | 4 | 支持接口的方法: 5 | ```shell 6 | QueryStats() 7 | GetSysStats() 8 | ``` 9 | 10 | ## QueryStats 11 | 查询用户的上下行流量,与 Inbound 和 Outbound 上下行流量。 12 | 13 | ## GetSysStats 14 | 获取Xray运行数据。 15 | -------------------------------------------------------------------------------- /examples/restartLogger.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "context" 5 | loggerService "github.com/xtls/xray-core/app/log/command" 6 | ) 7 | 8 | func restartLogger(c loggerService.LoggerServiceClient) (err error) { 9 | _, err = c.RestartLogger(context.Background(), &loggerService.RestartLoggerRequest{}) 10 | 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xray-API-documents 2 | ## 写在开头 3 | 使用API是一个技术活, 请在编写相关程序前对 Xray 配置有所了解
4 | [点我了解](https://xtls.github.io/about/)
5 | 以及你至少会一门支持grpc的语言, 这里以 Golang 为例, ~~因为他比较方便~~. 6 | 7 | ## 文档 8 | 说明文档在 docs 目录下
9 | 相关示例在 example 目录下, 每一个方法都对应一个test文件演示完整的过程
10 | 11 | ## 其他说明 12 | - 请尽量不要并发执行, 经过测试,大约在第10个线程后,Xray内核会丢弃多余的请求 13 | 14 | 相关问题请提issue. -------------------------------------------------------------------------------- /examples/removeInbound.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "context" 5 | "github.com/xtls/xray-core/app/proxyman/command" 6 | ) 7 | 8 | // 使用 Tag 操作,非常简单 9 | func removeInbound(client command.HandlerServiceClient, tag string) error { 10 | _, err := client.RemoveInbound(context.Background(), &command.RemoveInboundRequest{ 11 | Tag: tag, 12 | }) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /docs/HandlerService.md: -------------------------------------------------------------------------------- 1 | # HandlerService 2 | > 这部分控制由 HandlerServiceClient 承载 3 | 4 | 支持的接口方法 5 | ```shell 6 | AddInbound() 7 | RemoveInbound() 8 | AlterInbound() 9 | AddOutbound() 10 | RemoveOutbound() 11 | AlterOutbound() 12 | getInboundUsers() 13 | ``` 14 | 15 | ## AddInbound 16 | 此方法使用 InboundHandlerConfig 配置增加一个入站。 17 | 18 | ## RemoveInbound 19 | 移除一个入站,使用 Tag 区分。 20 | 21 | ## AlterInbound 22 | 在一个入站代理中添加一个用户 (VMess, VLESS, Trojan, ShadowSocks) 23 | 24 | ## getInboundUsers 25 | 获取一个入站代理的用户列表 26 | 27 | > Outbound 同理 -------------------------------------------------------------------------------- /examples/getSystemStats.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "context" 5 | statsService "github.com/xtls/xray-core/app/stats/command" 6 | ) 7 | 8 | /* 9 | 获取运行数据, 如下 10 | NumGoroutine:17 NumGC:2 Alloc:1711192 TotalAlloc:2359880 Sys:14440840 Mallocs:19101 Frees:7242 LiveObjects:11859 PauseTotalNs:4983200 Uptime:31 11 | */ 12 | func getSysStats(c statsService.StatsServiceClient) (stats *statsService.SysStatsResponse, err error) { 13 | stats, err = c.GetSysStats(context.Background(), &statsService.SysStatsRequest{}) 14 | 15 | return 16 | } 17 | -------------------------------------------------------------------------------- /examples/restartLogger_test.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestRestartLogger(t *testing.T) { 8 | var ( 9 | xrayCtl *XrayController 10 | cfg = &BaseConfig{ 11 | APIAddress: "127.0.0.1", 12 | APIPort: 10085, 13 | } 14 | ) 15 | xrayCtl = new(XrayController) 16 | err := xrayCtl.Init(cfg) 17 | defer xrayCtl.CmdConn.Close() 18 | if err != nil { 19 | t.Errorf("Failed %s", err) 20 | } 21 | err = restartLogger(xrayCtl.LsClient) 22 | if err != nil { 23 | t.Errorf("Failed %s", err) 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /examples/removeInbound_test.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import "testing" 4 | 5 | func TestRemoveInbound(t *testing.T) { 6 | var ( 7 | xrayCtl *XrayController 8 | cfg = &BaseConfig{ 9 | APIAddress: "127.0.0.1", 10 | APIPort: 10085, 11 | } 12 | tag = "proxy0" 13 | ) 14 | xrayCtl = new(XrayController) 15 | err := xrayCtl.Init(cfg) 16 | defer xrayCtl.CmdConn.Close() 17 | if err != nil { 18 | t.Errorf("Failed %s", err) 19 | } 20 | err = removeInbound(xrayCtl.HsClient, tag) 21 | if err != nil { 22 | t.Errorf("Failed %s", err) 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /examples/addInbound_test.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import "testing" 4 | 5 | func TestAddInbound(t *testing.T) { 6 | // 先指定 API 端口和地址 7 | var ( 8 | xrayCtl *XrayController 9 | cfg = &BaseConfig{ 10 | APIAddress: "127.0.0.1", 11 | APIPort: 10085, 12 | } 13 | ) 14 | // 初始化 Clients 15 | xrayCtl = new(XrayController) 16 | err := xrayCtl.Init(cfg) 17 | defer xrayCtl.CmdConn.Close() 18 | if err != nil { 19 | t.Errorf("Failed %s", err) 20 | } 21 | // 此处为执行命令部分 22 | err = addInbound(xrayCtl.HsClient) 23 | if err != nil { 24 | t.Errorf("Failed %s", err) 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /examples/getSystemStats_test.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func TestGetSysStats(t *testing.T) { 9 | var ( 10 | xrayCtl *XrayController 11 | cfg = &BaseConfig{ 12 | APIAddress: "127.0.0.1", 13 | APIPort: 10085, 14 | } 15 | ) 16 | xrayCtl = new(XrayController) 17 | err := xrayCtl.Init(cfg) 18 | defer xrayCtl.CmdConn.Close() 19 | if err != nil { 20 | t.Errorf("Failed %s", err) 21 | } 22 | SysStats, err := getSysStats(xrayCtl.SsClient) 23 | if err != nil { 24 | t.Errorf("Failed %s", err) 25 | } 26 | fmt.Println(SysStats) 27 | 28 | } 29 | -------------------------------------------------------------------------------- /examples/getInboundUsers.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "context" 5 | "github.com/xtls/xray-core/app/proxyman/command" 6 | ) 7 | 8 | /* 9 | 获取 Tag 下用户数据, 如下 10 | users:{email:"love@xray.com" account:{type:"xray.proxy.vmess.Account" value:"\n$10354ac4-9ec1-4864-ba3e-f5fd35869ef8\x1a\x02\x08\x04"}} 11 | Email 为空时返回所有用户 12 | */ 13 | func getInboundUsers(client command.HandlerServiceClient) (users *command.GetInboundUserResponse, err error) { 14 | 15 | users, err = client.GetInboundUsers(context.Background(), &command.GetInboundUserRequest{ 16 | Tag: "proxy0", 17 | //Email: "love@xray.com", 18 | }) 19 | 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /examples/getInboundUsers_test.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func TestGetInboundUsers(t *testing.T) { 9 | // 先指定 API 端口和地址 10 | var ( 11 | xrayCtl *XrayController 12 | cfg = &BaseConfig{ 13 | APIAddress: "127.0.0.1", 14 | APIPort: 10085, 15 | } 16 | ) 17 | 18 | xrayCtl = new(XrayController) 19 | err := xrayCtl.Init(cfg) 20 | defer xrayCtl.CmdConn.Close() 21 | if err != nil { 22 | t.Errorf("Failed %s", err) 23 | } 24 | users, err := getInboundUsers(xrayCtl.HsClient) 25 | if err != nil { 26 | t.Errorf("Failed %s", err) 27 | } 28 | fmt.Println(users) 29 | 30 | } 31 | -------------------------------------------------------------------------------- /examples/queryTraffic_test.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func TestQueryTraffic(t *testing.T) { 9 | var ( 10 | xrayCtl *XrayController 11 | cfg = &BaseConfig{ 12 | APIAddress: "127.0.0.1", 13 | APIPort: 10085, 14 | } 15 | ) 16 | xrayCtl = new(XrayController) 17 | err := xrayCtl.Init(cfg) 18 | defer xrayCtl.CmdConn.Close() 19 | if err != nil { 20 | t.Errorf("Failed %s", err) 21 | } 22 | ptn := "inbound>>>proxy0>>>traffic>>>downlink" 23 | trafficData, err := queryTraffic(xrayCtl.SsClient, ptn, false) 24 | if err != nil { 25 | t.Errorf("Failed %s", err) 26 | } 27 | fmt.Println(trafficData) 28 | 29 | } 30 | -------------------------------------------------------------------------------- /examples/alterInbound_test.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import "testing" 4 | 5 | func TestAlertInbound(t *testing.T) { 6 | var ( 7 | xrayCtl *XrayController 8 | cfg = &BaseConfig{ 9 | APIAddress: "127.0.0.1", 10 | APIPort: 10085, 11 | } 12 | user = UserInfo{ 13 | Uuid: "10354ac4-9ec1-4864-ba3e-f5fd35869ef8", 14 | Level: 0, 15 | InTag: "proxy0", 16 | Email: "love@xray.com", 17 | CipherType: "aes-256-gcm", 18 | Password: "xrayisthebest", 19 | } 20 | ) 21 | xrayCtl = new(XrayController) 22 | err := xrayCtl.Init(cfg) 23 | defer xrayCtl.CmdConn.Close() 24 | if err != nil { 25 | t.Errorf("Failed %s", err) 26 | } 27 | err = addVmessUser(xrayCtl.HsClient, &user) 28 | if err != nil { 29 | t.Errorf("Failed %s", err) 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /examples/init.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "fmt" 5 | loggerService "github.com/xtls/xray-core/app/log/command" 6 | handlerService "github.com/xtls/xray-core/app/proxyman/command" 7 | routingService "github.com/xtls/xray-core/app/router/command" 8 | statsService "github.com/xtls/xray-core/app/stats/command" 9 | "google.golang.org/grpc" 10 | ) 11 | 12 | // 取得API操作的Client 13 | 14 | func (xrayCtl *XrayController) Init(cfg *BaseConfig) (err error) { 15 | // 先取得ClientConn, 用完记得close 16 | xrayCtl.CmdConn, err = grpc.Dial(fmt.Sprintf("%s:%d", cfg.APIAddress, cfg.APIPort), grpc.WithInsecure()) 17 | if err != nil { 18 | return err 19 | } 20 | 21 | // 依次获取API Client, 可根据需求删减 22 | xrayCtl.HsClient = handlerService.NewHandlerServiceClient(xrayCtl.CmdConn) 23 | xrayCtl.SsClient = statsService.NewStatsServiceClient(xrayCtl.CmdConn) 24 | xrayCtl.LsClient = loggerService.NewLoggerServiceClient(xrayCtl.CmdConn) 25 | //Not implement 26 | xrayCtl.RsClient = routingService.NewRoutingServiceClient(xrayCtl.CmdConn) 27 | 28 | return 29 | } 30 | -------------------------------------------------------------------------------- /examples/structures.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | loggerService "github.com/xtls/xray-core/app/log/command" 5 | handlerService "github.com/xtls/xray-core/app/proxyman/command" 6 | routingService "github.com/xtls/xray-core/app/router/command" 7 | statsService "github.com/xtls/xray-core/app/stats/command" 8 | "google.golang.org/grpc" 9 | ) 10 | 11 | // Xray API 监听地址及端口 12 | type BaseConfig struct { 13 | APIAddress string 14 | APIPort uint16 15 | } 16 | 17 | type UserInfo struct { 18 | // For VMess & Trojan 19 | Uuid string 20 | // User's Level 21 | Level uint32 22 | // Which Inbound will add this user 23 | InTag string 24 | // User's Email, it's a unique identifier for users 25 | Email string 26 | // For ShadowSocks 27 | CipherType string 28 | // For ShadowSocks 29 | Password string 30 | } 31 | 32 | // Xray API 操作 33 | type XrayController struct { 34 | HsClient handlerService.HandlerServiceClient 35 | SsClient statsService.StatsServiceClient 36 | LsClient loggerService.LoggerServiceClient 37 | RsClient routingService.RoutingServiceClient 38 | CmdConn *grpc.ClientConn 39 | } 40 | -------------------------------------------------------------------------------- /examples/queryTraffic.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "context" 5 | statsService "github.com/xtls/xray-core/app/stats/command" 6 | ) 7 | 8 | /* 9 | 先按照 https://xtls.github.io/config/base/policy/ 打开入/出 站或用户流量统计 10 | 请参照 https://xtls.github.io/config/base/stats/ 来生成一条查询语句, 例如 11 | “user>>>love@xray.com>>>traffic>>>uplink” 查询 email 为 love@xray.com 的用户在所有的入站中的上行流量 12 | 可以选择在查询完之后重置流量信息。 13 | 14 | 目前支持 User, Inbound, Outbound 的上下行流量查询 15 | */ 16 | 17 | func queryTraffic(c statsService.StatsServiceClient, ptn string, reset bool) (traffic int64, err error) { 18 | // 如果查无此用户或 bound 则返回-1, 默认值 -1 19 | traffic = -1 20 | resp, err := c.QueryStats(context.Background(), &statsService.QueryStatsRequest{ 21 | // 这里是查询语句,例如 “user>>>love@xray.com>>>traffic>>>uplink” 表示查询用户 email 为 love@xray.com 在所有入站中的上行流量 22 | Pattern: ptn, 23 | // 是否重置流量信息(true, false),即完成查询后是否把流量统计归零 24 | Reset_: reset, // reset traffic data everytime 25 | }) 26 | if err != nil { 27 | return 28 | } 29 | // Get traffic data 30 | stat := resp.GetStat() 31 | // 判断返回 是否成功 32 | // 返回样例,value 值是我们需要的: [name:"inbound>>>proxy0>>>traffic>>>downlink" value:348789] 33 | if len(stat) != 0 { 34 | // 返回流量数据 byte 35 | traffic = stat[0].Value 36 | } 37 | 38 | return 39 | } 40 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xtls/xray-api-documents 2 | 3 | go 1.23 4 | 5 | require ( 6 | github.com/xtls/xray-core v1.8.25-0.20250218115507-52381a3c038b 7 | google.golang.org/grpc v1.70.0 8 | ) 9 | 10 | require ( 11 | github.com/andybalholm/brotli v1.1.0 // indirect 12 | github.com/cloudflare/circl v1.6.0 // indirect 13 | github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 // indirect 14 | github.com/go-task/slim-sprig/v3 v3.0.0 // indirect 15 | github.com/google/btree v1.1.2 // indirect 16 | github.com/google/pprof v0.0.0-20240528025155-186aa0362fba // indirect 17 | github.com/gorilla/websocket v1.5.3 // indirect 18 | github.com/klauspost/compress v1.17.8 // indirect 19 | github.com/klauspost/cpuid/v2 v2.2.7 // indirect 20 | github.com/onsi/ginkgo/v2 v2.19.0 // indirect 21 | github.com/pires/go-proxyproto v0.8.0 // indirect 22 | github.com/quic-go/qpack v0.5.1 // indirect 23 | github.com/quic-go/quic-go v0.49.0 // indirect 24 | github.com/refraction-networking/utls v1.6.7 // indirect 25 | github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect 26 | github.com/sagernet/sing v0.5.1 // indirect 27 | github.com/sagernet/sing-shadowsocks v0.2.7 // indirect 28 | github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771 // indirect 29 | github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e // indirect 30 | github.com/vishvananda/netlink v1.3.0 // indirect 31 | github.com/vishvananda/netns v0.0.4 // indirect 32 | github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d // indirect 33 | go.uber.org/mock v0.5.0 // indirect 34 | go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect 35 | golang.org/x/crypto v0.33.0 // indirect 36 | golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect 37 | golang.org/x/mod v0.21.0 // indirect 38 | golang.org/x/net v0.35.0 // indirect 39 | golang.org/x/sync v0.11.0 // indirect 40 | golang.org/x/sys v0.30.0 // indirect 41 | golang.org/x/text v0.22.0 // indirect 42 | golang.org/x/time v0.7.0 // indirect 43 | golang.org/x/tools v0.26.0 // indirect 44 | golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect 45 | golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect 46 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect 47 | google.golang.org/protobuf v1.36.5 // indirect 48 | gvisor.dev/gvisor v0.0.0-20240320123526-dc6abceb7ff0 // indirect 49 | lukechampine.com/blake3 v1.3.0 // indirect 50 | ) 51 | -------------------------------------------------------------------------------- /examples/alterInbound.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "context" 5 | "github.com/xtls/xray-core/app/proxyman/command" 6 | "github.com/xtls/xray-core/common/protocol" 7 | "github.com/xtls/xray-core/common/serial" 8 | "github.com/xtls/xray-core/proxy/shadowsocks" 9 | "github.com/xtls/xray-core/proxy/trojan" 10 | "github.com/xtls/xray-core/proxy/vmess" 11 | ) 12 | 13 | // 这部分非常简单, 请先去 structure.go 下查看 UserInfo 结构信息 14 | 15 | func addVmessUser(client command.HandlerServiceClient, user *UserInfo) error { 16 | _, err := client.AlterInbound(context.Background(), &command.AlterInboundRequest{ 17 | // 先确定哪个入站端口将要添加用户 18 | Tag: user.InTag, 19 | // 添加用户操作 github.com/xtls/xray-core/app/proxyman/command 中的 AddUserOperation 20 | Operation: serial.ToTypedMessage(&command.AddUserOperation{ 21 | User: &protocol.User{ 22 | // 用户信息(Level和Email为所有入站用户都需要的信息) 23 | Level: user.Level, 24 | Email: user.Email, 25 | /* 不同代理类型使用不同的用户信息结构 26 | 请在 github.com/xtls/xray-core/proxy/PROXYTYPE 下寻找 Account 结构体 27 | */ 28 | Account: serial.ToTypedMessage(&vmess.Account{ 29 | Id: user.Uuid, 30 | }), 31 | }, 32 | }), 33 | }) 34 | return err 35 | } 36 | 37 | func addSSUser(client command.HandlerServiceClient, user *UserInfo) error { 38 | var ssCipherType shadowsocks.CipherType 39 | switch user.CipherType { 40 | case "aes-128-gcm": 41 | ssCipherType = shadowsocks.CipherType_AES_128_GCM 42 | case "aes-256-gcm": 43 | ssCipherType = shadowsocks.CipherType_AES_256_GCM 44 | case "chacha20-ietf-poly1305": 45 | ssCipherType = shadowsocks.CipherType_CHACHA20_POLY1305 46 | } 47 | 48 | _, err := client.AlterInbound(context.Background(), &command.AlterInboundRequest{ 49 | Tag: user.InTag, 50 | Operation: serial.ToTypedMessage(&command.AddUserOperation{ 51 | User: &protocol.User{ 52 | Level: user.Level, 53 | Email: user.Email, 54 | Account: serial.ToTypedMessage(&shadowsocks.Account{ 55 | Password: user.Password, 56 | CipherType: ssCipherType, 57 | }), 58 | }, 59 | }), 60 | }) 61 | return err 62 | } 63 | 64 | func addTrojanUser(client command.HandlerServiceClient, user *UserInfo) error { 65 | _, err := client.AlterInbound(context.Background(), &command.AlterInboundRequest{ 66 | Tag: user.InTag, 67 | Operation: serial.ToTypedMessage(&command.AddUserOperation{ 68 | User: &protocol.User{ 69 | Level: user.Level, 70 | Email: user.Email, 71 | Account: serial.ToTypedMessage(&trojan.Account{ 72 | Password: user.Uuid, 73 | }), 74 | }, 75 | }), 76 | }) 77 | return err 78 | } 79 | 80 | // Email 为用户唯一标识符, 使用Email配合用户入站Tag来删除用户 81 | 82 | func removeUser(client command.HandlerServiceClient, user *UserInfo) error { 83 | _, err := client.AlterInbound(context.Background(), &command.AlterInboundRequest{ 84 | Tag: user.InTag, 85 | Operation: serial.ToTypedMessage(&command.RemoveUserOperation{ 86 | Email: user.Email, 87 | }), 88 | }) 89 | return err 90 | } 91 | -------------------------------------------------------------------------------- /examples/addInbound.go: -------------------------------------------------------------------------------- 1 | package examples 2 | 3 | import ( 4 | "context" 5 | "github.com/xtls/xray-core/app/proxyman" 6 | "github.com/xtls/xray-core/app/proxyman/command" 7 | "github.com/xtls/xray-core/common/net" 8 | protocol "github.com/xtls/xray-core/common/protocol" 9 | "github.com/xtls/xray-core/common/protocol/tls/cert" 10 | "github.com/xtls/xray-core/common/serial" 11 | "github.com/xtls/xray-core/core" 12 | _ "github.com/xtls/xray-core/infra/conf" 13 | "github.com/xtls/xray-core/proxy/vmess" 14 | //ssInbound "github.com/xtls/xray-core/proxy/shadowsocks" 15 | //trojanInbound "github.com/xtls/xray-core/proxy/trojan" 16 | vmessInbound "github.com/xtls/xray-core/proxy/vmess/inbound" 17 | "github.com/xtls/xray-core/transport/internet" 18 | _ "github.com/xtls/xray-core/transport/internet/tcp" 19 | "github.com/xtls/xray-core/transport/internet/tls" 20 | "github.com/xtls/xray-core/transport/internet/websocket" 21 | ) 22 | 23 | func addInbound(client command.HandlerServiceClient) error { 24 | 25 | _, err := client.AddInbound(context.Background(), &command.AddInboundRequest{ 26 | Inbound: &core.InboundHandlerConfig{ 27 | Tag: "proxy0", 28 | ReceiverSettings: serial.ToTypedMessage(&proxyman.ReceiverConfig{ 29 | // 监听端口 12345 30 | PortList: &net.PortList{ 31 | Range: []*net.PortRange{net.SinglePortRange(12360)}, 32 | }, 33 | // 监听地址, 默认0.0.0.0 34 | Listen: net.NewIPOrDomain(net.AnyIP), 35 | // 流量探测 36 | SniffingSettings: &proxyman.SniffingConfig{ 37 | Enabled: true, 38 | DestinationOverride: []string{"http", "tls"}, 39 | }, 40 | // 传输方式 41 | StreamSettings: &internet.StreamConfig{ 42 | /* 43 | 传输方式名称 44 | 请自行在 github.com/xtls/xray-core/transport/internet/config.pb.go 中寻找支持的协议 45 | 截至 1.3.0 目前支持 46 | "TCP", 47 | "UDP", 48 | "MKCP", 49 | "WebSocket", 50 | "HTTP", 51 | "DomainSocket" 52 | 使用时请一律小写 53 | 54 | */ 55 | ProtocolName: "websocket", 56 | TransportSettings: []*internet.TransportConfig{ 57 | { 58 | ProtocolName: "websocket", 59 | /* 60 | 选定传输方式后,请去 github.com/xtls/xray-core/transport/internet 下你选定方式的文件夹中导入config结构 61 | 如选定WebSocket则需要使用 github.com/xtls/xray-core/transport/internet/websocket/config.pb.go 中的 Config struct 62 | 结构内容请自行翻看代码(Ctrl + 左键) 63 | */ 64 | Settings: serial.ToTypedMessage(&websocket.Config{ 65 | Path: "/web", 66 | Header: map[string]string{ 67 | "Host": "www.xray.best", 68 | }, 69 | AcceptProxyProtocol: false, 70 | }, 71 | ), 72 | }, 73 | }, 74 | /* 75 | 传输层加密 76 | 请在 github.com/xtls/xray-core/transport/internet/ 中选择合适的传输层加密方式 77 | 截至1.3.0 目前支持 78 | TLS 79 | XTLS 80 | 留空即为None 81 | */ 82 | SecurityType: serial.GetMessageType(&tls.Config{}), 83 | SecuritySettings: []*serial.TypedMessage{ 84 | serial.ToTypedMessage(&tls.Config{ 85 | //Auto build 86 | Certificate: []*tls.Certificate{tls.ParseCertificate(cert.MustGenerate(nil))}, 87 | }), 88 | }, 89 | }, 90 | }), 91 | /* 92 | 代理设置, 请到 github.com/xtls/xray-core/proxy/ 寻找你想要添加的入站代理类型 93 | 某些类型需要区分 Inbound 与 Outbound 的配置, 94 | 需要区分使用 github.com/xtls/xray-core/proxy/PROXYTYPE/inbound/config.pb.go 中的 Config 结构 95 | 无须区分的使用 github.com/xtls/xray-core/proxy/PROXYTYPE/config.pb.go 的 ServerConfig 结构 96 | */ 97 | ProxySettings: serial.ToTypedMessage(&vmessInbound.Config{ 98 | User: []*protocol.User{ 99 | { 100 | Level: 0, 101 | Email: "love@xray.com", 102 | Account: serial.ToTypedMessage(&vmess.Account{ 103 | Id: "10354ac4-9ec1-4864-ba3e-f5fd35869ef8", 104 | }), 105 | }, 106 | }, 107 | }), 108 | }, 109 | }) 110 | 111 | return err 112 | } 113 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJSGpevP+8Pk5bANX7fJacO2w04aqLiC5I= 2 | github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0/go.mod h1:FVGavL/QEBQDcBpr3fAojoK17xX5k9bicBphrOpP7uM= 3 | github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= 4 | github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= 5 | github.com/cloudflare/circl v1.6.0 h1:cr5JKic4HI+LkINy2lg3W2jF8sHCVTBncJr5gIIq7qk= 6 | github.com/cloudflare/circl v1.6.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= 7 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 8 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 9 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 10 | github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= 11 | github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 h1:y7y0Oa6UawqTFPCDw9JG6pdKt4F9pAhHv0B7FMGaGD0= 12 | github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= 13 | github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 h1:Arcl6UOIS/kgO2nW3A65HN+7CMjSDP/gofXL4CZt1V4= 14 | github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= 15 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= 16 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 17 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= 18 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= 19 | github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= 20 | github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= 21 | github.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U= 22 | github.com/golang/mock v1.7.0-rc.1/go.mod h1:s42URUywIqd+OcERslBJvOjepvNymP31m3q8d/GkuRs= 23 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= 24 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 25 | github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= 26 | github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= 27 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 28 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 29 | github.com/google/pprof v0.0.0-20240528025155-186aa0362fba h1:ql1qNgCyOB7iAEk8JTNM+zJrgIbnyCKX/wdlyPufP5g= 30 | github.com/google/pprof v0.0.0-20240528025155-186aa0362fba/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= 31 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 32 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 33 | github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= 34 | github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 35 | github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= 36 | github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 37 | github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= 38 | github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= 39 | github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY= 40 | github.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs= 41 | github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= 42 | github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= 43 | github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= 44 | github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= 45 | github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= 46 | github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= 47 | github.com/pires/go-proxyproto v0.8.0 h1:5unRmEAPbHXHuLjDg01CxJWf91cw3lKHc/0xzKpXEe0= 48 | github.com/pires/go-proxyproto v0.8.0/go.mod h1:iknsfgnH8EkjrMeMyvfKByp9TiBZCKZM0jx2xmKqnVY= 49 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 50 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 51 | github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= 52 | github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= 53 | github.com/quic-go/quic-go v0.49.0 h1:w5iJHXwHxs1QxyBv1EHKuC50GX5to8mJAxvtnttJp94= 54 | github.com/quic-go/quic-go v0.49.0/go.mod h1:s2wDnmCdooUQBmQfpUSTCYBl1/D4FcqbULMMkASvR6s= 55 | github.com/refraction-networking/utls v1.6.7 h1:zVJ7sP1dJx/WtVuITug3qYUq034cDq9B2MR1K67ULZM= 56 | github.com/refraction-networking/utls v1.6.7/go.mod h1:BC3O4vQzye5hqpmDTWUqi4P5DDhzJfkV1tdqtawQIH0= 57 | github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg= 58 | github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstvQsPGkxUsCd2KWxErBblirPizecHcpD3ffK+s= 59 | github.com/sagernet/sing v0.5.1 h1:mhL/MZVq0TjuvHcpYcFtmSD1BFOxZ/+8ofbNZcg1k1Y= 60 | github.com/sagernet/sing v0.5.1/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak= 61 | github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8= 62 | github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE= 63 | github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771 h1:emzAzMZ1L9iaKCTxdy3Em8Wv4ChIAGnfiz18Cda70g4= 64 | github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771/go.mod h1:bR6DqgcAl1zTcOX8/pE2Qkj9XO00eCNqmKb7lXP8EAg= 65 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 66 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 67 | github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= 68 | github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 69 | github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e h1:5QefA066A1tF8gHIiADmOVOV5LS43gt3ONnlEl3xkwI= 70 | github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e/go.mod h1:5t19P9LBIrNamL6AcMQOncg/r10y3Pc01AbHeMhwlpU= 71 | github.com/vishvananda/netlink v1.3.0 h1:X7l42GfcV4S6E4vHTsw48qbrV+9PVojNfIhZcwQdrZk= 72 | github.com/vishvananda/netlink v1.3.0/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs= 73 | github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= 74 | github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= 75 | github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d h1:+B97uD9uHLgAAulhigmys4BVwZZypzK7gPN3WtpgRJg= 76 | github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE= 77 | github.com/xtls/xray-core v1.8.25-0.20250209010635-6b6fbcb459a8 h1:skW6aFSoLlpgjpAZ1EgB+KKICgJECuJNno+c8PG/Odc= 78 | github.com/xtls/xray-core v1.8.25-0.20250209010635-6b6fbcb459a8/go.mod h1:3CIiFGvfTn/V7FKXz8j79ynHkf6QcTFOWLuQgfEQi2U= 79 | github.com/xtls/xray-core v1.8.25-0.20250213140133-22c50a70c61f h1:19nfdwWzjq522NTj2ZHre/oTtNf02JB0t/ZZdP9r9jE= 80 | github.com/xtls/xray-core v1.8.25-0.20250213140133-22c50a70c61f/go.mod h1:THIVeACwSOFwh9ublxTZiRTX2pe9d99ML32H5exwPwU= 81 | github.com/xtls/xray-core v1.8.25-0.20250218115507-52381a3c038b h1:OaYQ4rfSSiJBX1wsIRsONGwpIzY1hkPN19WY0IHXFcs= 82 | github.com/xtls/xray-core v1.8.25-0.20250218115507-52381a3c038b/go.mod h1:THIVeACwSOFwh9ublxTZiRTX2pe9d99ML32H5exwPwU= 83 | go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= 84 | go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= 85 | go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= 86 | go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= 87 | go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= 88 | go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= 89 | go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= 90 | go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= 91 | go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= 92 | go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= 93 | go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= 94 | go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= 95 | go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M= 96 | go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y= 97 | golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= 98 | golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= 99 | golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= 100 | golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg= 101 | golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= 102 | golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= 103 | golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= 104 | golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= 105 | golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= 106 | golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= 107 | golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= 108 | golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 109 | golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 110 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 111 | golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 112 | golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= 113 | golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 114 | golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= 115 | golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 116 | golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= 117 | golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= 118 | golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 119 | golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= 120 | golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= 121 | golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg= 122 | golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI= 123 | golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 h1:/jFs0duh4rdb8uIfPMv78iAJGcPKDeqAFnaLBropIC4= 124 | golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA= 125 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= 126 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= 127 | google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= 128 | google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= 129 | google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= 130 | google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 131 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 132 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 133 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 134 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 135 | gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 136 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 137 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 138 | gvisor.dev/gvisor v0.0.0-20240320123526-dc6abceb7ff0 h1:P+U/06iIKPQ3DLcg+zBfSCia1luZ2msPZrJ8jYDFPs0= 139 | gvisor.dev/gvisor v0.0.0-20240320123526-dc6abceb7ff0/go.mod h1:NQHVAzMwvZ+Qe3ElSiHmq9RUm1MdNHpUZ52fiEqvn+0= 140 | lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= 141 | lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= 142 | --------------------------------------------------------------------------------