github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/app/router/command/command.proto (about) 1 syntax = "proto3"; 2 3 package v2ray.core.app.router.command; 4 option csharp_namespace = "V2Ray.Core.App.Router.Command"; 5 option go_package = "v2ray.com/core/app/router/command"; 6 option java_package = "com.v2ray.core.app.router.command"; 7 option java_multiple_files = true; 8 9 import "common/net/network.proto"; 10 11 // RoutingContext is the context with information relative to routing process. 12 // It conforms to the structure of v2ray.core.features.routing.Context and 13 // v2ray.core.features.routing.Route. 14 message RoutingContext { 15 string InboundTag = 1; 16 v2ray.core.common.net.Network Network = 2; 17 repeated bytes SourceIPs = 3; 18 repeated bytes TargetIPs = 4; 19 uint32 SourcePort = 5; 20 uint32 TargetPort = 6; 21 string TargetDomain = 7; 22 string Protocol = 8; 23 string User = 9; 24 map<string, string> Attributes = 10; 25 repeated string OutboundGroupTags = 11; 26 string OutboundTag = 12; 27 } 28 29 // SubscribeRoutingStatsRequest subscribes to routing statistics channel if 30 // opened by v2ray-core. 31 // * FieldSelectors selects a subset of fields in routing statistics to return. 32 // Valid selectors: 33 // - inbound: Selects connection's inbound tag. 34 // - network: Selects connection's network. 35 // - ip: Equivalent as "ip_source" and "ip_target", selects both source and 36 // target IP. 37 // - port: Equivalent as "port_source" and "port_target", selects both source 38 // and target port. 39 // - domain: Selects target domain. 40 // - protocol: Select connection's protocol. 41 // - user: Select connection's inbound user email. 42 // - attributes: Select connection's additional attributes. 43 // - outbound: Equivalent as "outbound" and "outbound_group", select both 44 // outbound tag and outbound group tags. 45 // * If FieldSelectors is left empty, all fields will be returned. 46 message SubscribeRoutingStatsRequest { 47 repeated string FieldSelectors = 1; 48 } 49 50 // TestRouteRequest manually tests a routing result according to the routing 51 // context message. 52 // * RoutingContext is the routing message without outbound information. 53 // * FieldSelectors selects the fields to return in the routing result. All 54 // fields are returned if left empty. 55 // * PublishResult broadcasts the routing result to routing statistics channel 56 // if set true. 57 message TestRouteRequest { 58 RoutingContext RoutingContext = 1; 59 repeated string FieldSelectors = 2; 60 bool PublishResult = 3; 61 } 62 63 service RoutingService { 64 rpc SubscribeRoutingStats(SubscribeRoutingStatsRequest) 65 returns (stream RoutingContext) {} 66 rpc TestRoute(TestRouteRequest) returns (RoutingContext) {} 67 } 68 69 message Config {}