2016-10-12 12:43:55 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package v2ray.core;
|
|
|
|
option go_package = "core";
|
|
|
|
option java_package = "com.v2ray.core";
|
|
|
|
option java_outer_classname = "ConfigProto";
|
|
|
|
|
2016-10-16 08:22:21 -04:00
|
|
|
import "v2ray.com/core/common/loader/type.proto";
|
2016-10-14 16:21:45 -04:00
|
|
|
import "v2ray.com/core/common/net/port.proto";
|
|
|
|
import "v2ray.com/core/common/net/address.proto";
|
|
|
|
import "v2ray.com/core/common/log/config.proto";
|
|
|
|
import "v2ray.com/core/transport/internet/config.proto";
|
|
|
|
import "v2ray.com/core/transport/config.proto";
|
2016-10-12 12:43:55 -04:00
|
|
|
|
2016-10-17 18:09:49 -04:00
|
|
|
// Configuration serialization format.
|
2016-10-14 17:41:41 -04:00
|
|
|
enum ConfigFormat {
|
|
|
|
Protobuf = 0;
|
|
|
|
JSON = 1;
|
|
|
|
}
|
|
|
|
|
2016-10-14 16:21:45 -04:00
|
|
|
message AllocationStrategyConcurrency {
|
|
|
|
uint32 value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AllocationStrategyRefresh {
|
|
|
|
uint32 value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AllocationStrategy {
|
|
|
|
enum Type {
|
|
|
|
// Always allocate all connection handlers.
|
|
|
|
Always = 0;
|
|
|
|
|
|
|
|
// Randomly allocate specific range of handlers.
|
|
|
|
Random = 1;
|
|
|
|
|
|
|
|
// External. Not supported yet.
|
|
|
|
External = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
Type type = 1;
|
|
|
|
|
|
|
|
// Number of handlers (ports) running in parallel.
|
2016-10-17 18:09:49 -04:00
|
|
|
// Default value is 3 if unset.
|
2016-10-14 16:21:45 -04:00
|
|
|
AllocationStrategyConcurrency concurrency = 2;
|
|
|
|
|
|
|
|
// Number of minutes before a handler is regenerated.
|
2016-10-17 18:09:49 -04:00
|
|
|
// Default value is 5 if unset.
|
2016-10-14 16:21:45 -04:00
|
|
|
AllocationStrategyRefresh refresh = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Config for an inbound connection handler.
|
2016-10-12 12:43:55 -04:00
|
|
|
message InboundConnectionConfig {
|
2016-10-17 18:09:49 -04:00
|
|
|
// Protocol specific settings. Must be one of the supported protocols.
|
2016-10-16 08:22:21 -04:00
|
|
|
v2ray.core.common.loader.TypedSettings settings = 1;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
|
|
|
// Range of port number to run on. Both inclusive.
|
2016-10-14 16:21:45 -04:00
|
|
|
v2ray.core.common.net.PortRange port_range = 2;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
|
|
|
// IP address to listen on. 0.0.0.0 if unset.
|
2016-10-14 16:21:45 -04:00
|
|
|
v2ray.core.common.net.IPOrDomain listen_on = 3;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
|
|
|
// Tag of this handler.
|
2016-10-14 16:21:45 -04:00
|
|
|
string tag = 4;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
2016-10-14 16:21:45 -04:00
|
|
|
AllocationStrategy allocation_strategy = 5;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
2016-10-14 16:21:45 -04:00
|
|
|
v2ray.core.transport.internet.StreamConfig stream_settings = 6;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
2016-10-16 08:22:21 -04:00
|
|
|
bool allow_passive_connection = 7;
|
2016-10-14 16:21:45 -04:00
|
|
|
}
|
|
|
|
|
2016-10-17 18:09:49 -04:00
|
|
|
// Config for an outbound connection handler.
|
2016-10-14 16:21:45 -04:00
|
|
|
message OutboundConnectionConfig {
|
2016-10-16 08:22:21 -04:00
|
|
|
v2ray.core.common.loader.TypedSettings settings = 1;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
|
|
|
// IP address to send data through. 0.0.0.0 if unset.
|
2016-10-14 16:21:45 -04:00
|
|
|
v2ray.core.common.net.IPOrDomain send_through = 2;
|
|
|
|
v2ray.core.transport.internet.StreamConfig stream_settings = 3;
|
2016-11-10 17:41:28 -05:00
|
|
|
v2ray.core.transport.internet.ProxyConfig proxy_settings = 5;
|
2016-10-14 16:21:45 -04:00
|
|
|
string tag = 4;
|
|
|
|
}
|
2016-10-12 12:43:55 -04:00
|
|
|
|
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.
|
2016-10-14 16:21:45 -04:00
|
|
|
repeated InboundConnectionConfig inbound = 1;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
|
|
|
// Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
|
2016-10-14 16:21:45 -04:00
|
|
|
repeated OutboundConnectionConfig outbound = 2;
|
|
|
|
v2ray.core.common.log.Config log = 3;
|
2016-10-17 18:09:49 -04:00
|
|
|
|
|
|
|
// App configuration. Must be one in the app directory.
|
2016-10-16 10:04:30 -04:00
|
|
|
repeated v2ray.core.common.loader.TypedSettings app = 4;
|
|
|
|
v2ray.core.transport.Config transport = 5;
|
2016-10-12 12:43:55 -04:00
|
|
|
}
|