2016-10-12 12:43:55 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package v2ray.core;
|
2016-12-22 18:24:28 -05:00
|
|
|
option csharp_namespace = "V2Ray.Core";
|
2021-02-16 15:31:50 -05:00
|
|
|
option go_package = "github.com/v2fly/v2ray-core/v4;core";
|
2016-10-12 12:43:55 -04:00
|
|
|
option java_package = "com.v2ray.core";
|
2017-02-03 17:15:10 -05:00
|
|
|
option java_multiple_files = true;
|
2016-10-12 12:43:55 -04:00
|
|
|
|
2021-06-23 09:34:03 -04:00
|
|
|
import "google/protobuf/any.proto";
|
2020-08-24 08:10:26 -04:00
|
|
|
import "transport/config.proto";
|
2016-10-12 12:43:55 -04:00
|
|
|
|
2020-10-04 20:36:40 -04:00
|
|
|
// Config is the master config of V2Ray. V2Ray takes this config as input and
|
|
|
|
// functions accordingly.
|
2016-10-14 16:21:45 -04:00
|
|
|
message Config {
|
2016-10-17 18:09:49 -04:00
|
|
|
// Inbound handler configurations. Must have at least one item.
|
2018-01-10 06:22:37 -05:00
|
|
|
repeated InboundHandlerConfig inbound = 1;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
2020-10-04 20:36:40 -04:00
|
|
|
// Outbound handler configurations. Must have at least one item. The first
|
|
|
|
// item is used as default for routing.
|
2018-01-10 06:22:37 -05:00
|
|
|
repeated OutboundHandlerConfig outbound = 2;
|
2017-01-26 14:46:44 -05:00
|
|
|
|
2017-02-01 15:35:40 -05:00
|
|
|
reserved 3;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
2020-10-04 20:36:40 -04:00
|
|
|
// App is for configurations of all features in V2Ray. A feature must
|
|
|
|
// implement the Feature interface, and its config type must be registered
|
|
|
|
// through common.RegisterConfig.
|
2021-06-19 09:36:54 -04:00
|
|
|
repeated google.protobuf.Any app = 4;
|
2017-02-10 10:25:54 -05:00
|
|
|
|
|
|
|
// Transport settings.
|
2020-10-04 20:36:40 -04:00
|
|
|
// Deprecated. Each inbound and outbound should choose their own transport
|
|
|
|
// config. Date to remove: 2020-01-13
|
2019-01-13 14:14:24 -05:00
|
|
|
v2ray.core.transport.Config transport = 5 [deprecated = true];
|
2017-07-24 10:39:32 -04:00
|
|
|
|
2020-10-04 20:36:40 -04:00
|
|
|
// Configuration for extensions. The config may not work if corresponding
|
|
|
|
// extension is not loaded into V2Ray. V2Ray will ignore such config during
|
|
|
|
// initialization.
|
2021-06-19 09:36:54 -04:00
|
|
|
repeated google.protobuf.Any extension = 6;
|
2017-01-26 14:46:44 -05:00
|
|
|
}
|
2018-01-10 06:22:37 -05:00
|
|
|
|
2018-03-13 04:02:21 -04:00
|
|
|
// InboundHandlerConfig is the configuration for inbound handler.
|
2018-01-10 06:22:37 -05:00
|
|
|
message InboundHandlerConfig {
|
2020-10-04 20:36:40 -04:00
|
|
|
// Tag of the inbound handler. The tag must be unique among all inbound
|
|
|
|
// handlers
|
2018-01-10 06:22:37 -05:00
|
|
|
string tag = 1;
|
2018-03-13 04:02:21 -04:00
|
|
|
// Settings for how this inbound proxy is handled.
|
2021-06-19 09:36:54 -04:00
|
|
|
google.protobuf.Any receiver_settings = 2;
|
2018-01-10 06:22:37 -05:00
|
|
|
// Settings for inbound proxy. Must be one of the inbound proxies.
|
2021-06-19 09:36:54 -04:00
|
|
|
google.protobuf.Any proxy_settings = 3;
|
2018-01-10 06:22:37 -05:00
|
|
|
}
|
|
|
|
|
2018-03-13 04:02:21 -04:00
|
|
|
// OutboundHandlerConfig is the configuration for outbound handler.
|
2018-01-10 06:22:37 -05:00
|
|
|
message OutboundHandlerConfig {
|
|
|
|
// Tag of this outbound handler.
|
|
|
|
string tag = 1;
|
2018-03-13 04:02:21 -04:00
|
|
|
// Settings for how to dial connection for this outbound handler.
|
2021-06-19 09:36:54 -04:00
|
|
|
google.protobuf.Any sender_settings = 2;
|
2018-01-10 06:22:37 -05:00
|
|
|
// Settings for this outbound proxy. Must be one of the outbound proxies.
|
2021-06-19 09:36:54 -04:00
|
|
|
google.protobuf.Any proxy_settings = 3;
|
2018-01-10 06:22:37 -05:00
|
|
|
// If not zero, this outbound will be expired in seconds. Not used for now.
|
|
|
|
int64 expire = 4;
|
|
|
|
// Comment of this outbound handler. Not used for now.
|
|
|
|
string comment = 5;
|
|
|
|
}
|