v2fly/config.proto

56 lines
2.2 KiB
Protocol Buffer
Raw Normal View History

2016-10-12 16:43:55 +00:00
syntax = "proto3";
package v2ray.core;
2016-12-22 23:24:28 +00:00
option csharp_namespace = "V2Ray.Core";
2016-10-12 16:43:55 +00:00
option go_package = "core";
option java_package = "com.v2ray.core";
2017-02-03 22:15:10 +00:00
option java_multiple_files = true;
2016-10-12 16:43:55 +00:00
2016-12-15 10:51:09 +00:00
import "v2ray.com/core/common/serial/typed_message.proto";
2016-10-14 20:21:45 +00:00
import "v2ray.com/core/transport/config.proto";
2016-10-12 16:43:55 +00:00
2018-02-16 13:04:02 +00:00
// Config is the master config of V2Ray. V2Ray takes this config as input and functions accordingly.
2016-10-14 20:21:45 +00:00
message Config {
2016-10-17 22:09:49 +00:00
// Inbound handler configurations. Must have at least one item.
repeated InboundHandlerConfig inbound = 1;
2016-10-17 22:09:49 +00:00
// Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
repeated OutboundHandlerConfig outbound = 2;
2017-02-01 20:35:40 +00:00
reserved 3;
2016-10-17 22:09:49 +00:00
2018-03-13 08:02:21 +00: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.
2016-12-15 10:51:09 +00:00
repeated v2ray.core.common.serial.TypedMessage app = 4;
2017-02-10 15:25:54 +00:00
// Transport settings.
2016-10-16 14:04:30 +00:00
v2ray.core.transport.Config transport = 5;
2017-07-24 14:39:32 +00:00
// Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray.
// V2Ray will ignore such config during initialization.
repeated v2ray.core.common.serial.TypedMessage extension = 6;
}
2018-03-13 08:02:21 +00:00
// InboundHandlerConfig is the configuration for inbound handler.
message InboundHandlerConfig {
2018-03-13 08:02:21 +00:00
// Tag of the inbound handler. The tag must be unique among all inbound handlers
string tag = 1;
2018-03-13 08:02:21 +00:00
// Settings for how this inbound proxy is handled.
v2ray.core.common.serial.TypedMessage receiver_settings = 2;
// Settings for inbound proxy. Must be one of the inbound proxies.
v2ray.core.common.serial.TypedMessage proxy_settings = 3;
}
2018-03-13 08:02:21 +00:00
// OutboundHandlerConfig is the configuration for outbound handler.
message OutboundHandlerConfig {
// Tag of this outbound handler.
string tag = 1;
2018-03-13 08:02:21 +00:00
// Settings for how to dial connection for this outbound handler.
v2ray.core.common.serial.TypedMessage sender_settings = 2;
// Settings for this outbound proxy. Must be one of the outbound proxies.
v2ray.core.common.serial.TypedMessage proxy_settings = 3;
// 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;
}