You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/config.proto

94 lines
2.6 KiB

8 years ago
syntax = "proto3";
package v2ray.core;
option go_package = "core";
option java_package = "com.v2ray.core";
option java_outer_classname = "ConfigProto";
import "v2ray.com/core/common/loader/type.proto";
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";
8 years ago
8 years ago
// Configuration serialization format.
8 years ago
enum ConfigFormat {
Protobuf = 0;
JSON = 1;
}
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.
8 years ago
// Default value is 3 if unset.
AllocationStrategyConcurrency concurrency = 2;
// Number of minutes before a handler is regenerated.
8 years ago
// Default value is 5 if unset.
AllocationStrategyRefresh refresh = 3;
}
// Config for an inbound connection handler.
8 years ago
message InboundConnectionConfig {
8 years ago
// Protocol specific settings. Must be one of the supported protocols.
v2ray.core.common.loader.TypedSettings settings = 1;
8 years ago
// Range of port number to run on. Both inclusive.
v2ray.core.common.net.PortRange port_range = 2;
8 years ago
// IP address to listen on. 0.0.0.0 if unset.
v2ray.core.common.net.IPOrDomain listen_on = 3;
8 years ago
// Tag of this handler.
string tag = 4;
8 years ago
AllocationStrategy allocation_strategy = 5;
8 years ago
v2ray.core.transport.internet.StreamConfig stream_settings = 6;
8 years ago
bool allow_passive_connection = 7;
}
8 years ago
// Config for an outbound connection handler.
message OutboundConnectionConfig {
v2ray.core.common.loader.TypedSettings settings = 1;
8 years ago
// IP address to send data through. 0.0.0.0 if unset.
v2ray.core.common.net.IPOrDomain send_through = 2;
v2ray.core.transport.internet.StreamConfig stream_settings = 3;
string tag = 4;
}
8 years ago
message Config {
8 years ago
// Inbound handler configurations. Must have at least one item.
repeated InboundConnectionConfig inbound = 1;
8 years ago
// Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
repeated OutboundConnectionConfig outbound = 2;
v2ray.core.common.log.Config log = 3;
8 years ago
// App configuration. Must be one in the app directory.
repeated v2ray.core.common.loader.TypedSettings app = 4;
v2ray.core.transport.Config transport = 5;
8 years ago
}