mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-23 01:56:48 +08:00
Compare commits
77 Commits
v24.9.19
...
expectedRe
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8c111180d2 | ||
![]() |
513f18bf53 | ||
![]() |
817fa72874 | ||
![]() |
0a252ac15d | ||
![]() |
6ba0dbafd7 | ||
![]() |
59e5d24280 | ||
![]() |
7d3d6b05e3 | ||
![]() |
55e045d098 | ||
![]() |
5a96ef632d | ||
![]() |
1f570d9cef | ||
![]() |
2d7b0e8cd4 | ||
![]() |
ec1fd008c4 | ||
![]() |
17825b25f2 | ||
![]() |
83ae38497b | ||
![]() |
7b4a686b74 | ||
![]() |
48ac662298 | ||
![]() |
1a238cbb7d | ||
![]() |
44b1dd0e67 | ||
![]() |
0df2446f82 | ||
![]() |
85b3c2328f | ||
![]() |
571777483b | ||
![]() |
1ffb8a92cd | ||
![]() |
480748403a | ||
![]() |
bd0841a75b | ||
![]() |
83bab5dd90 | ||
![]() |
bc4bf3d38f | ||
![]() |
94c02f090e | ||
![]() |
5af750b336 | ||
![]() |
6cb58d9315 | ||
![]() |
8cd3f5448d | ||
![]() |
b98f29bf3e | ||
![]() |
6877ca5201 | ||
![]() |
71cfea8aae | ||
![]() |
afc7ec5506 | ||
![]() |
057e6284b2 | ||
![]() |
ccc4b7b2cf | ||
![]() |
9fbb6fbb3b | ||
![]() |
2c72864935 | ||
![]() |
e3276df725 | ||
![]() |
85a1c33709 | ||
![]() |
b7aacd3245 | ||
![]() |
4ec5c78c34 | ||
![]() |
b30e05d1bc | ||
![]() |
e733148c0b | ||
![]() |
9f8bb47633 | ||
![]() |
ceb6eac8e7 | ||
![]() |
cf182b0482 | ||
![]() |
94338c94e9 | ||
![]() |
e4939dc1db | ||
![]() |
8809cbda81 | ||
![]() |
9bdf72d658 | ||
![]() |
b0272c172a | ||
![]() |
25c7bc0c82 | ||
![]() |
47fad1fbfd | ||
![]() |
897521defd | ||
![]() |
86257531ee | ||
![]() |
82bd5f3046 | ||
![]() |
19f3f709b2 | ||
![]() |
6a70ae6408 | ||
![]() |
8c180b9cfd | ||
![]() |
5164a82185 | ||
![]() |
af7232d545 | ||
![]() |
b3ab49f323 | ||
![]() |
e2b9f71384 | ||
![]() |
c30f5d4796 | ||
![]() |
75729ce779 | ||
![]() |
c7534c4e36 | ||
![]() |
e45cef542e | ||
![]() |
3b06af882d | ||
![]() |
697156f6f6 | ||
![]() |
d8485bd5af | ||
![]() |
3632e83faa | ||
![]() |
7086d286be | ||
![]() |
d497de916f | ||
![]() |
acbf36e21b | ||
![]() |
93cff1a576 | ||
![]() |
7677ac980d |
2
.github/docker/Dockerfile
vendored
2
.github/docker/Dockerfile
vendored
@@ -22,7 +22,7 @@ VOLUME /etc/xray
|
|||||||
ARG TZ=Asia/Shanghai
|
ARG TZ=Asia/Shanghai
|
||||||
ENV TZ=$TZ
|
ENV TZ=$TZ
|
||||||
ENTRYPOINT [ "/usr/bin/xray" ]
|
ENTRYPOINT [ "/usr/bin/xray" ]
|
||||||
CMD [ "-config", "/etc/xray/config.json" ]
|
CMD [ "-confdir", "/etc/xray/" ]
|
||||||
|
|
||||||
ARG flavor=v2fly
|
ARG flavor=v2fly
|
||||||
COPY --from=build --chmod=644 /$flavor /usr/share/xray
|
COPY --from=build --chmod=644 /$flavor /usr/share/xray
|
||||||
|
@@ -32,11 +32,11 @@
|
|||||||
- Docker
|
- Docker
|
||||||
- [ghcr.io/xtls/xray-core](https://ghcr.io/xtls/xray-core) (**Official**)
|
- [ghcr.io/xtls/xray-core](https://ghcr.io/xtls/xray-core) (**Official**)
|
||||||
- [teddysun/xray](https://hub.docker.com/r/teddysun/xray)
|
- [teddysun/xray](https://hub.docker.com/r/teddysun/xray)
|
||||||
- Web Panel
|
- [wulabing/xray_docker](https://github.com/wulabing/xray_docker)
|
||||||
- [3X-UI](https://github.com/MHSanaei/3x-ui), [X-UI](https://github.com/alireza0/x-ui), [Xray-UI](https://github.com/qist/xray-ui)
|
- Web Panel - **WARNING: Please DO NOT USE plain HTTP panels like 3X-UI**, as they are believed to be bribed by Iran GFW for supporting plain HTTP by default and refused to change (https://github.com/XTLS/Xray-core/pull/3884#issuecomment-2439595331), which has already put many users' data security in danger in the past few years. **If you are already using 3X-UI, please switch to the following panels, which are verified to support HTTPS and SSH port forwarding only:**
|
||||||
- [Hiddify](https://github.com/hiddify/hiddify-config)
|
|
||||||
- [Marzban](https://github.com/Gozargah/Marzban)
|
- [Marzban](https://github.com/Gozargah/Marzban)
|
||||||
- [Libertea](https://github.com/VZiChoushaDui/Libertea)
|
- [Xray-UI](https://github.com/qist/xray-ui)
|
||||||
|
- [Hiddify](https://github.com/hiddify/Hiddify-Manager)
|
||||||
- One Click
|
- One Click
|
||||||
- [Xray-REALITY](https://github.com/zxcvos/Xray-script), [xray-reality](https://github.com/sajjaddg/xray-reality), [reality-ezpz](https://github.com/aleskxyz/reality-ezpz)
|
- [Xray-REALITY](https://github.com/zxcvos/Xray-script), [xray-reality](https://github.com/sajjaddg/xray-reality), [reality-ezpz](https://github.com/aleskxyz/reality-ezpz)
|
||||||
- [Xray_bash_onekey](https://github.com/hello-yunshu/Xray_bash_onekey), [XTool](https://github.com/LordPenguin666/XTool)
|
- [Xray_bash_onekey](https://github.com/hello-yunshu/Xray_bash_onekey), [XTool](https://github.com/LordPenguin666/XTool)
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package commander
|
package commander
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"net"
|
"net"
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/commander/config.proto
|
// source: app/commander/config.proto
|
||||||
|
|
||||||
package commander
|
package commander
|
||||||
@@ -38,11 +38,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_commander_config_proto_msgTypes[0]
|
||||||
mi := &file_app_commander_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -53,7 +51,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_commander_config_proto_msgTypes[0]
|
mi := &file_app_commander_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -98,11 +96,9 @@ type ReflectionConfig struct {
|
|||||||
|
|
||||||
func (x *ReflectionConfig) Reset() {
|
func (x *ReflectionConfig) Reset() {
|
||||||
*x = ReflectionConfig{}
|
*x = ReflectionConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_commander_config_proto_msgTypes[1]
|
||||||
mi := &file_app_commander_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReflectionConfig) String() string {
|
func (x *ReflectionConfig) String() string {
|
||||||
@@ -113,7 +109,7 @@ func (*ReflectionConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ReflectionConfig) ProtoReflect() protoreflect.Message {
|
func (x *ReflectionConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_commander_config_proto_msgTypes[1]
|
mi := &file_app_commander_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -185,32 +181,6 @@ func file_app_commander_config_proto_init() {
|
|||||||
if File_app_commander_config_proto != nil {
|
if File_app_commander_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_commander_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_commander_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*ReflectionConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/dispatcher/config.proto
|
// source: app/dispatcher/config.proto
|
||||||
|
|
||||||
package dispatcher
|
package dispatcher
|
||||||
@@ -28,11 +28,9 @@ type SessionConfig struct {
|
|||||||
|
|
||||||
func (x *SessionConfig) Reset() {
|
func (x *SessionConfig) Reset() {
|
||||||
*x = SessionConfig{}
|
*x = SessionConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dispatcher_config_proto_msgTypes[0]
|
||||||
mi := &file_app_dispatcher_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SessionConfig) String() string {
|
func (x *SessionConfig) String() string {
|
||||||
@@ -43,7 +41,7 @@ func (*SessionConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SessionConfig) ProtoReflect() protoreflect.Message {
|
func (x *SessionConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dispatcher_config_proto_msgTypes[0]
|
mi := &file_app_dispatcher_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -68,11 +66,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dispatcher_config_proto_msgTypes[1]
|
||||||
mi := &file_app_dispatcher_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -83,7 +79,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dispatcher_config_proto_msgTypes[1]
|
mi := &file_app_dispatcher_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -157,32 +153,6 @@ func file_app_dispatcher_config_proto_init() {
|
|||||||
if File_app_dispatcher_config_proto != nil {
|
if File_app_dispatcher_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_dispatcher_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SessionConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_dispatcher_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package dispatcher
|
package dispatcher
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"regexp"
|
"regexp"
|
||||||
@@ -183,6 +181,18 @@ func (d *DefaultDispatcher) getLink(ctx context.Context) (*transport.Link, *tran
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if p.Stats.UserOnline {
|
||||||
|
name := "user>>>" + user.Email + ">>>online"
|
||||||
|
if om, _ := stats.GetOrRegisterOnlineMap(d.stats, name); om != nil {
|
||||||
|
sessionInbounds := session.InboundFromContext(ctx)
|
||||||
|
userIP := sessionInbounds.Source.Address.String()
|
||||||
|
om.AddIP(userIP)
|
||||||
|
// log Online user with ips
|
||||||
|
// errors.LogDebug(ctx, "user>>>" + user.Email + ">>>online", om.Count(), om.List())
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return inboundLink, outboundLink
|
return inboundLink, outboundLink
|
||||||
|
@@ -1,3 +1 @@
|
|||||||
package dispatcher
|
package dispatcher
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -28,7 +28,7 @@ func newFakeDNSSniffer(ctx context.Context) (protocolSnifferWithMetadata, error)
|
|||||||
}
|
}
|
||||||
return protocolSnifferWithMetadata{protocolSniffer: func(ctx context.Context, bytes []byte) (SniffResult, error) {
|
return protocolSnifferWithMetadata{protocolSniffer: func(ctx context.Context, bytes []byte) (SniffResult, error) {
|
||||||
outbounds := session.OutboundsFromContext(ctx)
|
outbounds := session.OutboundsFromContext(ctx)
|
||||||
ob := outbounds[len(outbounds) - 1]
|
ob := outbounds[len(outbounds)-1]
|
||||||
if ob.Target.Network == net.Network_TCP || ob.Target.Network == net.Network_UDP {
|
if ob.Target.Network == net.Network_TCP || ob.Target.Network == net.Network_UDP {
|
||||||
domainFromFakeDNS := fakeDNSEngine.GetDomainFromFakeDNS(ob.Target.Address)
|
domainFromFakeDNS := fakeDNSEngine.GetDomainFromFakeDNS(ob.Target.Address)
|
||||||
if domainFromFakeDNS != "" {
|
if domainFromFakeDNS != "" {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.28.0
|
// protoc v5.28.2
|
||||||
// source: app/dns/config.proto
|
// source: app/dns/config.proto
|
||||||
|
|
||||||
package dns
|
package dns
|
||||||
@@ -139,11 +139,9 @@ type NameServer struct {
|
|||||||
|
|
||||||
func (x *NameServer) Reset() {
|
func (x *NameServer) Reset() {
|
||||||
*x = NameServer{}
|
*x = NameServer{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dns_config_proto_msgTypes[0]
|
||||||
mi := &file_app_dns_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NameServer) String() string {
|
func (x *NameServer) String() string {
|
||||||
@@ -154,7 +152,7 @@ func (*NameServer) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *NameServer) ProtoReflect() protoreflect.Message {
|
func (x *NameServer) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dns_config_proto_msgTypes[0]
|
mi := &file_app_dns_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -241,11 +239,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dns_config_proto_msgTypes[1]
|
||||||
mi := &file_app_dns_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -256,7 +252,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dns_config_proto_msgTypes[1]
|
mi := &file_app_dns_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -338,11 +334,9 @@ type NameServer_PriorityDomain struct {
|
|||||||
|
|
||||||
func (x *NameServer_PriorityDomain) Reset() {
|
func (x *NameServer_PriorityDomain) Reset() {
|
||||||
*x = NameServer_PriorityDomain{}
|
*x = NameServer_PriorityDomain{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dns_config_proto_msgTypes[2]
|
||||||
mi := &file_app_dns_config_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NameServer_PriorityDomain) String() string {
|
func (x *NameServer_PriorityDomain) String() string {
|
||||||
@@ -353,7 +347,7 @@ func (*NameServer_PriorityDomain) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *NameServer_PriorityDomain) ProtoReflect() protoreflect.Message {
|
func (x *NameServer_PriorityDomain) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dns_config_proto_msgTypes[2]
|
mi := &file_app_dns_config_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -393,11 +387,9 @@ type NameServer_OriginalRule struct {
|
|||||||
|
|
||||||
func (x *NameServer_OriginalRule) Reset() {
|
func (x *NameServer_OriginalRule) Reset() {
|
||||||
*x = NameServer_OriginalRule{}
|
*x = NameServer_OriginalRule{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dns_config_proto_msgTypes[3]
|
||||||
mi := &file_app_dns_config_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NameServer_OriginalRule) String() string {
|
func (x *NameServer_OriginalRule) String() string {
|
||||||
@@ -408,7 +400,7 @@ func (*NameServer_OriginalRule) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *NameServer_OriginalRule) ProtoReflect() protoreflect.Message {
|
func (x *NameServer_OriginalRule) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dns_config_proto_msgTypes[3]
|
mi := &file_app_dns_config_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -452,11 +444,9 @@ type Config_HostMapping struct {
|
|||||||
|
|
||||||
func (x *Config_HostMapping) Reset() {
|
func (x *Config_HostMapping) Reset() {
|
||||||
*x = Config_HostMapping{}
|
*x = Config_HostMapping{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dns_config_proto_msgTypes[4]
|
||||||
mi := &file_app_dns_config_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config_HostMapping) String() string {
|
func (x *Config_HostMapping) String() string {
|
||||||
@@ -467,7 +457,7 @@ func (*Config_HostMapping) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config_HostMapping) ProtoReflect() protoreflect.Message {
|
func (x *Config_HostMapping) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dns_config_proto_msgTypes[4]
|
mi := &file_app_dns_config_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -651,68 +641,6 @@ func file_app_dns_config_proto_init() {
|
|||||||
if File_app_dns_config_proto != nil {
|
if File_app_dns_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_dns_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*NameServer); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_dns_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_dns_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*NameServer_PriorityDomain); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_dns_config_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*NameServer_OriginalRule); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_dns_config_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config_HostMapping); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
// Package dns is an implementation of core.DNS feature.
|
// Package dns is an implementation of core.DNS feature.
|
||||||
package dns
|
package dns
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@@ -88,7 +88,7 @@ func Test_parseResponse(t *testing.T) {
|
|||||||
got.Expire = time.Time{}
|
got.Expire = time.Time{}
|
||||||
}
|
}
|
||||||
if cmp.Diff(got, tt.want) != "" {
|
if cmp.Diff(got, tt.want) != "" {
|
||||||
t.Errorf(cmp.Diff(got, tt.want))
|
t.Error(cmp.Diff(got, tt.want))
|
||||||
// t.Errorf("handleResponse() = %#v, want %#v", got, tt.want)
|
// t.Errorf("handleResponse() = %#v, want %#v", got, tt.want)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@@ -1,3 +1 @@
|
|||||||
package fakedns
|
package fakedns
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/dns/fakedns/fakedns.proto
|
// source: app/dns/fakedns/fakedns.proto
|
||||||
|
|
||||||
package fakedns
|
package fakedns
|
||||||
@@ -31,11 +31,9 @@ type FakeDnsPool struct {
|
|||||||
|
|
||||||
func (x *FakeDnsPool) Reset() {
|
func (x *FakeDnsPool) Reset() {
|
||||||
*x = FakeDnsPool{}
|
*x = FakeDnsPool{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dns_fakedns_fakedns_proto_msgTypes[0]
|
||||||
mi := &file_app_dns_fakedns_fakedns_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *FakeDnsPool) String() string {
|
func (x *FakeDnsPool) String() string {
|
||||||
@@ -46,7 +44,7 @@ func (*FakeDnsPool) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *FakeDnsPool) ProtoReflect() protoreflect.Message {
|
func (x *FakeDnsPool) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dns_fakedns_fakedns_proto_msgTypes[0]
|
mi := &file_app_dns_fakedns_fakedns_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -85,11 +83,9 @@ type FakeDnsPoolMulti struct {
|
|||||||
|
|
||||||
func (x *FakeDnsPoolMulti) Reset() {
|
func (x *FakeDnsPoolMulti) Reset() {
|
||||||
*x = FakeDnsPoolMulti{}
|
*x = FakeDnsPoolMulti{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_dns_fakedns_fakedns_proto_msgTypes[1]
|
||||||
mi := &file_app_dns_fakedns_fakedns_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *FakeDnsPoolMulti) String() string {
|
func (x *FakeDnsPoolMulti) String() string {
|
||||||
@@ -100,7 +96,7 @@ func (*FakeDnsPoolMulti) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *FakeDnsPoolMulti) ProtoReflect() protoreflect.Message {
|
func (x *FakeDnsPoolMulti) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_dns_fakedns_fakedns_proto_msgTypes[1]
|
mi := &file_app_dns_fakedns_fakedns_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -177,32 +173,6 @@ func file_app_dns_fakedns_fakedns_proto_init() {
|
|||||||
if File_app_dns_fakedns_fakedns_proto != nil {
|
if File_app_dns_fakedns_fakedns_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_dns_fakedns_fakedns_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*FakeDnsPool); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_dns_fakedns_fakedns_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*FakeDnsPoolMulti); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestQUICNameServer(t *testing.T) {
|
func TestQUICNameServer(t *testing.T) {
|
||||||
url, err := url.Parse("quic://dns.adguard.com")
|
url, err := url.Parse("quic://dns.adguard-dns.com")
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
s, err := NewQUICNameServer(url, QueryStrategy_USE_IP)
|
s, err := NewQUICNameServer(url, QueryStrategy_USE_IP)
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
@@ -42,7 +42,7 @@ func TestQUICNameServer(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestQUICNameServerWithIPv4Override(t *testing.T) {
|
func TestQUICNameServerWithIPv4Override(t *testing.T) {
|
||||||
url, err := url.Parse("quic://dns.adguard.com")
|
url, err := url.Parse("quic://dns.adguard-dns.com")
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
s, err := NewQUICNameServer(url, QueryStrategy_USE_IP4)
|
s, err := NewQUICNameServer(url, QueryStrategy_USE_IP4)
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
@@ -65,7 +65,7 @@ func TestQUICNameServerWithIPv4Override(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestQUICNameServerWithIPv6Override(t *testing.T) {
|
func TestQUICNameServerWithIPv6Override(t *testing.T) {
|
||||||
url, err := url.Parse("quic://dns.adguard.com")
|
url, err := url.Parse("quic://dns.adguard-dns.com")
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
s, err := NewQUICNameServer(url, QueryStrategy_USE_IP6)
|
s, err := NewQUICNameServer(url, QueryStrategy_USE_IP6)
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package command
|
package command
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/log/command/config.proto
|
// source: app/log/command/config.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
@@ -28,11 +28,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_log_command_config_proto_msgTypes[0]
|
||||||
mi := &file_app_log_command_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -43,7 +41,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_log_command_config_proto_msgTypes[0]
|
mi := &file_app_log_command_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -66,11 +64,9 @@ type RestartLoggerRequest struct {
|
|||||||
|
|
||||||
func (x *RestartLoggerRequest) Reset() {
|
func (x *RestartLoggerRequest) Reset() {
|
||||||
*x = RestartLoggerRequest{}
|
*x = RestartLoggerRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_log_command_config_proto_msgTypes[1]
|
||||||
mi := &file_app_log_command_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RestartLoggerRequest) String() string {
|
func (x *RestartLoggerRequest) String() string {
|
||||||
@@ -81,7 +77,7 @@ func (*RestartLoggerRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RestartLoggerRequest) ProtoReflect() protoreflect.Message {
|
func (x *RestartLoggerRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_log_command_config_proto_msgTypes[1]
|
mi := &file_app_log_command_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -104,11 +100,9 @@ type RestartLoggerResponse struct {
|
|||||||
|
|
||||||
func (x *RestartLoggerResponse) Reset() {
|
func (x *RestartLoggerResponse) Reset() {
|
||||||
*x = RestartLoggerResponse{}
|
*x = RestartLoggerResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_log_command_config_proto_msgTypes[2]
|
||||||
mi := &file_app_log_command_config_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RestartLoggerResponse) String() string {
|
func (x *RestartLoggerResponse) String() string {
|
||||||
@@ -119,7 +113,7 @@ func (*RestartLoggerResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RestartLoggerResponse) ProtoReflect() protoreflect.Message {
|
func (x *RestartLoggerResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_log_command_config_proto_msgTypes[2]
|
mi := &file_app_log_command_config_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -194,44 +188,6 @@ func file_app_log_command_config_proto_init() {
|
|||||||
if File_app_log_command_config_proto != nil {
|
if File_app_log_command_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_log_command_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_log_command_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*RestartLoggerRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_log_command_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*RestartLoggerResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc v5.27.0
|
// - protoc v5.28.2
|
||||||
// source: app/log/command/config.proto
|
// source: app/log/command/config.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/log/config.proto
|
// source: app/log/config.proto
|
||||||
|
|
||||||
package log
|
package log
|
||||||
@@ -89,11 +89,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_log_config_proto_msgTypes[0]
|
||||||
mi := &file_app_log_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -104,7 +102,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_log_config_proto_msgTypes[0]
|
mi := &file_app_log_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -243,20 +241,6 @@ func file_app_log_config_proto_init() {
|
|||||||
if File_app_log_config_proto != nil {
|
if File_app_log_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_log_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package log
|
package log
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -33,8 +31,8 @@ func New(ctx context.Context, config *Config) (*Instance, error) {
|
|||||||
}
|
}
|
||||||
log.RegisterHandler(g)
|
log.RegisterHandler(g)
|
||||||
|
|
||||||
// Start logger instantly on initialization
|
// start logger now,
|
||||||
// Other modules would log during initialization
|
// then other modules will be able to log during initialization
|
||||||
if err := g.startInternal(); err != nil {
|
if err := g.startInternal(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/metrics/config.proto
|
// source: app/metrics/config.proto
|
||||||
|
|
||||||
package metrics
|
package metrics
|
||||||
@@ -32,11 +32,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_metrics_config_proto_msgTypes[0]
|
||||||
mi := &file_app_metrics_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -47,7 +45,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_metrics_config_proto_msgTypes[0]
|
mi := &file_app_metrics_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -114,20 +112,6 @@ func file_app_metrics_config_proto_init() {
|
|||||||
if File_app_metrics_config_proto != nil {
|
if File_app_metrics_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_metrics_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -5,8 +5,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rttFailed = time.Duration(math.MaxInt64 - iota)
|
rttFailed = time.Duration(math.MaxInt64 - iota)
|
||||||
rttUntested
|
rttUntested
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.2
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/observatory/burst/config.proto
|
// source: app/observatory/burst/config.proto
|
||||||
|
|
||||||
package burst
|
package burst
|
||||||
@@ -32,11 +32,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_burst_config_proto_msgTypes[0]
|
||||||
mi := &file_app_observatory_burst_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -47,7 +45,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_burst_config_proto_msgTypes[0]
|
mi := &file_app_observatory_burst_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -91,16 +89,15 @@ type HealthPingConfig struct {
|
|||||||
// sampling count is the amount of recent ping results which are kept for calculation
|
// sampling count is the amount of recent ping results which are kept for calculation
|
||||||
SamplingCount int32 `protobuf:"varint,4,opt,name=samplingCount,proto3" json:"samplingCount,omitempty"`
|
SamplingCount int32 `protobuf:"varint,4,opt,name=samplingCount,proto3" json:"samplingCount,omitempty"`
|
||||||
// ping timeout, int64 values of time.Duration
|
// ping timeout, int64 values of time.Duration
|
||||||
Timeout int64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
Timeout int64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
||||||
|
ExpectedResponseCode []int32 `protobuf:"varint,6,rep,packed,name=expectedResponseCode,proto3" json:"expectedResponseCode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HealthPingConfig) Reset() {
|
func (x *HealthPingConfig) Reset() {
|
||||||
*x = HealthPingConfig{}
|
*x = HealthPingConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_burst_config_proto_msgTypes[1]
|
||||||
mi := &file_app_observatory_burst_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HealthPingConfig) String() string {
|
func (x *HealthPingConfig) String() string {
|
||||||
@@ -111,7 +108,7 @@ func (*HealthPingConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *HealthPingConfig) ProtoReflect() protoreflect.Message {
|
func (x *HealthPingConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_burst_config_proto_msgTypes[1]
|
mi := &file_app_observatory_burst_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -161,6 +158,13 @@ func (x *HealthPingConfig) GetTimeout() int64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *HealthPingConfig) GetExpectedResponseCode() []int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ExpectedResponseCode
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var File_app_observatory_burst_config_proto protoreflect.FileDescriptor
|
var File_app_observatory_burst_config_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_app_observatory_burst_config_proto_rawDesc = []byte{
|
var file_app_observatory_burst_config_proto_rawDesc = []byte{
|
||||||
@@ -177,7 +181,7 @@ var file_app_observatory_burst_config_proto_rawDesc = []byte{
|
|||||||
0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x62, 0x75, 0x72,
|
0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x62, 0x75, 0x72,
|
||||||
0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e,
|
0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e,
|
||||||
0x66, 0x69, 0x67, 0x52, 0x0a, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22,
|
0x66, 0x69, 0x67, 0x52, 0x0a, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22,
|
||||||
0xb4, 0x01, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x69, 0x6e, 0x67, 0x43, 0x6f,
|
0xe8, 0x01, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x69, 0x6e, 0x67, 0x43, 0x6f,
|
||||||
0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74,
|
0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69,
|
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69,
|
||||||
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||||
@@ -188,14 +192,18 @@ var file_app_observatory_burst_config_proto_rawDesc = []byte{
|
|||||||
0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73,
|
0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73,
|
||||||
0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07,
|
0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07,
|
||||||
0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74,
|
0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74,
|
||||||
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x70, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72,
|
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74,
|
||||||
0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x6f,
|
0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06,
|
||||||
0x72, 0x79, 0x2e, 0x62, 0x75, 0x72, 0x73, 0x74, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68,
|
0x20, 0x03, 0x28, 0x05, 0x52, 0x14, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65,
|
||||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x70, 0x0a, 0x1e, 0x63, 0x6f,
|
||||||
0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76,
|
0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72,
|
||||||
0x61, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x62, 0x75, 0x72, 0x73, 0x74, 0xaa, 0x02, 0x1a, 0x58, 0x72,
|
0x76, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x62, 0x75, 0x72, 0x73, 0x74, 0x50, 0x01, 0x5a, 0x2f,
|
||||||
0x61, 0x79, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x6f,
|
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f,
|
||||||
0x72, 0x79, 0x2e, 0x42, 0x75, 0x72, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6f, 0x62,
|
||||||
|
0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x62, 0x75, 0x72, 0x73, 0x74, 0xaa,
|
||||||
|
0x02, 0x1a, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72,
|
||||||
|
0x76, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x42, 0x75, 0x72, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -229,32 +237,6 @@ func file_app_observatory_burst_config_proto_init() {
|
|||||||
if File_app_observatory_burst_config_proto != nil {
|
if File_app_observatory_burst_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_observatory_burst_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_observatory_burst_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*HealthPingConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -26,4 +26,5 @@ message HealthPingConfig {
|
|||||||
int32 samplingCount = 4;
|
int32 samplingCount = 4;
|
||||||
// ping timeout, int64 values of time.Duration
|
// ping timeout, int64 values of time.Duration
|
||||||
int64 timeout = 5;
|
int64 timeout = 5;
|
||||||
|
repeated int32 expectedResponseCode = 6;
|
||||||
}
|
}
|
||||||
|
@@ -13,11 +13,12 @@ import (
|
|||||||
|
|
||||||
// HealthPingSettings holds settings for health Checker
|
// HealthPingSettings holds settings for health Checker
|
||||||
type HealthPingSettings struct {
|
type HealthPingSettings struct {
|
||||||
Destination string `json:"destination"`
|
Destination string `json:"destination"`
|
||||||
Connectivity string `json:"connectivity"`
|
Connectivity string `json:"connectivity"`
|
||||||
Interval time.Duration `json:"interval"`
|
Interval time.Duration `json:"interval"`
|
||||||
SamplingCount int `json:"sampling"`
|
SamplingCount int `json:"sampling"`
|
||||||
Timeout time.Duration `json:"timeout"`
|
Timeout time.Duration `json:"timeout"`
|
||||||
|
ExpectedResponseCode []int32 `json:"expectedResponseCode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// HealthPing is the health checker for balancers
|
// HealthPing is the health checker for balancers
|
||||||
@@ -36,11 +37,12 @@ func NewHealthPing(ctx context.Context, config *HealthPingConfig) *HealthPing {
|
|||||||
settings := &HealthPingSettings{}
|
settings := &HealthPingSettings{}
|
||||||
if config != nil {
|
if config != nil {
|
||||||
settings = &HealthPingSettings{
|
settings = &HealthPingSettings{
|
||||||
Connectivity: strings.TrimSpace(config.Connectivity),
|
Connectivity: strings.TrimSpace(config.Connectivity),
|
||||||
Destination: strings.TrimSpace(config.Destination),
|
Destination: strings.TrimSpace(config.Destination),
|
||||||
Interval: time.Duration(config.Interval),
|
Interval: time.Duration(config.Interval),
|
||||||
SamplingCount: int(config.SamplingCount),
|
SamplingCount: int(config.SamplingCount),
|
||||||
Timeout: time.Duration(config.Timeout),
|
Timeout: time.Duration(config.Timeout),
|
||||||
|
ExpectedResponseCode: config.ExpectedResponseCode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if settings.Destination == "" {
|
if settings.Destination == "" {
|
||||||
@@ -48,6 +50,7 @@ func NewHealthPing(ctx context.Context, config *HealthPingConfig) *HealthPing {
|
|||||||
// https://github.com/chromium/chromium/blob/main/components/safety_check/url_constants.cc#L10
|
// https://github.com/chromium/chromium/blob/main/components/safety_check/url_constants.cc#L10
|
||||||
// https://chromium.googlesource.com/chromium/src/+/refs/heads/main/components/safety_check/url_constants.cc#10
|
// https://chromium.googlesource.com/chromium/src/+/refs/heads/main/components/safety_check/url_constants.cc#10
|
||||||
settings.Destination = "https://connectivitycheck.gstatic.com/generate_204"
|
settings.Destination = "https://connectivitycheck.gstatic.com/generate_204"
|
||||||
|
settings.ExpectedResponseCode = []int32{ 204 }
|
||||||
}
|
}
|
||||||
if settings.Interval == 0 {
|
if settings.Interval == 0 {
|
||||||
settings.Interval = time.Duration(1) * time.Minute
|
settings.Interval = time.Duration(1) * time.Minute
|
||||||
@@ -152,6 +155,7 @@ func (h *HealthPing) doCheck(tags []string, duration time.Duration, rounds int)
|
|||||||
h.Settings.Destination,
|
h.Settings.Destination,
|
||||||
h.Settings.Timeout,
|
h.Settings.Timeout,
|
||||||
handler,
|
handler,
|
||||||
|
h.Settings.ExpectedResponseCode,
|
||||||
)
|
)
|
||||||
for i := 0; i < rounds; i++ {
|
for i := 0; i < rounds; i++ {
|
||||||
delay := time.Duration(0)
|
delay := time.Duration(0)
|
||||||
|
@@ -5,26 +5,30 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/xtls/xray-core/common/errors"
|
||||||
"github.com/xtls/xray-core/common/net"
|
"github.com/xtls/xray-core/common/net"
|
||||||
"github.com/xtls/xray-core/transport/internet/tagged"
|
"github.com/xtls/xray-core/transport/internet/tagged"
|
||||||
)
|
)
|
||||||
|
|
||||||
type pingClient struct {
|
type pingClient struct {
|
||||||
destination string
|
destination string
|
||||||
httpClient *http.Client
|
httpClient *http.Client
|
||||||
|
expectedResponseCode []int32
|
||||||
}
|
}
|
||||||
|
|
||||||
func newPingClient(ctx context.Context, destination string, timeout time.Duration, handler string) *pingClient {
|
func newPingClient(ctx context.Context, destination string, timeout time.Duration, handler string, expectedResponseCode []int32) *pingClient {
|
||||||
return &pingClient{
|
return &pingClient{
|
||||||
destination: destination,
|
destination: destination,
|
||||||
httpClient: newHTTPClient(ctx, handler, timeout),
|
httpClient: newHTTPClient(ctx, handler, timeout),
|
||||||
|
expectedResponseCode: expectedResponseCode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newDirectPingClient(destination string, timeout time.Duration) *pingClient {
|
func newDirectPingClient(destination string, timeout time.Duration) *pingClient {
|
||||||
return &pingClient{
|
return &pingClient{
|
||||||
destination: destination,
|
destination: destination,
|
||||||
httpClient: &http.Client{Timeout: timeout},
|
httpClient: &http.Client{Timeout: timeout},
|
||||||
|
expectedResponseCode: []int32{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +56,7 @@ func newHTTPClient(ctxv context.Context, handler string, timeout time.Duration)
|
|||||||
// MeasureDelay returns the delay time of the request to dest
|
// MeasureDelay returns the delay time of the request to dest
|
||||||
func (s *pingClient) MeasureDelay() (time.Duration, error) {
|
func (s *pingClient) MeasureDelay() (time.Duration, error) {
|
||||||
if s.httpClient == nil {
|
if s.httpClient == nil {
|
||||||
panic("pingClient no initialized")
|
panic("pingClient not initialized")
|
||||||
}
|
}
|
||||||
req, err := http.NewRequest(http.MethodHead, s.destination, nil)
|
req, err := http.NewRequest(http.MethodHead, s.destination, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -63,6 +67,18 @@ func (s *pingClient) MeasureDelay() (time.Duration, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return rttFailed, err
|
return rttFailed, err
|
||||||
}
|
}
|
||||||
|
if len(s.expectedResponseCode) > 0 {
|
||||||
|
found := false
|
||||||
|
for _, c := range s.expectedResponseCode {
|
||||||
|
if c == int32(resp.StatusCode) {
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return rttFailed, errors.New("Unexpected response code: ", resp.StatusCode, " expected: ", s.expectedResponseCode)
|
||||||
|
}
|
||||||
|
}
|
||||||
// don't wait for body
|
// don't wait for body
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
return time.Since(start), nil
|
return time.Since(start), nil
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/observatory/command/command.proto
|
// source: app/observatory/command/command.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
@@ -29,11 +29,9 @@ type GetOutboundStatusRequest struct {
|
|||||||
|
|
||||||
func (x *GetOutboundStatusRequest) Reset() {
|
func (x *GetOutboundStatusRequest) Reset() {
|
||||||
*x = GetOutboundStatusRequest{}
|
*x = GetOutboundStatusRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_command_command_proto_msgTypes[0]
|
||||||
mi := &file_app_observatory_command_command_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetOutboundStatusRequest) String() string {
|
func (x *GetOutboundStatusRequest) String() string {
|
||||||
@@ -44,7 +42,7 @@ func (*GetOutboundStatusRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetOutboundStatusRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetOutboundStatusRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_command_command_proto_msgTypes[0]
|
mi := &file_app_observatory_command_command_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -69,11 +67,9 @@ type GetOutboundStatusResponse struct {
|
|||||||
|
|
||||||
func (x *GetOutboundStatusResponse) Reset() {
|
func (x *GetOutboundStatusResponse) Reset() {
|
||||||
*x = GetOutboundStatusResponse{}
|
*x = GetOutboundStatusResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_command_command_proto_msgTypes[1]
|
||||||
mi := &file_app_observatory_command_command_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetOutboundStatusResponse) String() string {
|
func (x *GetOutboundStatusResponse) String() string {
|
||||||
@@ -84,7 +80,7 @@ func (*GetOutboundStatusResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetOutboundStatusResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetOutboundStatusResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_command_command_proto_msgTypes[1]
|
mi := &file_app_observatory_command_command_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -114,11 +110,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_command_command_proto_msgTypes[2]
|
||||||
mi := &file_app_observatory_command_command_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -129,7 +123,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_command_command_proto_msgTypes[2]
|
mi := &file_app_observatory_command_command_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -219,44 +213,6 @@ func file_app_observatory_command_command_proto_init() {
|
|||||||
if File_app_observatory_command_command_proto != nil {
|
if File_app_observatory_command_command_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_observatory_command_command_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GetOutboundStatusRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_observatory_command_command_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GetOutboundStatusResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_observatory_command_command_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc v5.27.0
|
// - protoc v5.28.2
|
||||||
// source: app/observatory/command/command.proto
|
// source: app/observatory/command/command.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/observatory/config.proto
|
// source: app/observatory/config.proto
|
||||||
|
|
||||||
package observatory
|
package observatory
|
||||||
@@ -30,11 +30,9 @@ type ObservationResult struct {
|
|||||||
|
|
||||||
func (x *ObservationResult) Reset() {
|
func (x *ObservationResult) Reset() {
|
||||||
*x = ObservationResult{}
|
*x = ObservationResult{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_config_proto_msgTypes[0]
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ObservationResult) String() string {
|
func (x *ObservationResult) String() string {
|
||||||
@@ -45,7 +43,7 @@ func (*ObservationResult) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ObservationResult) ProtoReflect() protoreflect.Message {
|
func (x *ObservationResult) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[0]
|
mi := &file_app_observatory_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -82,11 +80,9 @@ type HealthPingMeasurementResult struct {
|
|||||||
|
|
||||||
func (x *HealthPingMeasurementResult) Reset() {
|
func (x *HealthPingMeasurementResult) Reset() {
|
||||||
*x = HealthPingMeasurementResult{}
|
*x = HealthPingMeasurementResult{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_config_proto_msgTypes[1]
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HealthPingMeasurementResult) String() string {
|
func (x *HealthPingMeasurementResult) String() string {
|
||||||
@@ -97,7 +93,7 @@ func (*HealthPingMeasurementResult) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *HealthPingMeasurementResult) ProtoReflect() protoreflect.Message {
|
func (x *HealthPingMeasurementResult) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[1]
|
mi := &file_app_observatory_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -183,11 +179,9 @@ type OutboundStatus struct {
|
|||||||
|
|
||||||
func (x *OutboundStatus) Reset() {
|
func (x *OutboundStatus) Reset() {
|
||||||
*x = OutboundStatus{}
|
*x = OutboundStatus{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_config_proto_msgTypes[2]
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OutboundStatus) String() string {
|
func (x *OutboundStatus) String() string {
|
||||||
@@ -198,7 +192,7 @@ func (*OutboundStatus) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *OutboundStatus) ProtoReflect() protoreflect.Message {
|
func (x *OutboundStatus) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[2]
|
mi := &file_app_observatory_config_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -281,11 +275,9 @@ type ProbeResult struct {
|
|||||||
|
|
||||||
func (x *ProbeResult) Reset() {
|
func (x *ProbeResult) Reset() {
|
||||||
*x = ProbeResult{}
|
*x = ProbeResult{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_config_proto_msgTypes[3]
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ProbeResult) String() string {
|
func (x *ProbeResult) String() string {
|
||||||
@@ -296,7 +288,7 @@ func (*ProbeResult) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ProbeResult) ProtoReflect() protoreflect.Message {
|
func (x *ProbeResult) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[3]
|
mi := &file_app_observatory_config_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -344,11 +336,9 @@ type Intensity struct {
|
|||||||
|
|
||||||
func (x *Intensity) Reset() {
|
func (x *Intensity) Reset() {
|
||||||
*x = Intensity{}
|
*x = Intensity{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_config_proto_msgTypes[4]
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Intensity) String() string {
|
func (x *Intensity) String() string {
|
||||||
@@ -359,7 +349,7 @@ func (*Intensity) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Intensity) ProtoReflect() protoreflect.Message {
|
func (x *Intensity) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[4]
|
mi := &file_app_observatory_config_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -395,11 +385,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_observatory_config_proto_msgTypes[5]
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -410,7 +398,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_observatory_config_proto_msgTypes[5]
|
mi := &file_app_observatory_config_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -559,80 +547,6 @@ func file_app_observatory_config_proto_init() {
|
|||||||
if File_app_observatory_config_proto != nil {
|
if File_app_observatory_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_observatory_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*ObservationResult); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_observatory_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*HealthPingMeasurementResult); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_observatory_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*OutboundStatus); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_observatory_config_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*ProbeResult); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_observatory_config_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Intensity); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_observatory_config_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,3 +1 @@
|
|||||||
package observatory
|
package observatory
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -73,6 +73,7 @@ func (p *Policy) ToCorePolicy() policy.Session {
|
|||||||
if p.Stats != nil {
|
if p.Stats != nil {
|
||||||
cp.Stats.UserUplink = p.Stats.UserUplink
|
cp.Stats.UserUplink = p.Stats.UserUplink
|
||||||
cp.Stats.UserDownlink = p.Stats.UserDownlink
|
cp.Stats.UserDownlink = p.Stats.UserDownlink
|
||||||
|
cp.Stats.UserOnline = p.Stats.UserOnline
|
||||||
}
|
}
|
||||||
if p.Buffer != nil {
|
if p.Buffer != nil {
|
||||||
cp.Buffer.PerConnection = p.Buffer.Connection
|
cp.Buffer.PerConnection = p.Buffer.Connection
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/policy/config.proto
|
// source: app/policy/config.proto
|
||||||
|
|
||||||
package policy
|
package policy
|
||||||
@@ -30,11 +30,9 @@ type Second struct {
|
|||||||
|
|
||||||
func (x *Second) Reset() {
|
func (x *Second) Reset() {
|
||||||
*x = Second{}
|
*x = Second{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_policy_config_proto_msgTypes[0]
|
||||||
mi := &file_app_policy_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Second) String() string {
|
func (x *Second) String() string {
|
||||||
@@ -45,7 +43,7 @@ func (*Second) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Second) ProtoReflect() protoreflect.Message {
|
func (x *Second) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_policy_config_proto_msgTypes[0]
|
mi := &file_app_policy_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -79,11 +77,9 @@ type Policy struct {
|
|||||||
|
|
||||||
func (x *Policy) Reset() {
|
func (x *Policy) Reset() {
|
||||||
*x = Policy{}
|
*x = Policy{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_policy_config_proto_msgTypes[1]
|
||||||
mi := &file_app_policy_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Policy) String() string {
|
func (x *Policy) String() string {
|
||||||
@@ -94,7 +90,7 @@ func (*Policy) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Policy) ProtoReflect() protoreflect.Message {
|
func (x *Policy) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_policy_config_proto_msgTypes[1]
|
mi := &file_app_policy_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -140,11 +136,9 @@ type SystemPolicy struct {
|
|||||||
|
|
||||||
func (x *SystemPolicy) Reset() {
|
func (x *SystemPolicy) Reset() {
|
||||||
*x = SystemPolicy{}
|
*x = SystemPolicy{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_policy_config_proto_msgTypes[2]
|
||||||
mi := &file_app_policy_config_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemPolicy) String() string {
|
func (x *SystemPolicy) String() string {
|
||||||
@@ -155,7 +149,7 @@ func (*SystemPolicy) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SystemPolicy) ProtoReflect() protoreflect.Message {
|
func (x *SystemPolicy) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_policy_config_proto_msgTypes[2]
|
mi := &file_app_policy_config_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -188,11 +182,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_policy_config_proto_msgTypes[3]
|
||||||
mi := &file_app_policy_config_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -203,7 +195,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_policy_config_proto_msgTypes[3]
|
mi := &file_app_policy_config_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -246,11 +238,9 @@ type Policy_Timeout struct {
|
|||||||
|
|
||||||
func (x *Policy_Timeout) Reset() {
|
func (x *Policy_Timeout) Reset() {
|
||||||
*x = Policy_Timeout{}
|
*x = Policy_Timeout{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_policy_config_proto_msgTypes[4]
|
||||||
mi := &file_app_policy_config_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Policy_Timeout) String() string {
|
func (x *Policy_Timeout) String() string {
|
||||||
@@ -261,7 +251,7 @@ func (*Policy_Timeout) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Policy_Timeout) ProtoReflect() protoreflect.Message {
|
func (x *Policy_Timeout) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_policy_config_proto_msgTypes[4]
|
mi := &file_app_policy_config_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -311,15 +301,14 @@ type Policy_Stats struct {
|
|||||||
|
|
||||||
UserUplink bool `protobuf:"varint,1,opt,name=user_uplink,json=userUplink,proto3" json:"user_uplink,omitempty"`
|
UserUplink bool `protobuf:"varint,1,opt,name=user_uplink,json=userUplink,proto3" json:"user_uplink,omitempty"`
|
||||||
UserDownlink bool `protobuf:"varint,2,opt,name=user_downlink,json=userDownlink,proto3" json:"user_downlink,omitempty"`
|
UserDownlink bool `protobuf:"varint,2,opt,name=user_downlink,json=userDownlink,proto3" json:"user_downlink,omitempty"`
|
||||||
|
UserOnline bool `protobuf:"varint,3,opt,name=user_online,json=userOnline,proto3" json:"user_online,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Policy_Stats) Reset() {
|
func (x *Policy_Stats) Reset() {
|
||||||
*x = Policy_Stats{}
|
*x = Policy_Stats{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_policy_config_proto_msgTypes[5]
|
||||||
mi := &file_app_policy_config_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Policy_Stats) String() string {
|
func (x *Policy_Stats) String() string {
|
||||||
@@ -330,7 +319,7 @@ func (*Policy_Stats) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Policy_Stats) ProtoReflect() protoreflect.Message {
|
func (x *Policy_Stats) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_policy_config_proto_msgTypes[5]
|
mi := &file_app_policy_config_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -359,6 +348,13 @@ func (x *Policy_Stats) GetUserDownlink() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Policy_Stats) GetUserOnline() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserOnline
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type Policy_Buffer struct {
|
type Policy_Buffer struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -370,11 +366,9 @@ type Policy_Buffer struct {
|
|||||||
|
|
||||||
func (x *Policy_Buffer) Reset() {
|
func (x *Policy_Buffer) Reset() {
|
||||||
*x = Policy_Buffer{}
|
*x = Policy_Buffer{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_policy_config_proto_msgTypes[6]
|
||||||
mi := &file_app_policy_config_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Policy_Buffer) String() string {
|
func (x *Policy_Buffer) String() string {
|
||||||
@@ -385,7 +379,7 @@ func (*Policy_Buffer) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Policy_Buffer) ProtoReflect() protoreflect.Message {
|
func (x *Policy_Buffer) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_policy_config_proto_msgTypes[6]
|
mi := &file_app_policy_config_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -420,11 +414,9 @@ type SystemPolicy_Stats struct {
|
|||||||
|
|
||||||
func (x *SystemPolicy_Stats) Reset() {
|
func (x *SystemPolicy_Stats) Reset() {
|
||||||
*x = SystemPolicy_Stats{}
|
*x = SystemPolicy_Stats{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_policy_config_proto_msgTypes[7]
|
||||||
mi := &file_app_policy_config_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemPolicy_Stats) String() string {
|
func (x *SystemPolicy_Stats) String() string {
|
||||||
@@ -435,7 +427,7 @@ func (*SystemPolicy_Stats) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SystemPolicy_Stats) ProtoReflect() protoreflect.Message {
|
func (x *SystemPolicy_Stats) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_policy_config_proto_msgTypes[7]
|
mi := &file_app_policy_config_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -485,7 +477,7 @@ var file_app_policy_config_proto_rawDesc = []byte{
|
|||||||
0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x78, 0x72, 0x61, 0x79, 0x2e,
|
0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x78, 0x72, 0x61, 0x79, 0x2e,
|
||||||
0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x1e, 0x0a, 0x06, 0x53, 0x65,
|
0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x1e, 0x0a, 0x06, 0x53, 0x65,
|
||||||
0x63, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20,
|
0x63, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa6, 0x04, 0x0a, 0x06, 0x50,
|
0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc7, 0x04, 0x0a, 0x06, 0x50,
|
||||||
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x39, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
|
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x39, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70,
|
||||||
0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e,
|
0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e,
|
||||||
@@ -512,49 +504,51 @@ var file_app_policy_config_proto_rawDesc = []byte{
|
|||||||
0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20,
|
0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70,
|
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70,
|
||||||
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x52, 0x0c, 0x64, 0x6f,
|
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x52, 0x0c, 0x64, 0x6f,
|
||||||
0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0x4d, 0x0a, 0x05, 0x53, 0x74,
|
0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0x6e, 0x0a, 0x05, 0x53, 0x74,
|
||||||
0x61, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x6c, 0x69,
|
0x61, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x6c, 0x69,
|
||||||
0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x55, 0x70,
|
0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x55, 0x70,
|
||||||
0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x77,
|
0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x77,
|
||||||
0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65,
|
0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65,
|
||||||
0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x1a, 0x28, 0x0a, 0x06, 0x42, 0x75, 0x66,
|
0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65,
|
||||||
0x66, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
0x72, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
|
||||||
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
|
0x75, 0x73, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x1a, 0x28, 0x0a, 0x06, 0x42, 0x75,
|
||||||
0x69, 0x6f, 0x6e, 0x22, 0xfb, 0x01, 0x0a, 0x0c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f,
|
0x66, 0x66, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
|
||||||
0x6c, 0x69, 0x63, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20,
|
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70,
|
0x74, 0x69, 0x6f, 0x6e, 0x22, 0xfb, 0x01, 0x0a, 0x0c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50,
|
||||||
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f, 0x6c, 0x69,
|
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01,
|
||||||
0x63, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e,
|
||||||
0xaf, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x62,
|
0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f, 0x6c,
|
||||||
0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x69, 0x63, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73,
|
||||||
0x08, 0x52, 0x0d, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b,
|
0x1a, 0xaf, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e,
|
||||||
0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e,
|
0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x62, 0x6f,
|
0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x55, 0x70, 0x6c, 0x69, 0x6e,
|
||||||
0x75, 0x6e, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x27, 0x0a, 0x0f, 0x6f,
|
0x6b, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x64, 0x6f, 0x77,
|
||||||
0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03,
|
0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x62,
|
||||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x55, 0x70,
|
0x6f, 0x75, 0x6e, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x27, 0x0a, 0x0f,
|
||||||
0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64,
|
0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x18,
|
||||||
0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
|
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x55,
|
||||||
0x10, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e,
|
0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e,
|
||||||
0x6b, 0x22, 0xcc, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x05,
|
0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
|
||||||
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x72,
|
0x52, 0x10, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69,
|
||||||
0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f,
|
0x6e, 0x6b, 0x22, 0xcc, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a,
|
||||||
0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78,
|
||||||
0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70,
|
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50,
|
0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||||
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x1a, 0x51, 0x0a,
|
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61,
|
||||||
0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a,
|
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x1a, 0x51,
|
||||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x78,
|
0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50,
|
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d,
|
||||||
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||||
0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70,
|
0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e,
|
||||||
0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75,
|
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d,
|
0x01, 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70,
|
||||||
0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0xaa,
|
0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68,
|
||||||
0x02, 0x0f, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63,
|
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79,
|
||||||
0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
|
||||||
|
0xaa, 0x02, 0x0f, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69,
|
||||||
|
0x63, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -605,104 +599,6 @@ func file_app_policy_config_proto_init() {
|
|||||||
if File_app_policy_config_proto != nil {
|
if File_app_policy_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_policy_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Second); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_policy_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Policy); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_policy_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SystemPolicy); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_policy_config_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_policy_config_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Policy_Timeout); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_policy_config_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Policy_Stats); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_policy_config_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Policy_Buffer); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_policy_config_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SystemPolicy_Stats); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -22,6 +22,7 @@ message Policy {
|
|||||||
message Stats {
|
message Stats {
|
||||||
bool user_uplink = 1;
|
bool user_uplink = 1;
|
||||||
bool user_downlink = 2;
|
bool user_downlink = 2;
|
||||||
|
bool user_online = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Buffer {
|
message Buffer {
|
||||||
|
@@ -1,4 +1,2 @@
|
|||||||
// Package policy is an implementation of policy.Manager feature.
|
// Package policy is an implementation of policy.Manager feature.
|
||||||
package policy
|
package policy
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -5,6 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/xtls/xray-core/common"
|
"github.com/xtls/xray-core/common"
|
||||||
"github.com/xtls/xray-core/common/errors"
|
"github.com/xtls/xray-core/common/errors"
|
||||||
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/core"
|
"github.com/xtls/xray-core/core"
|
||||||
"github.com/xtls/xray-core/features/inbound"
|
"github.com/xtls/xray-core/features/inbound"
|
||||||
"github.com/xtls/xray-core/features/outbound"
|
"github.com/xtls/xray-core/features/outbound"
|
||||||
@@ -98,6 +99,46 @@ func (s *handlerServer) AlterInbound(ctx context.Context, request *AlterInboundR
|
|||||||
return &AlterInboundResponse{}, operation.ApplyInbound(ctx, handler)
|
return &AlterInboundResponse{}, operation.ApplyInbound(ctx, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *handlerServer) GetInboundUsers(ctx context.Context, request *GetInboundUserRequest) (*GetInboundUserResponse, error) {
|
||||||
|
handler, err := s.ihm.GetHandler(ctx, request.Tag)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.New("failed to get handler: ", request.Tag).Base(err)
|
||||||
|
}
|
||||||
|
p, err := getInbound(handler)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
um, ok := p.(proxy.UserManager)
|
||||||
|
if !ok {
|
||||||
|
return nil, errors.New("proxy is not a UserManager")
|
||||||
|
}
|
||||||
|
if len(request.Email) > 0 {
|
||||||
|
return &GetInboundUserResponse{Users: []*protocol.User{protocol.ToProtoUser(um.GetUser(ctx, request.Email))}}, nil
|
||||||
|
}
|
||||||
|
var result = make([]*protocol.User, 0, 100)
|
||||||
|
users := um.GetUsers(ctx)
|
||||||
|
for _, u := range users {
|
||||||
|
result = append(result, protocol.ToProtoUser(u))
|
||||||
|
}
|
||||||
|
return &GetInboundUserResponse{Users: result}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *handlerServer) GetInboundUsersCount(ctx context.Context, request *GetInboundUserRequest) (*GetInboundUsersCountResponse, error) {
|
||||||
|
handler, err := s.ihm.GetHandler(ctx, request.Tag)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.New("failed to get handler: ", request.Tag).Base(err)
|
||||||
|
}
|
||||||
|
p, err := getInbound(handler)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
um, ok := p.(proxy.UserManager)
|
||||||
|
if !ok {
|
||||||
|
return nil, errors.New("proxy is not a UserManager")
|
||||||
|
}
|
||||||
|
return &GetInboundUsersCountResponse{Count: um.GetUsersCount(ctx)}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *handlerServer) AddOutbound(ctx context.Context, request *AddOutboundRequest) (*AddOutboundResponse, error) {
|
func (s *handlerServer) AddOutbound(ctx context.Context, request *AddOutboundRequest) (*AddOutboundResponse, error) {
|
||||||
if err := core.AddOutboundHandler(s.s, request.Outbound); err != nil {
|
if err := core.AddOutboundHandler(s.s, request.Outbound); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -37,6 +37,19 @@ message AlterInboundRequest {
|
|||||||
|
|
||||||
message AlterInboundResponse {}
|
message AlterInboundResponse {}
|
||||||
|
|
||||||
|
message GetInboundUserRequest {
|
||||||
|
string tag = 1;
|
||||||
|
string email = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetInboundUserResponse {
|
||||||
|
repeated xray.common.protocol.User users = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetInboundUsersCountResponse {
|
||||||
|
int64 count = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message AddOutboundRequest {
|
message AddOutboundRequest {
|
||||||
core.OutboundHandlerConfig outbound = 1;
|
core.OutboundHandlerConfig outbound = 1;
|
||||||
}
|
}
|
||||||
@@ -63,6 +76,10 @@ service HandlerService {
|
|||||||
|
|
||||||
rpc AlterInbound(AlterInboundRequest) returns (AlterInboundResponse) {}
|
rpc AlterInbound(AlterInboundRequest) returns (AlterInboundResponse) {}
|
||||||
|
|
||||||
|
rpc GetInboundUsers(GetInboundUserRequest) returns (GetInboundUserResponse) {}
|
||||||
|
|
||||||
|
rpc GetInboundUsersCount(GetInboundUserRequest) returns (GetInboundUsersCountResponse) {}
|
||||||
|
|
||||||
rpc AddOutbound(AddOutboundRequest) returns (AddOutboundResponse) {}
|
rpc AddOutbound(AddOutboundRequest) returns (AddOutboundResponse) {}
|
||||||
|
|
||||||
rpc RemoveOutbound(RemoveOutboundRequest) returns (RemoveOutboundResponse) {}
|
rpc RemoveOutbound(RemoveOutboundRequest) returns (RemoveOutboundResponse) {}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc v5.27.0
|
// - protoc v5.28.2
|
||||||
// source: app/proxyman/command/command.proto
|
// source: app/proxyman/command/command.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
@@ -19,12 +19,14 @@ import (
|
|||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
HandlerService_AddInbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AddInbound"
|
HandlerService_AddInbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AddInbound"
|
||||||
HandlerService_RemoveInbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/RemoveInbound"
|
HandlerService_RemoveInbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/RemoveInbound"
|
||||||
HandlerService_AlterInbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AlterInbound"
|
HandlerService_AlterInbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AlterInbound"
|
||||||
HandlerService_AddOutbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AddOutbound"
|
HandlerService_GetInboundUsers_FullMethodName = "/xray.app.proxyman.command.HandlerService/GetInboundUsers"
|
||||||
HandlerService_RemoveOutbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/RemoveOutbound"
|
HandlerService_GetInboundUsersCount_FullMethodName = "/xray.app.proxyman.command.HandlerService/GetInboundUsersCount"
|
||||||
HandlerService_AlterOutbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AlterOutbound"
|
HandlerService_AddOutbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AddOutbound"
|
||||||
|
HandlerService_RemoveOutbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/RemoveOutbound"
|
||||||
|
HandlerService_AlterOutbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AlterOutbound"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandlerServiceClient is the client API for HandlerService service.
|
// HandlerServiceClient is the client API for HandlerService service.
|
||||||
@@ -34,6 +36,8 @@ type HandlerServiceClient interface {
|
|||||||
AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error)
|
AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error)
|
||||||
RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error)
|
RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error)
|
||||||
AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error)
|
AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error)
|
||||||
|
GetInboundUsers(ctx context.Context, in *GetInboundUserRequest, opts ...grpc.CallOption) (*GetInboundUserResponse, error)
|
||||||
|
GetInboundUsersCount(ctx context.Context, in *GetInboundUserRequest, opts ...grpc.CallOption) (*GetInboundUsersCountResponse, error)
|
||||||
AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error)
|
AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error)
|
||||||
RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error)
|
RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error)
|
||||||
AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error)
|
AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error)
|
||||||
@@ -77,6 +81,26 @@ func (c *handlerServiceClient) AlterInbound(ctx context.Context, in *AlterInboun
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *handlerServiceClient) GetInboundUsers(ctx context.Context, in *GetInboundUserRequest, opts ...grpc.CallOption) (*GetInboundUserResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetInboundUserResponse)
|
||||||
|
err := c.cc.Invoke(ctx, HandlerService_GetInboundUsers_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *handlerServiceClient) GetInboundUsersCount(ctx context.Context, in *GetInboundUserRequest, opts ...grpc.CallOption) (*GetInboundUsersCountResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetInboundUsersCountResponse)
|
||||||
|
err := c.cc.Invoke(ctx, HandlerService_GetInboundUsersCount_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *handlerServiceClient) AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error) {
|
func (c *handlerServiceClient) AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(AddOutboundResponse)
|
out := new(AddOutboundResponse)
|
||||||
@@ -114,6 +138,8 @@ type HandlerServiceServer interface {
|
|||||||
AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error)
|
AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error)
|
||||||
RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error)
|
RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error)
|
||||||
AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error)
|
AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error)
|
||||||
|
GetInboundUsers(context.Context, *GetInboundUserRequest) (*GetInboundUserResponse, error)
|
||||||
|
GetInboundUsersCount(context.Context, *GetInboundUserRequest) (*GetInboundUsersCountResponse, error)
|
||||||
AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error)
|
AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error)
|
||||||
RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error)
|
RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error)
|
||||||
AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error)
|
AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error)
|
||||||
@@ -136,6 +162,12 @@ func (UnimplementedHandlerServiceServer) RemoveInbound(context.Context, *RemoveI
|
|||||||
func (UnimplementedHandlerServiceServer) AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) {
|
func (UnimplementedHandlerServiceServer) AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method AlterInbound not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method AlterInbound not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedHandlerServiceServer) GetInboundUsers(context.Context, *GetInboundUserRequest) (*GetInboundUserResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetInboundUsers not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedHandlerServiceServer) GetInboundUsersCount(context.Context, *GetInboundUserRequest) (*GetInboundUsersCountResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetInboundUsersCount not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedHandlerServiceServer) AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) {
|
func (UnimplementedHandlerServiceServer) AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method AddOutbound not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method AddOutbound not implemented")
|
||||||
}
|
}
|
||||||
@@ -220,6 +252,42 @@ func _HandlerService_AlterInbound_Handler(srv interface{}, ctx context.Context,
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _HandlerService_GetInboundUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetInboundUserRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(HandlerServiceServer).GetInboundUsers(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: HandlerService_GetInboundUsers_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(HandlerServiceServer).GetInboundUsers(ctx, req.(*GetInboundUserRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _HandlerService_GetInboundUsersCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetInboundUserRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(HandlerServiceServer).GetInboundUsersCount(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: HandlerService_GetInboundUsersCount_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(HandlerServiceServer).GetInboundUsersCount(ctx, req.(*GetInboundUserRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _HandlerService_AddOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _HandlerService_AddOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(AddOutboundRequest)
|
in := new(AddOutboundRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@@ -293,6 +361,14 @@ var HandlerService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "AlterInbound",
|
MethodName: "AlterInbound",
|
||||||
Handler: _HandlerService_AlterInbound_Handler,
|
Handler: _HandlerService_AlterInbound_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetInboundUsers",
|
||||||
|
Handler: _HandlerService_GetInboundUsers_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetInboundUsersCount",
|
||||||
|
Handler: _HandlerService_GetInboundUsersCount_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "AddOutbound",
|
MethodName: "AddOutbound",
|
||||||
Handler: _HandlerService_AddOutbound_Handler,
|
Handler: _HandlerService_AddOutbound_Handler,
|
||||||
|
@@ -1,3 +1 @@
|
|||||||
package command
|
package command
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.28.0
|
// protoc v5.28.2
|
||||||
// source: app/proxyman/config.proto
|
// source: app/proxyman/config.proto
|
||||||
|
|
||||||
package proxyman
|
package proxyman
|
||||||
@@ -83,11 +83,9 @@ type InboundConfig struct {
|
|||||||
|
|
||||||
func (x *InboundConfig) Reset() {
|
func (x *InboundConfig) Reset() {
|
||||||
*x = InboundConfig{}
|
*x = InboundConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[0]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *InboundConfig) String() string {
|
func (x *InboundConfig) String() string {
|
||||||
@@ -98,7 +96,7 @@ func (*InboundConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *InboundConfig) ProtoReflect() protoreflect.Message {
|
func (x *InboundConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[0]
|
mi := &file_app_proxyman_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -129,11 +127,9 @@ type AllocationStrategy struct {
|
|||||||
|
|
||||||
func (x *AllocationStrategy) Reset() {
|
func (x *AllocationStrategy) Reset() {
|
||||||
*x = AllocationStrategy{}
|
*x = AllocationStrategy{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[1]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AllocationStrategy) String() string {
|
func (x *AllocationStrategy) String() string {
|
||||||
@@ -144,7 +140,7 @@ func (*AllocationStrategy) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AllocationStrategy) ProtoReflect() protoreflect.Message {
|
func (x *AllocationStrategy) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[1]
|
mi := &file_app_proxyman_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -200,11 +196,9 @@ type SniffingConfig struct {
|
|||||||
|
|
||||||
func (x *SniffingConfig) Reset() {
|
func (x *SniffingConfig) Reset() {
|
||||||
*x = SniffingConfig{}
|
*x = SniffingConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[2]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SniffingConfig) String() string {
|
func (x *SniffingConfig) String() string {
|
||||||
@@ -215,7 +209,7 @@ func (*SniffingConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SniffingConfig) ProtoReflect() protoreflect.Message {
|
func (x *SniffingConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[2]
|
mi := &file_app_proxyman_config_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -282,11 +276,9 @@ type ReceiverConfig struct {
|
|||||||
|
|
||||||
func (x *ReceiverConfig) Reset() {
|
func (x *ReceiverConfig) Reset() {
|
||||||
*x = ReceiverConfig{}
|
*x = ReceiverConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[3]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReceiverConfig) String() string {
|
func (x *ReceiverConfig) String() string {
|
||||||
@@ -297,7 +289,7 @@ func (*ReceiverConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ReceiverConfig) ProtoReflect() protoreflect.Message {
|
func (x *ReceiverConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[3]
|
mi := &file_app_proxyman_config_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -366,11 +358,9 @@ type InboundHandlerConfig struct {
|
|||||||
|
|
||||||
func (x *InboundHandlerConfig) Reset() {
|
func (x *InboundHandlerConfig) Reset() {
|
||||||
*x = InboundHandlerConfig{}
|
*x = InboundHandlerConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[4]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *InboundHandlerConfig) String() string {
|
func (x *InboundHandlerConfig) String() string {
|
||||||
@@ -381,7 +371,7 @@ func (*InboundHandlerConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message {
|
func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[4]
|
mi := &file_app_proxyman_config_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -425,11 +415,9 @@ type OutboundConfig struct {
|
|||||||
|
|
||||||
func (x *OutboundConfig) Reset() {
|
func (x *OutboundConfig) Reset() {
|
||||||
*x = OutboundConfig{}
|
*x = OutboundConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[5]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OutboundConfig) String() string {
|
func (x *OutboundConfig) String() string {
|
||||||
@@ -440,7 +428,7 @@ func (*OutboundConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *OutboundConfig) ProtoReflect() protoreflect.Message {
|
func (x *OutboundConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[5]
|
mi := &file_app_proxyman_config_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -470,11 +458,9 @@ type SenderConfig struct {
|
|||||||
|
|
||||||
func (x *SenderConfig) Reset() {
|
func (x *SenderConfig) Reset() {
|
||||||
*x = SenderConfig{}
|
*x = SenderConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[6]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SenderConfig) String() string {
|
func (x *SenderConfig) String() string {
|
||||||
@@ -485,7 +471,7 @@ func (*SenderConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SenderConfig) ProtoReflect() protoreflect.Message {
|
func (x *SenderConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[6]
|
mi := &file_app_proxyman_config_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -552,11 +538,9 @@ type MultiplexingConfig struct {
|
|||||||
|
|
||||||
func (x *MultiplexingConfig) Reset() {
|
func (x *MultiplexingConfig) Reset() {
|
||||||
*x = MultiplexingConfig{}
|
*x = MultiplexingConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[7]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MultiplexingConfig) String() string {
|
func (x *MultiplexingConfig) String() string {
|
||||||
@@ -567,7 +551,7 @@ func (*MultiplexingConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *MultiplexingConfig) ProtoReflect() protoreflect.Message {
|
func (x *MultiplexingConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[7]
|
mi := &file_app_proxyman_config_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -620,11 +604,9 @@ type AllocationStrategy_AllocationStrategyConcurrency struct {
|
|||||||
|
|
||||||
func (x *AllocationStrategy_AllocationStrategyConcurrency) Reset() {
|
func (x *AllocationStrategy_AllocationStrategyConcurrency) Reset() {
|
||||||
*x = AllocationStrategy_AllocationStrategyConcurrency{}
|
*x = AllocationStrategy_AllocationStrategyConcurrency{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[8]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[8]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AllocationStrategy_AllocationStrategyConcurrency) String() string {
|
func (x *AllocationStrategy_AllocationStrategyConcurrency) String() string {
|
||||||
@@ -635,7 +617,7 @@ func (*AllocationStrategy_AllocationStrategyConcurrency) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AllocationStrategy_AllocationStrategyConcurrency) ProtoReflect() protoreflect.Message {
|
func (x *AllocationStrategy_AllocationStrategyConcurrency) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[8]
|
mi := &file_app_proxyman_config_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -667,11 +649,9 @@ type AllocationStrategy_AllocationStrategyRefresh struct {
|
|||||||
|
|
||||||
func (x *AllocationStrategy_AllocationStrategyRefresh) Reset() {
|
func (x *AllocationStrategy_AllocationStrategyRefresh) Reset() {
|
||||||
*x = AllocationStrategy_AllocationStrategyRefresh{}
|
*x = AllocationStrategy_AllocationStrategyRefresh{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_proxyman_config_proto_msgTypes[9]
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[9]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AllocationStrategy_AllocationStrategyRefresh) String() string {
|
func (x *AllocationStrategy_AllocationStrategyRefresh) String() string {
|
||||||
@@ -682,7 +662,7 @@ func (*AllocationStrategy_AllocationStrategyRefresh) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AllocationStrategy_AllocationStrategyRefresh) ProtoReflect() protoreflect.Message {
|
func (x *AllocationStrategy_AllocationStrategyRefresh) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proxyman_config_proto_msgTypes[9]
|
mi := &file_app_proxyman_config_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -898,128 +878,6 @@ func file_app_proxyman_config_proto_init() {
|
|||||||
if File_app_proxyman_config_proto != nil {
|
if File_app_proxyman_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_proxyman_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*InboundConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*AllocationStrategy); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SniffingConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*ReceiverConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*InboundHandlerConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*OutboundConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SenderConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*MultiplexingConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*AllocationStrategy_AllocationStrategyConcurrency); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_proxyman_config_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*AllocationStrategy_AllocationStrategyRefresh); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package inbound
|
package inbound
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -15,7 +13,7 @@ import (
|
|||||||
"github.com/xtls/xray-core/features/inbound"
|
"github.com/xtls/xray-core/features/inbound"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Manager is to manage all inbound handlers.
|
// Manager manages all inbound handlers.
|
||||||
type Manager struct {
|
type Manager struct {
|
||||||
access sync.RWMutex
|
access sync.RWMutex
|
||||||
untaggedHandler []inbound.Handler
|
untaggedHandler []inbound.Handler
|
||||||
|
@@ -464,7 +464,8 @@ func (w *dsWorker) callback(conn stat.Connection) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx = session.ContextWithInbound(ctx, &session.Inbound{
|
ctx = session.ContextWithInbound(ctx, &session.Inbound{
|
||||||
Source: net.DestinationFromAddr(conn.RemoteAddr()),
|
// Unix have no source addr, so we use gateway as source for log.
|
||||||
|
Source: net.UnixDestination(w.address),
|
||||||
Gateway: net.UnixDestination(w.address),
|
Gateway: net.UnixDestination(w.address),
|
||||||
Tag: w.tag,
|
Tag: w.tag,
|
||||||
Conn: conn,
|
Conn: conn,
|
||||||
|
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/xtls/xray-core/app/proxyman"
|
"github.com/xtls/xray-core/app/proxyman"
|
||||||
"github.com/xtls/xray-core/common"
|
"github.com/xtls/xray-core/common"
|
||||||
"github.com/xtls/xray-core/common/errors"
|
|
||||||
"github.com/xtls/xray-core/common/buf"
|
"github.com/xtls/xray-core/common/buf"
|
||||||
|
"github.com/xtls/xray-core/common/errors"
|
||||||
"github.com/xtls/xray-core/common/mux"
|
"github.com/xtls/xray-core/common/mux"
|
||||||
"github.com/xtls/xray-core/common/net"
|
"github.com/xtls/xray-core/common/net"
|
||||||
"github.com/xtls/xray-core/common/net/cnc"
|
"github.com/xtls/xray-core/common/net/cnc"
|
||||||
@@ -54,7 +54,7 @@ func getStatCounter(v *core.Instance, tag string) (stats.Counter, stats.Counter)
|
|||||||
return uplinkCounter, downlinkCounter
|
return uplinkCounter, downlinkCounter
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handler is an implements of outbound.Handler.
|
// Handler implements outbound.Handler.
|
||||||
type Handler struct {
|
type Handler struct {
|
||||||
tag string
|
tag string
|
||||||
senderSettings *proxyman.SenderConfig
|
senderSettings *proxyman.SenderConfig
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package outbound
|
package outbound
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"sort"
|
"sort"
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/reverse/config.proto
|
// source: app/reverse/config.proto
|
||||||
|
|
||||||
package reverse
|
package reverse
|
||||||
@@ -77,11 +77,9 @@ type Control struct {
|
|||||||
|
|
||||||
func (x *Control) Reset() {
|
func (x *Control) Reset() {
|
||||||
*x = Control{}
|
*x = Control{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_reverse_config_proto_msgTypes[0]
|
||||||
mi := &file_app_reverse_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Control) String() string {
|
func (x *Control) String() string {
|
||||||
@@ -92,7 +90,7 @@ func (*Control) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Control) ProtoReflect() protoreflect.Message {
|
func (x *Control) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_reverse_config_proto_msgTypes[0]
|
mi := &file_app_reverse_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -132,11 +130,9 @@ type BridgeConfig struct {
|
|||||||
|
|
||||||
func (x *BridgeConfig) Reset() {
|
func (x *BridgeConfig) Reset() {
|
||||||
*x = BridgeConfig{}
|
*x = BridgeConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_reverse_config_proto_msgTypes[1]
|
||||||
mi := &file_app_reverse_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BridgeConfig) String() string {
|
func (x *BridgeConfig) String() string {
|
||||||
@@ -147,7 +143,7 @@ func (*BridgeConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *BridgeConfig) ProtoReflect() protoreflect.Message {
|
func (x *BridgeConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_reverse_config_proto_msgTypes[1]
|
mi := &file_app_reverse_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -187,11 +183,9 @@ type PortalConfig struct {
|
|||||||
|
|
||||||
func (x *PortalConfig) Reset() {
|
func (x *PortalConfig) Reset() {
|
||||||
*x = PortalConfig{}
|
*x = PortalConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_reverse_config_proto_msgTypes[2]
|
||||||
mi := &file_app_reverse_config_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PortalConfig) String() string {
|
func (x *PortalConfig) String() string {
|
||||||
@@ -202,7 +196,7 @@ func (*PortalConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *PortalConfig) ProtoReflect() protoreflect.Message {
|
func (x *PortalConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_reverse_config_proto_msgTypes[2]
|
mi := &file_app_reverse_config_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -242,11 +236,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_reverse_config_proto_msgTypes[3]
|
||||||
mi := &file_app_reverse_config_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -257,7 +249,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_reverse_config_proto_msgTypes[3]
|
mi := &file_app_reverse_config_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -361,56 +353,6 @@ func file_app_reverse_config_proto_init() {
|
|||||||
if File_app_reverse_config_proto != nil {
|
if File_app_reverse_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_reverse_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Control); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_reverse_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*BridgeConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_reverse_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*PortalConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_reverse_config_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package reverse
|
package reverse
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package command
|
package command
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/router/command/command.proto
|
// source: app/router/command/command.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
@@ -46,11 +46,9 @@ type RoutingContext struct {
|
|||||||
|
|
||||||
func (x *RoutingContext) Reset() {
|
func (x *RoutingContext) Reset() {
|
||||||
*x = RoutingContext{}
|
*x = RoutingContext{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[0]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RoutingContext) String() string {
|
func (x *RoutingContext) String() string {
|
||||||
@@ -61,7 +59,7 @@ func (*RoutingContext) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RoutingContext) ProtoReflect() protoreflect.Message {
|
func (x *RoutingContext) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[0]
|
mi := &file_app_router_command_command_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -188,11 +186,9 @@ type SubscribeRoutingStatsRequest struct {
|
|||||||
|
|
||||||
func (x *SubscribeRoutingStatsRequest) Reset() {
|
func (x *SubscribeRoutingStatsRequest) Reset() {
|
||||||
*x = SubscribeRoutingStatsRequest{}
|
*x = SubscribeRoutingStatsRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[1]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SubscribeRoutingStatsRequest) String() string {
|
func (x *SubscribeRoutingStatsRequest) String() string {
|
||||||
@@ -203,7 +199,7 @@ func (*SubscribeRoutingStatsRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SubscribeRoutingStatsRequest) ProtoReflect() protoreflect.Message {
|
func (x *SubscribeRoutingStatsRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[1]
|
mi := &file_app_router_command_command_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -244,11 +240,9 @@ type TestRouteRequest struct {
|
|||||||
|
|
||||||
func (x *TestRouteRequest) Reset() {
|
func (x *TestRouteRequest) Reset() {
|
||||||
*x = TestRouteRequest{}
|
*x = TestRouteRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[2]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TestRouteRequest) String() string {
|
func (x *TestRouteRequest) String() string {
|
||||||
@@ -259,7 +253,7 @@ func (*TestRouteRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *TestRouteRequest) ProtoReflect() protoreflect.Message {
|
func (x *TestRouteRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[2]
|
mi := &file_app_router_command_command_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -305,11 +299,9 @@ type PrincipleTargetInfo struct {
|
|||||||
|
|
||||||
func (x *PrincipleTargetInfo) Reset() {
|
func (x *PrincipleTargetInfo) Reset() {
|
||||||
*x = PrincipleTargetInfo{}
|
*x = PrincipleTargetInfo{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[3]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PrincipleTargetInfo) String() string {
|
func (x *PrincipleTargetInfo) String() string {
|
||||||
@@ -320,7 +312,7 @@ func (*PrincipleTargetInfo) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *PrincipleTargetInfo) ProtoReflect() protoreflect.Message {
|
func (x *PrincipleTargetInfo) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[3]
|
mi := &file_app_router_command_command_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -352,11 +344,9 @@ type OverrideInfo struct {
|
|||||||
|
|
||||||
func (x *OverrideInfo) Reset() {
|
func (x *OverrideInfo) Reset() {
|
||||||
*x = OverrideInfo{}
|
*x = OverrideInfo{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[4]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OverrideInfo) String() string {
|
func (x *OverrideInfo) String() string {
|
||||||
@@ -367,7 +357,7 @@ func (*OverrideInfo) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *OverrideInfo) ProtoReflect() protoreflect.Message {
|
func (x *OverrideInfo) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[4]
|
mi := &file_app_router_command_command_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -400,11 +390,9 @@ type BalancerMsg struct {
|
|||||||
|
|
||||||
func (x *BalancerMsg) Reset() {
|
func (x *BalancerMsg) Reset() {
|
||||||
*x = BalancerMsg{}
|
*x = BalancerMsg{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[5]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BalancerMsg) String() string {
|
func (x *BalancerMsg) String() string {
|
||||||
@@ -415,7 +403,7 @@ func (*BalancerMsg) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *BalancerMsg) ProtoReflect() protoreflect.Message {
|
func (x *BalancerMsg) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[5]
|
mi := &file_app_router_command_command_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -454,11 +442,9 @@ type GetBalancerInfoRequest struct {
|
|||||||
|
|
||||||
func (x *GetBalancerInfoRequest) Reset() {
|
func (x *GetBalancerInfoRequest) Reset() {
|
||||||
*x = GetBalancerInfoRequest{}
|
*x = GetBalancerInfoRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[6]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetBalancerInfoRequest) String() string {
|
func (x *GetBalancerInfoRequest) String() string {
|
||||||
@@ -469,7 +455,7 @@ func (*GetBalancerInfoRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetBalancerInfoRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetBalancerInfoRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[6]
|
mi := &file_app_router_command_command_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -501,11 +487,9 @@ type GetBalancerInfoResponse struct {
|
|||||||
|
|
||||||
func (x *GetBalancerInfoResponse) Reset() {
|
func (x *GetBalancerInfoResponse) Reset() {
|
||||||
*x = GetBalancerInfoResponse{}
|
*x = GetBalancerInfoResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[7]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetBalancerInfoResponse) String() string {
|
func (x *GetBalancerInfoResponse) String() string {
|
||||||
@@ -516,7 +500,7 @@ func (*GetBalancerInfoResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetBalancerInfoResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetBalancerInfoResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[7]
|
mi := &file_app_router_command_command_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -549,11 +533,9 @@ type OverrideBalancerTargetRequest struct {
|
|||||||
|
|
||||||
func (x *OverrideBalancerTargetRequest) Reset() {
|
func (x *OverrideBalancerTargetRequest) Reset() {
|
||||||
*x = OverrideBalancerTargetRequest{}
|
*x = OverrideBalancerTargetRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[8]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[8]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OverrideBalancerTargetRequest) String() string {
|
func (x *OverrideBalancerTargetRequest) String() string {
|
||||||
@@ -564,7 +546,7 @@ func (*OverrideBalancerTargetRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *OverrideBalancerTargetRequest) ProtoReflect() protoreflect.Message {
|
func (x *OverrideBalancerTargetRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[8]
|
mi := &file_app_router_command_command_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -601,11 +583,9 @@ type OverrideBalancerTargetResponse struct {
|
|||||||
|
|
||||||
func (x *OverrideBalancerTargetResponse) Reset() {
|
func (x *OverrideBalancerTargetResponse) Reset() {
|
||||||
*x = OverrideBalancerTargetResponse{}
|
*x = OverrideBalancerTargetResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[9]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[9]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OverrideBalancerTargetResponse) String() string {
|
func (x *OverrideBalancerTargetResponse) String() string {
|
||||||
@@ -616,7 +596,7 @@ func (*OverrideBalancerTargetResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *OverrideBalancerTargetResponse) ProtoReflect() protoreflect.Message {
|
func (x *OverrideBalancerTargetResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[9]
|
mi := &file_app_router_command_command_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -642,11 +622,9 @@ type AddRuleRequest struct {
|
|||||||
|
|
||||||
func (x *AddRuleRequest) Reset() {
|
func (x *AddRuleRequest) Reset() {
|
||||||
*x = AddRuleRequest{}
|
*x = AddRuleRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[10]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[10]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AddRuleRequest) String() string {
|
func (x *AddRuleRequest) String() string {
|
||||||
@@ -657,7 +635,7 @@ func (*AddRuleRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AddRuleRequest) ProtoReflect() protoreflect.Message {
|
func (x *AddRuleRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[10]
|
mi := &file_app_router_command_command_proto_msgTypes[10]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -694,11 +672,9 @@ type AddRuleResponse struct {
|
|||||||
|
|
||||||
func (x *AddRuleResponse) Reset() {
|
func (x *AddRuleResponse) Reset() {
|
||||||
*x = AddRuleResponse{}
|
*x = AddRuleResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[11]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[11]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AddRuleResponse) String() string {
|
func (x *AddRuleResponse) String() string {
|
||||||
@@ -709,7 +685,7 @@ func (*AddRuleResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AddRuleResponse) ProtoReflect() protoreflect.Message {
|
func (x *AddRuleResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[11]
|
mi := &file_app_router_command_command_proto_msgTypes[11]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -734,11 +710,9 @@ type RemoveRuleRequest struct {
|
|||||||
|
|
||||||
func (x *RemoveRuleRequest) Reset() {
|
func (x *RemoveRuleRequest) Reset() {
|
||||||
*x = RemoveRuleRequest{}
|
*x = RemoveRuleRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[12]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[12]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveRuleRequest) String() string {
|
func (x *RemoveRuleRequest) String() string {
|
||||||
@@ -749,7 +723,7 @@ func (*RemoveRuleRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RemoveRuleRequest) ProtoReflect() protoreflect.Message {
|
func (x *RemoveRuleRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[12]
|
mi := &file_app_router_command_command_proto_msgTypes[12]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -779,11 +753,9 @@ type RemoveRuleResponse struct {
|
|||||||
|
|
||||||
func (x *RemoveRuleResponse) Reset() {
|
func (x *RemoveRuleResponse) Reset() {
|
||||||
*x = RemoveRuleResponse{}
|
*x = RemoveRuleResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[13]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[13]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveRuleResponse) String() string {
|
func (x *RemoveRuleResponse) String() string {
|
||||||
@@ -794,7 +766,7 @@ func (*RemoveRuleResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RemoveRuleResponse) ProtoReflect() protoreflect.Message {
|
func (x *RemoveRuleResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[13]
|
mi := &file_app_router_command_command_proto_msgTypes[13]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -817,11 +789,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_command_command_proto_msgTypes[14]
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[14]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -832,7 +802,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_command_command_proto_msgTypes[14]
|
mi := &file_app_router_command_command_proto_msgTypes[14]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -1071,188 +1041,6 @@ func file_app_router_command_command_proto_init() {
|
|||||||
if File_app_router_command_command_proto != nil {
|
if File_app_router_command_command_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_router_command_command_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*RoutingContext); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SubscribeRoutingStatsRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*TestRouteRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*PrincipleTargetInfo); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*OverrideInfo); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*BalancerMsg); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GetBalancerInfoRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GetBalancerInfoResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*OverrideBalancerTargetRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*OverrideBalancerTargetResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[10].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*AddRuleRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[11].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*AddRuleResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[12].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*RemoveRuleRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[13].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*RemoveRuleResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_command_command_proto_msgTypes[14].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc v5.27.0
|
// - protoc v5.28.2
|
||||||
// source: app/router/command/command.proto
|
// source: app/router/command/command.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
@@ -202,7 +202,7 @@ func NewUserMatcher(users []string) *UserMatcher {
|
|||||||
for _, user := range users {
|
for _, user := range users {
|
||||||
if len(user) > 0 {
|
if len(user) > 0 {
|
||||||
if len(user) > 7 && strings.HasPrefix(user, "regexp:") {
|
if len(user) > 7 && strings.HasPrefix(user, "regexp:") {
|
||||||
if re, err := regexp.Compile(user[7:]); err != nil {
|
if re, err := regexp.Compile(user[7:]); err == nil {
|
||||||
patternsCopy = append(patternsCopy, re)
|
patternsCopy = append(patternsCopy, re)
|
||||||
}
|
}
|
||||||
// Items of users slice with an invalid regexp syntax are ignored.
|
// Items of users slice with an invalid regexp syntax are ignored.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.28.0
|
// protoc v5.28.2
|
||||||
// source: app/router/config.proto
|
// source: app/router/config.proto
|
||||||
|
|
||||||
package router
|
package router
|
||||||
@@ -151,11 +151,9 @@ type Domain struct {
|
|||||||
|
|
||||||
func (x *Domain) Reset() {
|
func (x *Domain) Reset() {
|
||||||
*x = Domain{}
|
*x = Domain{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[0]
|
||||||
mi := &file_app_router_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Domain) String() string {
|
func (x *Domain) String() string {
|
||||||
@@ -166,7 +164,7 @@ func (*Domain) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Domain) ProtoReflect() protoreflect.Message {
|
func (x *Domain) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[0]
|
mi := &file_app_router_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -216,11 +214,9 @@ type CIDR struct {
|
|||||||
|
|
||||||
func (x *CIDR) Reset() {
|
func (x *CIDR) Reset() {
|
||||||
*x = CIDR{}
|
*x = CIDR{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[1]
|
||||||
mi := &file_app_router_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CIDR) String() string {
|
func (x *CIDR) String() string {
|
||||||
@@ -231,7 +227,7 @@ func (*CIDR) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *CIDR) ProtoReflect() protoreflect.Message {
|
func (x *CIDR) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[1]
|
mi := &file_app_router_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -272,11 +268,9 @@ type GeoIP struct {
|
|||||||
|
|
||||||
func (x *GeoIP) Reset() {
|
func (x *GeoIP) Reset() {
|
||||||
*x = GeoIP{}
|
*x = GeoIP{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[2]
|
||||||
mi := &file_app_router_config_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GeoIP) String() string {
|
func (x *GeoIP) String() string {
|
||||||
@@ -287,7 +281,7 @@ func (*GeoIP) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GeoIP) ProtoReflect() protoreflect.Message {
|
func (x *GeoIP) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[2]
|
mi := &file_app_router_config_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -333,11 +327,9 @@ type GeoIPList struct {
|
|||||||
|
|
||||||
func (x *GeoIPList) Reset() {
|
func (x *GeoIPList) Reset() {
|
||||||
*x = GeoIPList{}
|
*x = GeoIPList{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[3]
|
||||||
mi := &file_app_router_config_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GeoIPList) String() string {
|
func (x *GeoIPList) String() string {
|
||||||
@@ -348,7 +340,7 @@ func (*GeoIPList) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GeoIPList) ProtoReflect() protoreflect.Message {
|
func (x *GeoIPList) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[3]
|
mi := &file_app_router_config_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -381,11 +373,9 @@ type GeoSite struct {
|
|||||||
|
|
||||||
func (x *GeoSite) Reset() {
|
func (x *GeoSite) Reset() {
|
||||||
*x = GeoSite{}
|
*x = GeoSite{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[4]
|
||||||
mi := &file_app_router_config_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GeoSite) String() string {
|
func (x *GeoSite) String() string {
|
||||||
@@ -396,7 +386,7 @@ func (*GeoSite) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GeoSite) ProtoReflect() protoreflect.Message {
|
func (x *GeoSite) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[4]
|
mi := &file_app_router_config_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -435,11 +425,9 @@ type GeoSiteList struct {
|
|||||||
|
|
||||||
func (x *GeoSiteList) Reset() {
|
func (x *GeoSiteList) Reset() {
|
||||||
*x = GeoSiteList{}
|
*x = GeoSiteList{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[5]
|
||||||
mi := &file_app_router_config_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GeoSiteList) String() string {
|
func (x *GeoSiteList) String() string {
|
||||||
@@ -450,7 +438,7 @@ func (*GeoSiteList) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GeoSiteList) ProtoReflect() protoreflect.Message {
|
func (x *GeoSiteList) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[5]
|
mi := &file_app_router_config_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -508,11 +496,9 @@ type RoutingRule struct {
|
|||||||
|
|
||||||
func (x *RoutingRule) Reset() {
|
func (x *RoutingRule) Reset() {
|
||||||
*x = RoutingRule{}
|
*x = RoutingRule{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[6]
|
||||||
mi := &file_app_router_config_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RoutingRule) String() string {
|
func (x *RoutingRule) String() string {
|
||||||
@@ -523,7 +509,7 @@ func (*RoutingRule) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RoutingRule) ProtoReflect() protoreflect.Message {
|
func (x *RoutingRule) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[6]
|
mi := &file_app_router_config_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -675,11 +661,9 @@ type BalancingRule struct {
|
|||||||
|
|
||||||
func (x *BalancingRule) Reset() {
|
func (x *BalancingRule) Reset() {
|
||||||
*x = BalancingRule{}
|
*x = BalancingRule{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[7]
|
||||||
mi := &file_app_router_config_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BalancingRule) String() string {
|
func (x *BalancingRule) String() string {
|
||||||
@@ -690,7 +674,7 @@ func (*BalancingRule) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *BalancingRule) ProtoReflect() protoreflect.Message {
|
func (x *BalancingRule) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[7]
|
mi := &file_app_router_config_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -752,11 +736,9 @@ type StrategyWeight struct {
|
|||||||
|
|
||||||
func (x *StrategyWeight) Reset() {
|
func (x *StrategyWeight) Reset() {
|
||||||
*x = StrategyWeight{}
|
*x = StrategyWeight{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[8]
|
||||||
mi := &file_app_router_config_proto_msgTypes[8]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StrategyWeight) String() string {
|
func (x *StrategyWeight) String() string {
|
||||||
@@ -767,7 +749,7 @@ func (*StrategyWeight) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *StrategyWeight) ProtoReflect() protoreflect.Message {
|
func (x *StrategyWeight) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[8]
|
mi := &file_app_router_config_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -822,11 +804,9 @@ type StrategyLeastLoadConfig struct {
|
|||||||
|
|
||||||
func (x *StrategyLeastLoadConfig) Reset() {
|
func (x *StrategyLeastLoadConfig) Reset() {
|
||||||
*x = StrategyLeastLoadConfig{}
|
*x = StrategyLeastLoadConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[9]
|
||||||
mi := &file_app_router_config_proto_msgTypes[9]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StrategyLeastLoadConfig) String() string {
|
func (x *StrategyLeastLoadConfig) String() string {
|
||||||
@@ -837,7 +817,7 @@ func (*StrategyLeastLoadConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *StrategyLeastLoadConfig) ProtoReflect() protoreflect.Message {
|
func (x *StrategyLeastLoadConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[9]
|
mi := &file_app_router_config_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -899,11 +879,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[10]
|
||||||
mi := &file_app_router_config_proto_msgTypes[10]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -914,7 +892,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[10]
|
mi := &file_app_router_config_proto_msgTypes[10]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -965,11 +943,9 @@ type Domain_Attribute struct {
|
|||||||
|
|
||||||
func (x *Domain_Attribute) Reset() {
|
func (x *Domain_Attribute) Reset() {
|
||||||
*x = Domain_Attribute{}
|
*x = Domain_Attribute{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_router_config_proto_msgTypes[11]
|
||||||
mi := &file_app_router_config_proto_msgTypes[11]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Domain_Attribute) String() string {
|
func (x *Domain_Attribute) String() string {
|
||||||
@@ -980,7 +956,7 @@ func (*Domain_Attribute) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Domain_Attribute) ProtoReflect() protoreflect.Message {
|
func (x *Domain_Attribute) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_router_config_proto_msgTypes[11]
|
mi := &file_app_router_config_proto_msgTypes[11]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -1261,152 +1237,6 @@ func file_app_router_config_proto_init() {
|
|||||||
if File_app_router_config_proto != nil {
|
if File_app_router_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_router_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Domain); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*CIDR); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GeoIP); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GeoIPList); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GeoSite); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GeoSiteList); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*RoutingRule); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*BalancingRule); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*StrategyWeight); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*StrategyLeastLoadConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[10].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[11].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Domain_Attribute); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_router_config_proto_msgTypes[6].OneofWrappers = []any{
|
file_app_router_config_proto_msgTypes[6].OneofWrappers = []any{
|
||||||
(*RoutingRule_Tag)(nil),
|
(*RoutingRule_Tag)(nil),
|
||||||
(*RoutingRule_BalancingTag)(nil),
|
(*RoutingRule_BalancingTag)(nil),
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
sync "sync"
|
sync "sync"
|
||||||
|
@@ -7,64 +7,64 @@ import (
|
|||||||
/*
|
/*
|
||||||
Split into multiple package, need to be tested separately
|
Split into multiple package, need to be tested separately
|
||||||
|
|
||||||
func TestSelectLeastLoad(t *testing.T) {
|
func TestSelectLeastLoad(t *testing.T) {
|
||||||
settings := &StrategyLeastLoadConfig{
|
settings := &StrategyLeastLoadConfig{
|
||||||
HealthCheck: &HealthPingConfig{
|
HealthCheck: &HealthPingConfig{
|
||||||
SamplingCount: 10,
|
SamplingCount: 10,
|
||||||
},
|
},
|
||||||
Expected: 1,
|
Expected: 1,
|
||||||
MaxRTT: int64(time.Millisecond * time.Duration(800)),
|
MaxRTT: int64(time.Millisecond * time.Duration(800)),
|
||||||
|
}
|
||||||
|
strategy := NewLeastLoadStrategy(settings)
|
||||||
|
// std 40
|
||||||
|
strategy.PutResult("a", time.Millisecond*time.Duration(60))
|
||||||
|
strategy.PutResult("a", time.Millisecond*time.Duration(140))
|
||||||
|
strategy.PutResult("a", time.Millisecond*time.Duration(60))
|
||||||
|
strategy.PutResult("a", time.Millisecond*time.Duration(140))
|
||||||
|
// std 60
|
||||||
|
strategy.PutResult("b", time.Millisecond*time.Duration(40))
|
||||||
|
strategy.PutResult("b", time.Millisecond*time.Duration(160))
|
||||||
|
strategy.PutResult("b", time.Millisecond*time.Duration(40))
|
||||||
|
strategy.PutResult("b", time.Millisecond*time.Duration(160))
|
||||||
|
// std 0, but >MaxRTT
|
||||||
|
strategy.PutResult("c", time.Millisecond*time.Duration(1000))
|
||||||
|
strategy.PutResult("c", time.Millisecond*time.Duration(1000))
|
||||||
|
strategy.PutResult("c", time.Millisecond*time.Duration(1000))
|
||||||
|
strategy.PutResult("c", time.Millisecond*time.Duration(1000))
|
||||||
|
expected := "a"
|
||||||
|
actual := strategy.SelectAndPick([]string{"a", "b", "c", "untested"})
|
||||||
|
if actual != expected {
|
||||||
|
t.Errorf("expected: %v, actual: %v", expected, actual)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
strategy := NewLeastLoadStrategy(settings)
|
|
||||||
// std 40
|
|
||||||
strategy.PutResult("a", time.Millisecond*time.Duration(60))
|
|
||||||
strategy.PutResult("a", time.Millisecond*time.Duration(140))
|
|
||||||
strategy.PutResult("a", time.Millisecond*time.Duration(60))
|
|
||||||
strategy.PutResult("a", time.Millisecond*time.Duration(140))
|
|
||||||
// std 60
|
|
||||||
strategy.PutResult("b", time.Millisecond*time.Duration(40))
|
|
||||||
strategy.PutResult("b", time.Millisecond*time.Duration(160))
|
|
||||||
strategy.PutResult("b", time.Millisecond*time.Duration(40))
|
|
||||||
strategy.PutResult("b", time.Millisecond*time.Duration(160))
|
|
||||||
// std 0, but >MaxRTT
|
|
||||||
strategy.PutResult("c", time.Millisecond*time.Duration(1000))
|
|
||||||
strategy.PutResult("c", time.Millisecond*time.Duration(1000))
|
|
||||||
strategy.PutResult("c", time.Millisecond*time.Duration(1000))
|
|
||||||
strategy.PutResult("c", time.Millisecond*time.Duration(1000))
|
|
||||||
expected := "a"
|
|
||||||
actual := strategy.SelectAndPick([]string{"a", "b", "c", "untested"})
|
|
||||||
if actual != expected {
|
|
||||||
t.Errorf("expected: %v, actual: %v", expected, actual)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestSelectLeastLoadWithCost(t *testing.T) {
|
func TestSelectLeastLoadWithCost(t *testing.T) {
|
||||||
settings := &StrategyLeastLoadConfig{
|
settings := &StrategyLeastLoadConfig{
|
||||||
HealthCheck: &HealthPingConfig{
|
HealthCheck: &HealthPingConfig{
|
||||||
SamplingCount: 10,
|
SamplingCount: 10,
|
||||||
},
|
},
|
||||||
Costs: []*StrategyWeight{
|
Costs: []*StrategyWeight{
|
||||||
{Match: "a", Value: 9},
|
{Match: "a", Value: 9},
|
||||||
},
|
},
|
||||||
Expected: 1,
|
Expected: 1,
|
||||||
|
}
|
||||||
|
strategy := NewLeastLoadStrategy(settings, nil)
|
||||||
|
// std 40, std+c 120
|
||||||
|
strategy.PutResult("a", time.Millisecond*time.Duration(60))
|
||||||
|
strategy.PutResult("a", time.Millisecond*time.Duration(140))
|
||||||
|
strategy.PutResult("a", time.Millisecond*time.Duration(60))
|
||||||
|
strategy.PutResult("a", time.Millisecond*time.Duration(140))
|
||||||
|
// std 60
|
||||||
|
strategy.PutResult("b", time.Millisecond*time.Duration(40))
|
||||||
|
strategy.PutResult("b", time.Millisecond*time.Duration(160))
|
||||||
|
strategy.PutResult("b", time.Millisecond*time.Duration(40))
|
||||||
|
strategy.PutResult("b", time.Millisecond*time.Duration(160))
|
||||||
|
expected := "b"
|
||||||
|
actual := strategy.SelectAndPick([]string{"a", "b", "untested"})
|
||||||
|
if actual != expected {
|
||||||
|
t.Errorf("expected: %v, actual: %v", expected, actual)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
strategy := NewLeastLoadStrategy(settings, nil)
|
|
||||||
// std 40, std+c 120
|
|
||||||
strategy.PutResult("a", time.Millisecond*time.Duration(60))
|
|
||||||
strategy.PutResult("a", time.Millisecond*time.Duration(140))
|
|
||||||
strategy.PutResult("a", time.Millisecond*time.Duration(60))
|
|
||||||
strategy.PutResult("a", time.Millisecond*time.Duration(140))
|
|
||||||
// std 60
|
|
||||||
strategy.PutResult("b", time.Millisecond*time.Duration(40))
|
|
||||||
strategy.PutResult("b", time.Millisecond*time.Duration(160))
|
|
||||||
strategy.PutResult("b", time.Millisecond*time.Duration(40))
|
|
||||||
strategy.PutResult("b", time.Millisecond*time.Duration(160))
|
|
||||||
expected := "b"
|
|
||||||
actual := strategy.SelectAndPick([]string{"a", "b", "untested"})
|
|
||||||
if actual != expected {
|
|
||||||
t.Errorf("expected: %v, actual: %v", expected, actual)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
func TestSelectLeastExpected(t *testing.T) {
|
func TestSelectLeastExpected(t *testing.T) {
|
||||||
strategy := &LeastLoadStrategy{
|
strategy := &LeastLoadStrategy{
|
||||||
|
@@ -11,7 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// RandomStrategy represents a random balancing strategy
|
// RandomStrategy represents a random balancing strategy
|
||||||
type RandomStrategy struct{
|
type RandomStrategy struct {
|
||||||
FallbackTag string
|
FallbackTag string
|
||||||
|
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package command
|
package command
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"runtime"
|
"runtime"
|
||||||
@@ -48,6 +46,20 @@ func (s *statsServer) GetStats(ctx context.Context, request *GetStatsRequest) (*
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *statsServer) GetStatsOnline(ctx context.Context, request *GetStatsRequest) (*GetStatsResponse, error) {
|
||||||
|
c := s.stats.GetOnlineMap(request.Name)
|
||||||
|
if c == nil {
|
||||||
|
return nil, errors.New(request.Name, " not found.")
|
||||||
|
}
|
||||||
|
value := int64(c.Count())
|
||||||
|
return &GetStatsResponse{
|
||||||
|
Stat: &Stat{
|
||||||
|
Name: request.Name,
|
||||||
|
Value: value,
|
||||||
|
},
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *statsServer) QueryStats(ctx context.Context, request *QueryStatsRequest) (*QueryStatsResponse, error) {
|
func (s *statsServer) QueryStats(ctx context.Context, request *QueryStatsRequest) (*QueryStatsResponse, error) {
|
||||||
matcher, err := strmatcher.Substr.New(request.Pattern)
|
matcher, err := strmatcher.Substr.New(request.Pattern)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/stats/command/command.proto
|
// source: app/stats/command/command.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
@@ -33,11 +33,9 @@ type GetStatsRequest struct {
|
|||||||
|
|
||||||
func (x *GetStatsRequest) Reset() {
|
func (x *GetStatsRequest) Reset() {
|
||||||
*x = GetStatsRequest{}
|
*x = GetStatsRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_command_command_proto_msgTypes[0]
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetStatsRequest) String() string {
|
func (x *GetStatsRequest) String() string {
|
||||||
@@ -48,7 +46,7 @@ func (*GetStatsRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetStatsRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetStatsRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[0]
|
mi := &file_app_stats_command_command_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -88,11 +86,9 @@ type Stat struct {
|
|||||||
|
|
||||||
func (x *Stat) Reset() {
|
func (x *Stat) Reset() {
|
||||||
*x = Stat{}
|
*x = Stat{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_command_command_proto_msgTypes[1]
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Stat) String() string {
|
func (x *Stat) String() string {
|
||||||
@@ -103,7 +99,7 @@ func (*Stat) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Stat) ProtoReflect() protoreflect.Message {
|
func (x *Stat) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[1]
|
mi := &file_app_stats_command_command_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -142,11 +138,9 @@ type GetStatsResponse struct {
|
|||||||
|
|
||||||
func (x *GetStatsResponse) Reset() {
|
func (x *GetStatsResponse) Reset() {
|
||||||
*x = GetStatsResponse{}
|
*x = GetStatsResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_command_command_proto_msgTypes[2]
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetStatsResponse) String() string {
|
func (x *GetStatsResponse) String() string {
|
||||||
@@ -157,7 +151,7 @@ func (*GetStatsResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetStatsResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetStatsResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[2]
|
mi := &file_app_stats_command_command_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -190,11 +184,9 @@ type QueryStatsRequest struct {
|
|||||||
|
|
||||||
func (x *QueryStatsRequest) Reset() {
|
func (x *QueryStatsRequest) Reset() {
|
||||||
*x = QueryStatsRequest{}
|
*x = QueryStatsRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_command_command_proto_msgTypes[3]
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *QueryStatsRequest) String() string {
|
func (x *QueryStatsRequest) String() string {
|
||||||
@@ -205,7 +197,7 @@ func (*QueryStatsRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *QueryStatsRequest) ProtoReflect() protoreflect.Message {
|
func (x *QueryStatsRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[3]
|
mi := &file_app_stats_command_command_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -244,11 +236,9 @@ type QueryStatsResponse struct {
|
|||||||
|
|
||||||
func (x *QueryStatsResponse) Reset() {
|
func (x *QueryStatsResponse) Reset() {
|
||||||
*x = QueryStatsResponse{}
|
*x = QueryStatsResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_command_command_proto_msgTypes[4]
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *QueryStatsResponse) String() string {
|
func (x *QueryStatsResponse) String() string {
|
||||||
@@ -259,7 +249,7 @@ func (*QueryStatsResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *QueryStatsResponse) ProtoReflect() protoreflect.Message {
|
func (x *QueryStatsResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[4]
|
mi := &file_app_stats_command_command_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -289,11 +279,9 @@ type SysStatsRequest struct {
|
|||||||
|
|
||||||
func (x *SysStatsRequest) Reset() {
|
func (x *SysStatsRequest) Reset() {
|
||||||
*x = SysStatsRequest{}
|
*x = SysStatsRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_command_command_proto_msgTypes[5]
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SysStatsRequest) String() string {
|
func (x *SysStatsRequest) String() string {
|
||||||
@@ -304,7 +292,7 @@ func (*SysStatsRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SysStatsRequest) ProtoReflect() protoreflect.Message {
|
func (x *SysStatsRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[5]
|
mi := &file_app_stats_command_command_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -338,11 +326,9 @@ type SysStatsResponse struct {
|
|||||||
|
|
||||||
func (x *SysStatsResponse) Reset() {
|
func (x *SysStatsResponse) Reset() {
|
||||||
*x = SysStatsResponse{}
|
*x = SysStatsResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_command_command_proto_msgTypes[6]
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SysStatsResponse) String() string {
|
func (x *SysStatsResponse) String() string {
|
||||||
@@ -353,7 +339,7 @@ func (*SysStatsResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SysStatsResponse) ProtoReflect() protoreflect.Message {
|
func (x *SysStatsResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[6]
|
mi := &file_app_stats_command_command_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -446,11 +432,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_command_command_proto_msgTypes[7]
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -461,7 +445,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_command_command_proto_msgTypes[7]
|
mi := &file_app_stats_command_command_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -522,7 +506,7 @@ var file_app_stats_command_command_proto_rawDesc = []byte{
|
|||||||
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x50,
|
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x50,
|
||||||
0x61, 0x75, 0x73, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x55,
|
0x61, 0x75, 0x73, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x55,
|
||||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x55, 0x70, 0x74,
|
0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x55, 0x70, 0x74,
|
||||||
0x69, 0x6d, 0x65, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0xba, 0x02,
|
0x69, 0x6d, 0x65, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0xa1, 0x03,
|
||||||
0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f,
|
0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f,
|
||||||
0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x78, 0x72, 0x61,
|
0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x78, 0x72, 0x61,
|
||||||
0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||||
@@ -530,26 +514,32 @@ var file_app_stats_command_command_proto_rawDesc = []byte{
|
|||||||
0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73,
|
0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73,
|
||||||
0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74,
|
0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74,
|
||||||
0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||||
0x65, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x29, 0x2e,
|
0x65, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e,
|
||||||
0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63,
|
0x65, 0x12, 0x27, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61,
|
||||||
0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74,
|
0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74,
|
||||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e,
|
0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x72, 0x61,
|
||||||
0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
|
0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||||
0x64, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
|
0x61, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73,
|
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53,
|
||||||
0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70,
|
0x74, 0x61, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e,
|
||||||
|
0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51, 0x75,
|
||||||
|
0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||||
|
0x2a, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73,
|
||||||
|
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74,
|
||||||
|
0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a,
|
||||||
|
0x0b, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x78,
|
||||||
|
0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f,
|
||||||
|
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70,
|
||||||
0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53,
|
0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53,
|
||||||
0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28,
|
0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||||
0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e,
|
0x00, 0x42, 0x64, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70,
|
||||||
0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73,
|
0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x64, 0x0a, 0x1a, 0x63, 0x6f,
|
0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74,
|
||||||
0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73,
|
0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70,
|
||||||
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68,
|
0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02,
|
||||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79,
|
0x16, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e,
|
||||||
0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f,
|
0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x16, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x41,
|
|
||||||
0x70, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
|
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -579,13 +569,15 @@ var file_app_stats_command_command_proto_depIdxs = []int32{
|
|||||||
1, // 0: xray.app.stats.command.GetStatsResponse.stat:type_name -> xray.app.stats.command.Stat
|
1, // 0: xray.app.stats.command.GetStatsResponse.stat:type_name -> xray.app.stats.command.Stat
|
||||||
1, // 1: xray.app.stats.command.QueryStatsResponse.stat:type_name -> xray.app.stats.command.Stat
|
1, // 1: xray.app.stats.command.QueryStatsResponse.stat:type_name -> xray.app.stats.command.Stat
|
||||||
0, // 2: xray.app.stats.command.StatsService.GetStats:input_type -> xray.app.stats.command.GetStatsRequest
|
0, // 2: xray.app.stats.command.StatsService.GetStats:input_type -> xray.app.stats.command.GetStatsRequest
|
||||||
3, // 3: xray.app.stats.command.StatsService.QueryStats:input_type -> xray.app.stats.command.QueryStatsRequest
|
0, // 3: xray.app.stats.command.StatsService.GetStatsOnline:input_type -> xray.app.stats.command.GetStatsRequest
|
||||||
5, // 4: xray.app.stats.command.StatsService.GetSysStats:input_type -> xray.app.stats.command.SysStatsRequest
|
3, // 4: xray.app.stats.command.StatsService.QueryStats:input_type -> xray.app.stats.command.QueryStatsRequest
|
||||||
2, // 5: xray.app.stats.command.StatsService.GetStats:output_type -> xray.app.stats.command.GetStatsResponse
|
5, // 5: xray.app.stats.command.StatsService.GetSysStats:input_type -> xray.app.stats.command.SysStatsRequest
|
||||||
4, // 6: xray.app.stats.command.StatsService.QueryStats:output_type -> xray.app.stats.command.QueryStatsResponse
|
2, // 6: xray.app.stats.command.StatsService.GetStats:output_type -> xray.app.stats.command.GetStatsResponse
|
||||||
6, // 7: xray.app.stats.command.StatsService.GetSysStats:output_type -> xray.app.stats.command.SysStatsResponse
|
2, // 7: xray.app.stats.command.StatsService.GetStatsOnline:output_type -> xray.app.stats.command.GetStatsResponse
|
||||||
5, // [5:8] is the sub-list for method output_type
|
4, // 8: xray.app.stats.command.StatsService.QueryStats:output_type -> xray.app.stats.command.QueryStatsResponse
|
||||||
2, // [2:5] is the sub-list for method input_type
|
6, // 9: xray.app.stats.command.StatsService.GetSysStats:output_type -> xray.app.stats.command.SysStatsResponse
|
||||||
|
6, // [6:10] is the sub-list for method output_type
|
||||||
|
2, // [2:6] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
2, // [2:2] is the sub-list for extension extendee
|
||||||
0, // [0:2] is the sub-list for field type_name
|
0, // [0:2] is the sub-list for field type_name
|
||||||
@@ -596,104 +588,6 @@ func file_app_stats_command_command_proto_init() {
|
|||||||
if File_app_stats_command_command_proto != nil {
|
if File_app_stats_command_command_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_stats_command_command_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GetStatsRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_stats_command_command_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Stat); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_stats_command_command_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*GetStatsResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_stats_command_command_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*QueryStatsRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_stats_command_command_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*QueryStatsResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_stats_command_command_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SysStatsRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_stats_command_command_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SysStatsResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_stats_command_command_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -48,6 +48,7 @@ message SysStatsResponse {
|
|||||||
|
|
||||||
service StatsService {
|
service StatsService {
|
||||||
rpc GetStats(GetStatsRequest) returns (GetStatsResponse) {}
|
rpc GetStats(GetStatsRequest) returns (GetStatsResponse) {}
|
||||||
|
rpc GetStatsOnline(GetStatsRequest) returns (GetStatsResponse) {}
|
||||||
rpc QueryStats(QueryStatsRequest) returns (QueryStatsResponse) {}
|
rpc QueryStats(QueryStatsRequest) returns (QueryStatsResponse) {}
|
||||||
rpc GetSysStats(SysStatsRequest) returns (SysStatsResponse) {}
|
rpc GetSysStats(SysStatsRequest) returns (SysStatsResponse) {}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc v5.27.0
|
// - protoc v5.28.2
|
||||||
// source: app/stats/command/command.proto
|
// source: app/stats/command/command.proto
|
||||||
|
|
||||||
package command
|
package command
|
||||||
@@ -19,9 +19,10 @@ import (
|
|||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
StatsService_GetStats_FullMethodName = "/xray.app.stats.command.StatsService/GetStats"
|
StatsService_GetStats_FullMethodName = "/xray.app.stats.command.StatsService/GetStats"
|
||||||
StatsService_QueryStats_FullMethodName = "/xray.app.stats.command.StatsService/QueryStats"
|
StatsService_GetStatsOnline_FullMethodName = "/xray.app.stats.command.StatsService/GetStatsOnline"
|
||||||
StatsService_GetSysStats_FullMethodName = "/xray.app.stats.command.StatsService/GetSysStats"
|
StatsService_QueryStats_FullMethodName = "/xray.app.stats.command.StatsService/QueryStats"
|
||||||
|
StatsService_GetSysStats_FullMethodName = "/xray.app.stats.command.StatsService/GetSysStats"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StatsServiceClient is the client API for StatsService service.
|
// StatsServiceClient is the client API for StatsService service.
|
||||||
@@ -29,6 +30,7 @@ const (
|
|||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
type StatsServiceClient interface {
|
type StatsServiceClient interface {
|
||||||
GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
|
GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
|
||||||
|
GetStatsOnline(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
|
||||||
QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error)
|
QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error)
|
||||||
GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error)
|
GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error)
|
||||||
}
|
}
|
||||||
@@ -51,6 +53,16 @@ func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest,
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *statsServiceClient) GetStatsOnline(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetStatsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, StatsService_GetStatsOnline_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) {
|
func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(QueryStatsResponse)
|
out := new(QueryStatsResponse)
|
||||||
@@ -76,6 +88,7 @@ func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsReques
|
|||||||
// for forward compatibility.
|
// for forward compatibility.
|
||||||
type StatsServiceServer interface {
|
type StatsServiceServer interface {
|
||||||
GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
|
GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
|
||||||
|
GetStatsOnline(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
|
||||||
QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error)
|
QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error)
|
||||||
GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error)
|
GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error)
|
||||||
mustEmbedUnimplementedStatsServiceServer()
|
mustEmbedUnimplementedStatsServiceServer()
|
||||||
@@ -91,6 +104,9 @@ type UnimplementedStatsServiceServer struct{}
|
|||||||
func (UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
|
func (UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedStatsServiceServer) GetStatsOnline(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetStatsOnline not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedStatsServiceServer) QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) {
|
func (UnimplementedStatsServiceServer) QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented")
|
||||||
}
|
}
|
||||||
@@ -136,6 +152,24 @@ func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec fu
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _StatsService_GetStatsOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetStatsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(StatsServiceServer).GetStatsOnline(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: StatsService_GetStatsOnline_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(StatsServiceServer).GetStatsOnline(ctx, req.(*GetStatsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _StatsService_QueryStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _StatsService_QueryStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(QueryStatsRequest)
|
in := new(QueryStatsRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@@ -183,6 +217,10 @@ var StatsService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GetStats",
|
MethodName: "GetStats",
|
||||||
Handler: _StatsService_GetStats_Handler,
|
Handler: _StatsService_GetStats_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetStatsOnline",
|
||||||
|
Handler: _StatsService_GetStatsOnline_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "QueryStats",
|
MethodName: "QueryStats",
|
||||||
Handler: _StatsService_QueryStats_Handler,
|
Handler: _StatsService_QueryStats_Handler,
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: app/stats/config.proto
|
// source: app/stats/config.proto
|
||||||
|
|
||||||
package stats
|
package stats
|
||||||
@@ -28,11 +28,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_config_proto_msgTypes[0]
|
||||||
mi := &file_app_stats_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -43,7 +41,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_config_proto_msgTypes[0]
|
mi := &file_app_stats_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -70,11 +68,9 @@ type ChannelConfig struct {
|
|||||||
|
|
||||||
func (x *ChannelConfig) Reset() {
|
func (x *ChannelConfig) Reset() {
|
||||||
*x = ChannelConfig{}
|
*x = ChannelConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_app_stats_config_proto_msgTypes[1]
|
||||||
mi := &file_app_stats_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ChannelConfig) String() string {
|
func (x *ChannelConfig) String() string {
|
||||||
@@ -85,7 +81,7 @@ func (*ChannelConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ChannelConfig) ProtoReflect() protoreflect.Message {
|
func (x *ChannelConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_stats_config_proto_msgTypes[1]
|
mi := &file_app_stats_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -172,32 +168,6 @@ func file_app_stats_config_proto_init() {
|
|||||||
if File_app_stats_config_proto != nil {
|
if File_app_stats_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_app_stats_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_app_stats_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*ChannelConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
80
app/stats/online_map.go
Normal file
80
app/stats/online_map.go
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
package stats
|
||||||
|
|
||||||
|
import (
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// OnlineMap is an implementation of stats.OnlineMap.
|
||||||
|
type OnlineMap struct {
|
||||||
|
value int
|
||||||
|
ipList map[string]time.Time
|
||||||
|
access sync.RWMutex
|
||||||
|
lastCleanup time.Time
|
||||||
|
cleanupPeriod time.Duration
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewOnlineMap creates a new instance of OnlineMap.
|
||||||
|
func NewOnlineMap() *OnlineMap {
|
||||||
|
return &OnlineMap{
|
||||||
|
ipList: make(map[string]time.Time),
|
||||||
|
lastCleanup: time.Now(),
|
||||||
|
cleanupPeriod: 10 * time.Second,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Count implements stats.OnlineMap.
|
||||||
|
func (c *OnlineMap) Count() int {
|
||||||
|
return c.value
|
||||||
|
}
|
||||||
|
|
||||||
|
// List implements stats.OnlineMap.
|
||||||
|
func (c *OnlineMap) List() []string {
|
||||||
|
return c.GetKeys()
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddIP implements stats.OnlineMap.
|
||||||
|
func (c *OnlineMap) AddIP(ip string) {
|
||||||
|
list := c.ipList
|
||||||
|
|
||||||
|
if ip == "127.0.0.1" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if _, ok := list[ip]; !ok {
|
||||||
|
c.access.Lock()
|
||||||
|
list[ip] = time.Now()
|
||||||
|
c.access.Unlock()
|
||||||
|
}
|
||||||
|
if time.Since(c.lastCleanup) > c.cleanupPeriod {
|
||||||
|
list = c.RemoveExpiredIPs(list)
|
||||||
|
c.lastCleanup = time.Now()
|
||||||
|
}
|
||||||
|
|
||||||
|
c.value = len(list)
|
||||||
|
c.ipList = list
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *OnlineMap) GetKeys() []string {
|
||||||
|
c.access.RLock()
|
||||||
|
defer c.access.RUnlock()
|
||||||
|
|
||||||
|
keys := []string{}
|
||||||
|
for k := range c.ipList {
|
||||||
|
keys = append(keys, k)
|
||||||
|
}
|
||||||
|
return keys
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *OnlineMap) RemoveExpiredIPs(list map[string]time.Time) map[string]time.Time {
|
||||||
|
c.access.Lock()
|
||||||
|
defer c.access.Unlock()
|
||||||
|
|
||||||
|
now := time.Now()
|
||||||
|
for k, t := range list {
|
||||||
|
diff := now.Sub(t)
|
||||||
|
if diff.Seconds() > 20 {
|
||||||
|
delete(list, k)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list
|
||||||
|
}
|
@@ -1,7 +1,5 @@
|
|||||||
package stats
|
package stats
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -13,17 +11,19 @@ import (
|
|||||||
|
|
||||||
// Manager is an implementation of stats.Manager.
|
// Manager is an implementation of stats.Manager.
|
||||||
type Manager struct {
|
type Manager struct {
|
||||||
access sync.RWMutex
|
access sync.RWMutex
|
||||||
counters map[string]*Counter
|
counters map[string]*Counter
|
||||||
channels map[string]*Channel
|
onlineMap map[string]*OnlineMap
|
||||||
running bool
|
channels map[string]*Channel
|
||||||
|
running bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewManager creates an instance of Statistics Manager.
|
// NewManager creates an instance of Statistics Manager.
|
||||||
func NewManager(ctx context.Context, config *Config) (*Manager, error) {
|
func NewManager(ctx context.Context, config *Config) (*Manager, error) {
|
||||||
m := &Manager{
|
m := &Manager{
|
||||||
counters: make(map[string]*Counter),
|
counters: make(map[string]*Counter),
|
||||||
channels: make(map[string]*Channel),
|
onlineMap: make(map[string]*OnlineMap),
|
||||||
|
channels: make(map[string]*Channel),
|
||||||
}
|
}
|
||||||
|
|
||||||
return m, nil
|
return m, nil
|
||||||
@@ -83,6 +83,43 @@ func (m *Manager) VisitCounters(visitor func(string, stats.Counter) bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RegisterOnlineMap implements stats.Manager.
|
||||||
|
func (m *Manager) RegisterOnlineMap(name string) (stats.OnlineMap, error) {
|
||||||
|
m.access.Lock()
|
||||||
|
defer m.access.Unlock()
|
||||||
|
|
||||||
|
if _, found := m.onlineMap[name]; found {
|
||||||
|
return nil, errors.New("onlineMap ", name, " already registered.")
|
||||||
|
}
|
||||||
|
errors.LogDebug(context.Background(), "create new onlineMap ", name)
|
||||||
|
om := NewOnlineMap()
|
||||||
|
m.onlineMap[name] = om
|
||||||
|
return om, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnregisterOnlineMap implements stats.Manager.
|
||||||
|
func (m *Manager) UnregisterOnlineMap(name string) error {
|
||||||
|
m.access.Lock()
|
||||||
|
defer m.access.Unlock()
|
||||||
|
|
||||||
|
if _, found := m.onlineMap[name]; found {
|
||||||
|
errors.LogDebug(context.Background(), "remove onlineMap ", name)
|
||||||
|
delete(m.onlineMap, name)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOnlineMap implements stats.Manager.
|
||||||
|
func (m *Manager) GetOnlineMap(name string) stats.OnlineMap {
|
||||||
|
m.access.RLock()
|
||||||
|
defer m.access.RUnlock()
|
||||||
|
|
||||||
|
if om, found := m.onlineMap[name]; found {
|
||||||
|
return om
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterChannel implements stats.Manager.
|
// RegisterChannel implements stats.Manager.
|
||||||
func (m *Manager) RegisterChannel(name string) (stats.Channel, error) {
|
func (m *Manager) RegisterChannel(name string) (stats.Channel, error) {
|
||||||
m.access.Lock()
|
m.access.Lock()
|
||||||
|
@@ -1,4 +1,2 @@
|
|||||||
// Package buf provides a light-weight memory allocation mechanism.
|
// Package buf provides a light-weight memory allocation mechanism.
|
||||||
package buf // import "github.com/xtls/xray-core/common/buf"
|
package buf // import "github.com/xtls/xray-core/common/buf"
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -218,7 +218,7 @@ func (b *Buffer) Cap() int32 {
|
|||||||
// NewWithSize creates a Buffer with 0 length and capacity with at least the given size.
|
// NewWithSize creates a Buffer with 0 length and capacity with at least the given size.
|
||||||
func NewWithSize(size int32) *Buffer {
|
func NewWithSize(size int32) *Buffer {
|
||||||
return &Buffer{
|
return &Buffer{
|
||||||
v: bytespool.Alloc(size),
|
v: bytespool.Alloc(size),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,8 +12,6 @@ import (
|
|||||||
"github.com/xtls/xray-core/common/errors"
|
"github.com/xtls/xray-core/common/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
// ErrNoClue is for the situation that existing information is not enough to make a decision. For example, Router may return this error when there is no suitable route.
|
// ErrNoClue is for the situation that existing information is not enough to make a decision. For example, Router may return this error when there is no suitable route.
|
||||||
var ErrNoClue = errors.New("not enough information for making a decision")
|
var ErrNoClue = errors.New("not enough information for making a decision")
|
||||||
|
|
||||||
|
@@ -1,4 +1,2 @@
|
|||||||
// Package crypto provides common crypto libraries for Xray.
|
// Package crypto provides common crypto libraries for Xray.
|
||||||
package crypto // import "github.com/xtls/xray-core/common/crypto"
|
package crypto // import "github.com/xtls/xray-core/common/crypto"
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -7,7 +7,7 @@ type SessionKey int
|
|||||||
// ID of a session.
|
// ID of a session.
|
||||||
type ID uint32
|
type ID uint32
|
||||||
|
|
||||||
const(
|
const (
|
||||||
idSessionKey SessionKey = 0
|
idSessionKey SessionKey = 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -2,8 +2,6 @@ package drain
|
|||||||
|
|
||||||
import "io"
|
import "io"
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
type Drainer interface {
|
type Drainer interface {
|
||||||
AcknowledgeReceive(size int)
|
AcknowledgeReceive(size int)
|
||||||
Drain(reader io.Reader) error
|
Drain(reader io.Reader) error
|
||||||
|
@@ -1,25 +1,34 @@
|
|||||||
package errors
|
package errors
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PrintDeprecatedFeatureWarning prints a warning for deprecated and going to be removed feature.
|
// PrintMigrateFeatureInfo prints a notice of the upcoming feature migration.
|
||||||
// Do not remove this function even there is no reference to it.
|
// Place it after the source feature related config file pharser code.
|
||||||
func PrintDeprecatedFeatureWarning(feature string, migrateFeature string) {
|
// Important note: Only use this when the target migrating feature is under construction.
|
||||||
if len(migrateFeature) > 0 {
|
// Important note: Even when the target migrating feature has finished its construction, this notice can still be used yet before announcing deprecation of the old feature.
|
||||||
LogWarning(context.Background(), "This feature " + feature + " is deprecated and being migrated to " + migrateFeature + ". Please update your config(s) according to release note and documentation before removal.")
|
// Do not remove this function even there is no reference to it.
|
||||||
} else {
|
func PrintMigrateFeatureInfo(sourceFeature string, targetFeature string) {
|
||||||
LogWarning(context.Background(), "This feature " + feature + " is deprecated. Please update your config(s) according to release note and documentation before removal.")
|
LogInfo(context.Background(), "The feature "+sourceFeature+" will be migrated to "+targetFeature+" in the future.")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// PrintDeprecatedFeatureWarning prints a warning for deprecated and going to be removed feature.
|
||||||
// PrintRemovedFeatureError prints an error message for removed feature then return an error. And after long enough time the message can also be removed, uses as an indicator.
|
// Do not remove this function even there is no reference to it.
|
||||||
// Do not remove this function even there is no reference to it.
|
func PrintDeprecatedFeatureWarning(feature string, migrateFeature string) {
|
||||||
func PrintRemovedFeatureError(feature string, migrateFeature string) (error) {
|
if len(migrateFeature) > 0 {
|
||||||
if len(migrateFeature) > 0 {
|
LogWarning(context.Background(), "This feature "+feature+" is deprecated and being migrated to "+migrateFeature+". Please update your config(s) according to release note and documentation before removal.")
|
||||||
return New("The feature " + feature + " has been removed and migrated to " + migrateFeature + ". Please update your config(s) according to release note and documentation.")
|
} else {
|
||||||
} else {
|
LogWarning(context.Background(), "This feature "+feature+" is deprecated. Please update your config(s) according to release note and documentation before removal.")
|
||||||
return New("The feature " + feature + " has been removed. Please update your config(s) according to release note and documentation.")
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// PrintRemovedFeatureError prints an error message for removed feature then return an error. And after long enough time the message can also be removed, uses as an indicator.
|
||||||
|
// Do not remove this function even there is no reference to it.
|
||||||
|
func PrintRemovedFeatureError(feature string, migrateFeature string) error {
|
||||||
|
if len(migrateFeature) > 0 {
|
||||||
|
return New("The feature " + feature + " has been removed and migrated to " + migrateFeature + ". Please update your config(s) according to release note and documentation.")
|
||||||
|
} else {
|
||||||
|
return New("The feature " + feature + " has been removed. Please update your config(s) according to release note and documentation.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/log/log.proto
|
// source: common/log/log.proto
|
||||||
|
|
||||||
package log
|
package log
|
||||||
|
@@ -16,6 +16,7 @@ func TestFileLogger(t *testing.T) {
|
|||||||
common.Must(err)
|
common.Must(err)
|
||||||
path := f.Name()
|
path := f.Name()
|
||||||
common.Must(f.Close())
|
common.Must(f.Close())
|
||||||
|
defer os.Remove(path)
|
||||||
|
|
||||||
creator, err := CreateFileLogWriter(path)
|
creator, err := CreateFileLogWriter(path)
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
|
@@ -1,3 +1 @@
|
|||||||
package mux
|
package mux
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/net/address.proto
|
// source: common/net/address.proto
|
||||||
|
|
||||||
package net
|
package net
|
||||||
@@ -36,11 +36,9 @@ type IPOrDomain struct {
|
|||||||
|
|
||||||
func (x *IPOrDomain) Reset() {
|
func (x *IPOrDomain) Reset() {
|
||||||
*x = IPOrDomain{}
|
*x = IPOrDomain{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_net_address_proto_msgTypes[0]
|
||||||
mi := &file_common_net_address_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *IPOrDomain) String() string {
|
func (x *IPOrDomain) String() string {
|
||||||
@@ -51,7 +49,7 @@ func (*IPOrDomain) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *IPOrDomain) ProtoReflect() protoreflect.Message {
|
func (x *IPOrDomain) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_net_address_proto_msgTypes[0]
|
mi := &file_common_net_address_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -152,20 +150,6 @@ func file_common_net_address_proto_init() {
|
|||||||
if File_common_net_address_proto != nil {
|
if File_common_net_address_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_common_net_address_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*IPOrDomain); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_common_net_address_proto_msgTypes[0].OneofWrappers = []any{
|
file_common_net_address_proto_msgTypes[0].OneofWrappers = []any{
|
||||||
(*IPOrDomain_Ip)(nil),
|
(*IPOrDomain_Ip)(nil),
|
||||||
(*IPOrDomain_Domain)(nil),
|
(*IPOrDomain_Domain)(nil),
|
||||||
|
@@ -89,10 +89,12 @@ func UnixDestination(address Address) Destination {
|
|||||||
// NetAddr returns the network address in this Destination in string form.
|
// NetAddr returns the network address in this Destination in string form.
|
||||||
func (d Destination) NetAddr() string {
|
func (d Destination) NetAddr() string {
|
||||||
addr := ""
|
addr := ""
|
||||||
if d.Network == Network_TCP || d.Network == Network_UDP {
|
if d.Address != nil {
|
||||||
addr = d.Address.String() + ":" + d.Port.String()
|
if d.Network == Network_TCP || d.Network == Network_UDP {
|
||||||
} else if d.Network == Network_UNIX {
|
addr = d.Address.String() + ":" + d.Port.String()
|
||||||
addr = d.Address.String()
|
} else if d.Network == Network_UNIX {
|
||||||
|
addr = d.Address.String()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return addr
|
return addr
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/net/destination.proto
|
// source: common/net/destination.proto
|
||||||
|
|
||||||
package net
|
package net
|
||||||
@@ -33,11 +33,9 @@ type Endpoint struct {
|
|||||||
|
|
||||||
func (x *Endpoint) Reset() {
|
func (x *Endpoint) Reset() {
|
||||||
*x = Endpoint{}
|
*x = Endpoint{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_net_destination_proto_msgTypes[0]
|
||||||
mi := &file_common_net_destination_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Endpoint) String() string {
|
func (x *Endpoint) String() string {
|
||||||
@@ -48,7 +46,7 @@ func (*Endpoint) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Endpoint) ProtoReflect() protoreflect.Message {
|
func (x *Endpoint) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_net_destination_proto_msgTypes[0]
|
mi := &file_common_net_destination_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -145,20 +143,6 @@ func file_common_net_destination_proto_init() {
|
|||||||
}
|
}
|
||||||
file_common_net_network_proto_init()
|
file_common_net_network_proto_init()
|
||||||
file_common_net_address_proto_init()
|
file_common_net_address_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_common_net_destination_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Endpoint); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -1,4 +1,2 @@
|
|||||||
// Package net is a drop-in replacement to Golang's net package, with some more functionalities.
|
// Package net is a drop-in replacement to Golang's net package, with some more functionalities.
|
||||||
package net // import "github.com/xtls/xray-core/common/net"
|
package net // import "github.com/xtls/xray-core/common/net"
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/net/network.proto
|
// source: common/net/network.proto
|
||||||
|
|
||||||
package net
|
package net
|
||||||
@@ -24,25 +24,21 @@ type Network int32
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
Network_Unknown Network = 0
|
Network_Unknown Network = 0
|
||||||
// Deprecated: Marked as deprecated in common/net/network.proto.
|
Network_TCP Network = 2
|
||||||
Network_RawTCP Network = 1
|
Network_UDP Network = 3
|
||||||
Network_TCP Network = 2
|
Network_UNIX Network = 4
|
||||||
Network_UDP Network = 3
|
|
||||||
Network_UNIX Network = 4
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Enum value maps for Network.
|
// Enum value maps for Network.
|
||||||
var (
|
var (
|
||||||
Network_name = map[int32]string{
|
Network_name = map[int32]string{
|
||||||
0: "Unknown",
|
0: "Unknown",
|
||||||
1: "RawTCP",
|
|
||||||
2: "TCP",
|
2: "TCP",
|
||||||
3: "UDP",
|
3: "UDP",
|
||||||
4: "UNIX",
|
4: "UNIX",
|
||||||
}
|
}
|
||||||
Network_value = map[string]int32{
|
Network_value = map[string]int32{
|
||||||
"Unknown": 0,
|
"Unknown": 0,
|
||||||
"RawTCP": 1,
|
|
||||||
"TCP": 2,
|
"TCP": 2,
|
||||||
"UDP": 3,
|
"UDP": 3,
|
||||||
"UNIX": 4,
|
"UNIX": 4,
|
||||||
@@ -87,11 +83,9 @@ type NetworkList struct {
|
|||||||
|
|
||||||
func (x *NetworkList) Reset() {
|
func (x *NetworkList) Reset() {
|
||||||
*x = NetworkList{}
|
*x = NetworkList{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_net_network_proto_msgTypes[0]
|
||||||
mi := &file_common_net_network_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NetworkList) String() string {
|
func (x *NetworkList) String() string {
|
||||||
@@ -102,7 +96,7 @@ func (*NetworkList) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *NetworkList) ProtoReflect() protoreflect.Message {
|
func (x *NetworkList) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_net_network_proto_msgTypes[0]
|
mi := &file_common_net_network_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -133,10 +127,9 @@ var file_common_net_network_proto_rawDesc = []byte{
|
|||||||
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x6e, 0x65,
|
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x6e, 0x65,
|
||||||
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x78, 0x72,
|
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x78, 0x72,
|
||||||
0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65,
|
0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65,
|
||||||
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2a, 0x42,
|
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2a, 0x32,
|
||||||
0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b,
|
0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b,
|
||||||
0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x06, 0x52, 0x61, 0x77, 0x54, 0x43, 0x50,
|
0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12,
|
||||||
0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12,
|
|
||||||
0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x4e, 0x49, 0x58,
|
0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x4e, 0x49, 0x58,
|
||||||
0x10, 0x04, 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63,
|
0x10, 0x04, 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63,
|
||||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74,
|
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74,
|
||||||
@@ -178,20 +171,6 @@ func file_common_net_network_proto_init() {
|
|||||||
if File_common_net_network_proto != nil {
|
if File_common_net_network_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_common_net_network_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*NetworkList); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -9,7 +9,6 @@ option java_multiple_files = true;
|
|||||||
enum Network {
|
enum Network {
|
||||||
Unknown = 0;
|
Unknown = 0;
|
||||||
|
|
||||||
RawTCP = 1 [deprecated = true];
|
|
||||||
TCP = 2;
|
TCP = 2;
|
||||||
UDP = 3;
|
UDP = 3;
|
||||||
UNIX = 4;
|
UNIX = 4;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/net/port.proto
|
// source: common/net/port.proto
|
||||||
|
|
||||||
package net
|
package net
|
||||||
@@ -34,11 +34,9 @@ type PortRange struct {
|
|||||||
|
|
||||||
func (x *PortRange) Reset() {
|
func (x *PortRange) Reset() {
|
||||||
*x = PortRange{}
|
*x = PortRange{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_net_port_proto_msgTypes[0]
|
||||||
mi := &file_common_net_port_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PortRange) String() string {
|
func (x *PortRange) String() string {
|
||||||
@@ -49,7 +47,7 @@ func (*PortRange) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *PortRange) ProtoReflect() protoreflect.Message {
|
func (x *PortRange) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_net_port_proto_msgTypes[0]
|
mi := &file_common_net_port_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -89,11 +87,9 @@ type PortList struct {
|
|||||||
|
|
||||||
func (x *PortList) Reset() {
|
func (x *PortList) Reset() {
|
||||||
*x = PortList{}
|
*x = PortList{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_net_port_proto_msgTypes[1]
|
||||||
mi := &file_common_net_port_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PortList) String() string {
|
func (x *PortList) String() string {
|
||||||
@@ -104,7 +100,7 @@ func (*PortList) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *PortList) ProtoReflect() protoreflect.Message {
|
func (x *PortList) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_net_port_proto_msgTypes[1]
|
mi := &file_common_net_port_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -177,32 +173,6 @@ func file_common_net_port_proto_init() {
|
|||||||
if File_common_net_port_proto != nil {
|
if File_common_net_port_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_common_net_port_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*PortRange); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_common_net_port_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*PortList); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -12,8 +12,6 @@ import (
|
|||||||
"github.com/xtls/xray-core/common/platform"
|
"github.com/xtls/xray-core/common/platform"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
func Run(args []string, input io.Reader) (buf.MultiBuffer, error) {
|
func Run(args []string, input io.Reader) (buf.MultiBuffer, error) {
|
||||||
xctl := platform.GetToolLocation("xctl")
|
xctl := platform.GetToolLocation("xctl")
|
||||||
if _, err := os.Stat(xctl); err != nil {
|
if _, err := os.Stat(xctl); err != nil {
|
||||||
|
@@ -1,8 +1,11 @@
|
|||||||
package protocol
|
package protocol
|
||||||
|
|
||||||
|
import "google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
// Account is a user identity used for authentication.
|
// Account is a user identity used for authentication.
|
||||||
type Account interface {
|
type Account interface {
|
||||||
Equals(Account) bool
|
Equals(Account) bool
|
||||||
|
ToProto() proto.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
// AsAccount is an object can be converted into account.
|
// AsAccount is an object can be converted into account.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/protocol/headers.proto
|
// source: common/protocol/headers.proto
|
||||||
|
|
||||||
package protocol
|
package protocol
|
||||||
@@ -88,11 +88,9 @@ type SecurityConfig struct {
|
|||||||
|
|
||||||
func (x *SecurityConfig) Reset() {
|
func (x *SecurityConfig) Reset() {
|
||||||
*x = SecurityConfig{}
|
*x = SecurityConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_protocol_headers_proto_msgTypes[0]
|
||||||
mi := &file_common_protocol_headers_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SecurityConfig) String() string {
|
func (x *SecurityConfig) String() string {
|
||||||
@@ -103,7 +101,7 @@ func (*SecurityConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *SecurityConfig) ProtoReflect() protoreflect.Message {
|
func (x *SecurityConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_protocol_headers_proto_msgTypes[0]
|
mi := &file_common_protocol_headers_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -183,20 +181,6 @@ func file_common_protocol_headers_proto_init() {
|
|||||||
if File_common_protocol_headers_proto != nil {
|
if File_common_protocol_headers_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_common_protocol_headers_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*SecurityConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -63,7 +63,7 @@ func SniffHTTP(b []byte, c context.Context) (*SniffHeader, error) {
|
|||||||
ShouldSniffAttr := true
|
ShouldSniffAttr := true
|
||||||
// If content.Attributes have information, that means it comes from HTTP inbound PlainHTTP mode.
|
// If content.Attributes have information, that means it comes from HTTP inbound PlainHTTP mode.
|
||||||
// It will set attributes, so skip it.
|
// It will set attributes, so skip it.
|
||||||
if content == nil || len(content.Attributes) != 0 {
|
if content == nil || content.AttributeLen() != 0 {
|
||||||
ShouldSniffAttr = false
|
ShouldSniffAttr = false
|
||||||
}
|
}
|
||||||
if err := beginWithHTTPMethod(b); err != nil {
|
if err := beginWithHTTPMethod(b); err != nil {
|
||||||
|
@@ -1,3 +1 @@
|
|||||||
package protocol // import "github.com/xtls/xray-core/common/protocol"
|
package protocol // import "github.com/xtls/xray-core/common/protocol"
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
package quic
|
package quic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"crypto"
|
"crypto"
|
||||||
"crypto/aes"
|
"crypto/aes"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
@@ -46,7 +47,18 @@ var (
|
|||||||
errNotQuicInitial = errors.New("not initial packet")
|
errNotQuicInitial = errors.New("not initial packet")
|
||||||
)
|
)
|
||||||
|
|
||||||
func SniffQUIC(b []byte) (*SniffHeader, error) {
|
func SniffQUIC(b []byte) (resultReturn *SniffHeader, errorReturn error) {
|
||||||
|
// In extremely rare cases, this sniffer may cause slice error
|
||||||
|
// and we set recover() here to prevent crash.
|
||||||
|
// TODO: Thoroughly fix this panic
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
errors.LogError(context.Background(), "Failed to sniff QUIC: ", r)
|
||||||
|
resultReturn = nil
|
||||||
|
errorReturn = common.ErrNoClue
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// Crypto data separated across packets
|
// Crypto data separated across packets
|
||||||
cryptoLen := 0
|
cryptoLen := 0
|
||||||
cryptoData := bytespool.Alloc(int32(len(b)))
|
cryptoData := bytespool.Alloc(int32(len(b)))
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/protocol/server_spec.proto
|
// source: common/protocol/server_spec.proto
|
||||||
|
|
||||||
package protocol
|
package protocol
|
||||||
@@ -33,11 +33,9 @@ type ServerEndpoint struct {
|
|||||||
|
|
||||||
func (x *ServerEndpoint) Reset() {
|
func (x *ServerEndpoint) Reset() {
|
||||||
*x = ServerEndpoint{}
|
*x = ServerEndpoint{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_protocol_server_spec_proto_msgTypes[0]
|
||||||
mi := &file_common_protocol_server_spec_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ServerEndpoint) String() string {
|
func (x *ServerEndpoint) String() string {
|
||||||
@@ -48,7 +46,7 @@ func (*ServerEndpoint) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ServerEndpoint) ProtoReflect() protoreflect.Message {
|
func (x *ServerEndpoint) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_protocol_server_spec_proto_msgTypes[0]
|
mi := &file_common_protocol_server_spec_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -146,20 +144,6 @@ func file_common_protocol_server_spec_proto_init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_common_protocol_user_proto_init()
|
file_common_protocol_user_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_common_protocol_server_spec_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*ServerEndpoint); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -16,8 +16,6 @@ import (
|
|||||||
"github.com/xtls/xray-core/common/errors"
|
"github.com/xtls/xray-core/common/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
type Certificate struct {
|
type Certificate struct {
|
||||||
// certificate in ASN.1 DER format
|
// certificate in ASN.1 DER format
|
||||||
Certificate []byte
|
Certificate []byte
|
||||||
|
@@ -1,10 +1,13 @@
|
|||||||
package protocol
|
package protocol
|
||||||
|
|
||||||
import "github.com/xtls/xray-core/common/errors"
|
import (
|
||||||
|
"github.com/xtls/xray-core/common/errors"
|
||||||
|
"github.com/xtls/xray-core/common/serial"
|
||||||
|
)
|
||||||
|
|
||||||
func (u *User) GetTypedAccount() (Account, error) {
|
func (u *User) GetTypedAccount() (Account, error) {
|
||||||
if u.GetAccount() == nil {
|
if u.GetAccount() == nil {
|
||||||
return nil, errors.New("Account missing").AtWarning()
|
return nil, errors.New("Account is missing").AtWarning()
|
||||||
}
|
}
|
||||||
|
|
||||||
rawAccount, err := u.Account.GetInstance()
|
rawAccount, err := u.Account.GetInstance()
|
||||||
@@ -32,6 +35,17 @@ func (u *User) ToMemoryUser() (*MemoryUser, error) {
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ToProtoUser(mu *MemoryUser) *User {
|
||||||
|
if mu == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return &User{
|
||||||
|
Account: serial.ToTypedMessage(mu.Account.ToProto()),
|
||||||
|
Email: mu.Email,
|
||||||
|
Level: mu.Level,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// MemoryUser is a parsed form of User, to reduce number of parsing of Account proto.
|
// MemoryUser is a parsed form of User, to reduce number of parsing of Account proto.
|
||||||
type MemoryUser struct {
|
type MemoryUser struct {
|
||||||
// Account is the parsed account of the protocol.
|
// Account is the parsed account of the protocol.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/protocol/user.proto
|
// source: common/protocol/user.proto
|
||||||
|
|
||||||
package protocol
|
package protocol
|
||||||
@@ -36,11 +36,9 @@ type User struct {
|
|||||||
|
|
||||||
func (x *User) Reset() {
|
func (x *User) Reset() {
|
||||||
*x = User{}
|
*x = User{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_protocol_user_proto_msgTypes[0]
|
||||||
mi := &file_common_protocol_user_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *User) String() string {
|
func (x *User) String() string {
|
||||||
@@ -51,7 +49,7 @@ func (*User) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *User) ProtoReflect() protoreflect.Message {
|
func (x *User) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_protocol_user_proto_msgTypes[0]
|
mi := &file_common_protocol_user_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -142,20 +140,6 @@ func file_common_protocol_user_proto_init() {
|
|||||||
if File_common_protocol_user_proto != nil {
|
if File_common_protocol_user_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_common_protocol_user_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*User); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -22,12 +22,12 @@ func MarshalToJson(v interface{}, insertTypeInfo bool) (string, bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func JSONMarshalWithoutEscape(t interface{}) ([]byte, error) {
|
func JSONMarshalWithoutEscape(t interface{}) ([]byte, error) {
|
||||||
buffer := &bytes.Buffer{}
|
buffer := &bytes.Buffer{}
|
||||||
encoder := json.NewEncoder(buffer)
|
encoder := json.NewEncoder(buffer)
|
||||||
encoder.SetIndent("", " ")
|
encoder.SetIndent("", " ")
|
||||||
encoder.SetEscapeHTML(false)
|
encoder.SetEscapeHTML(false)
|
||||||
err := encoder.Encode(t)
|
err := encoder.Encode(t)
|
||||||
return buffer.Bytes(), err
|
return buffer.Bytes(), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func marshalTypedMessage(v *cserial.TypedMessage, ignoreNullValue bool, insertTypeInfo bool) interface{} {
|
func marshalTypedMessage(v *cserial.TypedMessage, ignoreNullValue bool, insertTypeInfo bool) interface{} {
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package retry // import "github.com/xtls/xray-core/common/retry"
|
package retry // import "github.com/xtls/xray-core/common/retry"
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.27.0
|
// protoc v5.28.2
|
||||||
// source: common/serial/typed_message.proto
|
// source: common/serial/typed_message.proto
|
||||||
|
|
||||||
package serial
|
package serial
|
||||||
@@ -34,11 +34,9 @@ type TypedMessage struct {
|
|||||||
|
|
||||||
func (x *TypedMessage) Reset() {
|
func (x *TypedMessage) Reset() {
|
||||||
*x = TypedMessage{}
|
*x = TypedMessage{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_serial_typed_message_proto_msgTypes[0]
|
||||||
mi := &file_common_serial_typed_message_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TypedMessage) String() string {
|
func (x *TypedMessage) String() string {
|
||||||
@@ -49,7 +47,7 @@ func (*TypedMessage) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *TypedMessage) ProtoReflect() protoreflect.Message {
|
func (x *TypedMessage) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_serial_typed_message_proto_msgTypes[0]
|
mi := &file_common_serial_typed_message_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -126,20 +124,6 @@ func file_common_serial_typed_message_proto_init() {
|
|||||||
if File_common_serial_typed_message_proto != nil {
|
if File_common_serial_typed_message_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_common_serial_typed_message_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*TypedMessage); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -4,6 +4,7 @@ package session // import "github.com/xtls/xray-core/common/session"
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"sync"
|
||||||
|
|
||||||
c "github.com/xtls/xray-core/common/ctx"
|
c "github.com/xtls/xray-core/common/ctx"
|
||||||
"github.com/xtls/xray-core/common/errors"
|
"github.com/xtls/xray-core/common/errors"
|
||||||
@@ -65,7 +66,7 @@ type Outbound struct {
|
|||||||
Tag string
|
Tag string
|
||||||
// Name of the outbound proxy that handles the connection.
|
// Name of the outbound proxy that handles the connection.
|
||||||
Name string
|
Name string
|
||||||
// Conn is actually internet.Connection. May be nil. It is currently nil for outbound with proxySettings
|
// Conn is actually internet.Connection. May be nil. It is currently nil for outbound with proxySettings
|
||||||
Conn net.Conn
|
Conn net.Conn
|
||||||
// CanSpliceCopy is a property for this connection
|
// CanSpliceCopy is a property for this connection
|
||||||
// 1 = can, 2 = after processing protocol info should be able to, 3 = cannot
|
// 1 = can, 2 = after processing protocol info should be able to, 3 = cannot
|
||||||
@@ -91,6 +92,10 @@ type Content struct {
|
|||||||
Attributes map[string]string
|
Attributes map[string]string
|
||||||
|
|
||||||
SkipDNSResolve bool
|
SkipDNSResolve bool
|
||||||
|
|
||||||
|
mu sync.Mutex
|
||||||
|
|
||||||
|
isLocked bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sockopt is the settings for socket connection.
|
// Sockopt is the settings for socket connection.
|
||||||
@@ -99,8 +104,22 @@ type Sockopt struct {
|
|||||||
Mark int32
|
Mark int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Some how when using mux, there will be a same ctx between different requests
|
||||||
|
// This will cause problem as it's designed for single request, like concurrent map writes
|
||||||
|
// Add a Mutex as a temp solution
|
||||||
|
|
||||||
// SetAttribute attaches additional string attributes to content.
|
// SetAttribute attaches additional string attributes to content.
|
||||||
func (c *Content) SetAttribute(name string, value string) {
|
func (c *Content) SetAttribute(name string, value string) {
|
||||||
|
if c.isLocked {
|
||||||
|
errors.LogError(context.Background(), "Multiple goroutines are tring to access one routing content, tring to write ", name, ":", value)
|
||||||
|
}
|
||||||
|
c.mu.Lock()
|
||||||
|
c.isLocked = true
|
||||||
|
defer func() {
|
||||||
|
c.isLocked = false
|
||||||
|
c.mu.Unlock()
|
||||||
|
}()
|
||||||
|
|
||||||
if c.Attributes == nil {
|
if c.Attributes == nil {
|
||||||
c.Attributes = make(map[string]string)
|
c.Attributes = make(map[string]string)
|
||||||
}
|
}
|
||||||
@@ -109,8 +128,24 @@ func (c *Content) SetAttribute(name string, value string) {
|
|||||||
|
|
||||||
// Attribute retrieves additional string attributes from content.
|
// Attribute retrieves additional string attributes from content.
|
||||||
func (c *Content) Attribute(name string) string {
|
func (c *Content) Attribute(name string) string {
|
||||||
|
c.mu.Lock()
|
||||||
|
c.isLocked = true
|
||||||
|
defer func() {
|
||||||
|
c.isLocked = false
|
||||||
|
c.mu.Unlock()
|
||||||
|
}()
|
||||||
if c.Attributes == nil {
|
if c.Attributes == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return c.Attributes[name]
|
return c.Attributes[name]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Content) AttributeLen() int {
|
||||||
|
c.mu.Lock()
|
||||||
|
c.isLocked = true
|
||||||
|
defer func() {
|
||||||
|
c.isLocked = false
|
||||||
|
c.mu.Unlock()
|
||||||
|
}()
|
||||||
|
return len(c.Attributes)
|
||||||
|
}
|
||||||
|
@@ -48,9 +48,9 @@ func (d *XrayOutboundDialer) DialContext(ctx context.Context, network string, de
|
|||||||
outbounds = []*session.Outbound{{}}
|
outbounds = []*session.Outbound{{}}
|
||||||
ctx = session.ContextWithOutbounds(ctx, outbounds)
|
ctx = session.ContextWithOutbounds(ctx, outbounds)
|
||||||
}
|
}
|
||||||
ob := outbounds[len(outbounds) - 1]
|
ob := outbounds[len(outbounds)-1]
|
||||||
ob.Target = ToDestination(destination, ToNetwork(network))
|
ob.Target = ToDestination(destination, ToNetwork(network))
|
||||||
|
|
||||||
opts := []pipe.Option{pipe.WithSizeLimit(64 * 1024)}
|
opts := []pipe.Option{pipe.WithSizeLimit(64 * 1024)}
|
||||||
uplinkReader, uplinkWriter := pipe.New(opts...)
|
uplinkReader, uplinkWriter := pipe.New(opts...)
|
||||||
downlinkReader, downlinkWriter := pipe.New(opts...)
|
downlinkReader, downlinkWriter := pipe.New(opts...)
|
||||||
|
@@ -30,7 +30,7 @@ type ConfigLoader func(input interface{}) (*Config, error)
|
|||||||
// ConfigBuilder is a builder to build core.Config from filenames and formats
|
// ConfigBuilder is a builder to build core.Config from filenames and formats
|
||||||
type ConfigBuilder func(files []*ConfigSource) (*Config, error)
|
type ConfigBuilder func(files []*ConfigSource) (*Config, error)
|
||||||
|
|
||||||
// ConfigsMerger merge multiple json configs into on config
|
// ConfigsMerger merges multiple json configs into a single one
|
||||||
type ConfigsMerger func(files []*ConfigSource) (string, error)
|
type ConfigsMerger func(files []*ConfigSource) (string, error)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v5.28.0
|
// protoc v5.28.2
|
||||||
// source: core/config.proto
|
// source: core/config.proto
|
||||||
|
|
||||||
package core
|
package core
|
||||||
@@ -45,11 +45,9 @@ type Config struct {
|
|||||||
|
|
||||||
func (x *Config) Reset() {
|
func (x *Config) Reset() {
|
||||||
*x = Config{}
|
*x = Config{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_core_config_proto_msgTypes[0]
|
||||||
mi := &file_core_config_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) String() string {
|
func (x *Config) String() string {
|
||||||
@@ -60,7 +58,7 @@ func (*Config) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_core_config_proto_msgTypes[0]
|
mi := &file_core_config_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -120,11 +118,9 @@ type InboundHandlerConfig struct {
|
|||||||
|
|
||||||
func (x *InboundHandlerConfig) Reset() {
|
func (x *InboundHandlerConfig) Reset() {
|
||||||
*x = InboundHandlerConfig{}
|
*x = InboundHandlerConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_core_config_proto_msgTypes[1]
|
||||||
mi := &file_core_config_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *InboundHandlerConfig) String() string {
|
func (x *InboundHandlerConfig) String() string {
|
||||||
@@ -135,7 +131,7 @@ func (*InboundHandlerConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message {
|
func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_core_config_proto_msgTypes[1]
|
mi := &file_core_config_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -191,11 +187,9 @@ type OutboundHandlerConfig struct {
|
|||||||
|
|
||||||
func (x *OutboundHandlerConfig) Reset() {
|
func (x *OutboundHandlerConfig) Reset() {
|
||||||
*x = OutboundHandlerConfig{}
|
*x = OutboundHandlerConfig{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_core_config_proto_msgTypes[2]
|
||||||
mi := &file_core_config_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OutboundHandlerConfig) String() string {
|
func (x *OutboundHandlerConfig) String() string {
|
||||||
@@ -206,7 +200,7 @@ func (*OutboundHandlerConfig) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *OutboundHandlerConfig) ProtoReflect() protoreflect.Message {
|
func (x *OutboundHandlerConfig) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_core_config_proto_msgTypes[2]
|
mi := &file_core_config_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@@ -353,44 +347,6 @@ func file_core_config_proto_init() {
|
|||||||
if File_core_config_proto != nil {
|
if File_core_config_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_core_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*Config); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_core_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*InboundHandlerConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_core_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
||||||
switch v := v.(*OutboundHandlerConfig); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -9,8 +9,6 @@
|
|||||||
// connections.
|
// connections.
|
||||||
package core
|
package core
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
@@ -20,8 +18,8 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
Version_x byte = 24
|
Version_x byte = 24
|
||||||
Version_y byte = 9
|
Version_y byte = 11
|
||||||
Version_z byte = 19
|
Version_z byte = 21
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
package core
|
package core
|
||||||
|
|
||||||
//go:generate go install -v google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
|
//go:generate go install -v google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||||
//go:generate go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1
|
//go:generate go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||||
//go:generate go run ../infra/vprotogen/main.go -pwd ./..
|
//go:generate go run ../infra/vprotogen/main.go -pwd ./..
|
||||||
|
@@ -87,7 +87,7 @@ func (r *resolution) resolve(allFeatures []features.Feature) (bool, error) {
|
|||||||
return true, err
|
return true, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instance combines all functionalities in Xray.
|
// Instance combines all Xray features.
|
||||||
type Instance struct {
|
type Instance struct {
|
||||||
access sync.Mutex
|
access sync.Mutex
|
||||||
features []features.Feature
|
features []features.Feature
|
||||||
@@ -228,7 +228,7 @@ func initInstanceWithConfig(config *Config, server *Instance) (bool, error) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if server.featureResolutions != nil {
|
if server.featureResolutions != nil {
|
||||||
return true, errors.New("not all dependency are resolved.")
|
return true, errors.New("not all dependencies are resolved.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := addInboundHandlers(server, config.Inbound); err != nil {
|
if err := addInboundHandlers(server, config.Inbound); err != nil {
|
||||||
|
@@ -54,8 +54,8 @@ func TestXrayClose(t *testing.T) {
|
|||||||
Listen: net.NewIPOrDomain(net.LocalHostIP),
|
Listen: net.NewIPOrDomain(net.LocalHostIP),
|
||||||
}),
|
}),
|
||||||
ProxySettings: serial.ToTypedMessage(&dokodemo.Config{
|
ProxySettings: serial.ToTypedMessage(&dokodemo.Config{
|
||||||
Address: net.NewIPOrDomain(net.LocalHostIP),
|
Address: net.NewIPOrDomain(net.LocalHostIP),
|
||||||
Port: uint32(0),
|
Port: uint32(0),
|
||||||
Networks: []net.Network{net.Network_TCP},
|
Networks: []net.Network{net.Network_TCP},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
@@ -27,6 +27,8 @@ type Stats struct {
|
|||||||
UserUplink bool
|
UserUplink bool
|
||||||
// Whether or not to enable stat counter for user downlink traffic.
|
// Whether or not to enable stat counter for user downlink traffic.
|
||||||
UserDownlink bool
|
UserDownlink bool
|
||||||
|
// Whether or not to enable online map for user.
|
||||||
|
UserOnline bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buffer contains settings for internal buffer.
|
// Buffer contains settings for internal buffer.
|
||||||
@@ -123,6 +125,7 @@ func SessionDefault() Session {
|
|||||||
Stats: Stats{
|
Stats: Stats{
|
||||||
UserUplink: false,
|
UserUplink: false,
|
||||||
UserDownlink: false,
|
UserDownlink: false,
|
||||||
|
UserOnline: false,
|
||||||
},
|
},
|
||||||
Buffer: defaultBufferPolicy(),
|
Buffer: defaultBufferPolicy(),
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package dns
|
package dns
|
||||||
|
|
||||||
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user