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-14 16:21:45 -04:00
|
|
|
import "v2ray.com/core/app/router/config.proto";
|
|
|
|
import "v2ray.com/core/app/dns/config.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";
|
2016-10-12 12:43:55 -04:00
|
|
|
|
2016-10-14 16:21:45 -04:00
|
|
|
import "google/protobuf/any.proto";
|
2016-10-12 12:43:55 -04:00
|
|
|
|
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.
|
|
|
|
AllocationStrategyConcurrency concurrency = 2;
|
|
|
|
|
|
|
|
// Number of minutes before a handler is regenerated.
|
|
|
|
AllocationStrategyRefresh refresh = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Config for an inbound connection handler.
|
2016-10-12 12:43:55 -04:00
|
|
|
message InboundConnectionConfig {
|
|
|
|
string protocol = 1;
|
2016-10-14 16:21:45 -04:00
|
|
|
v2ray.core.common.net.PortRange port_range = 2;
|
|
|
|
v2ray.core.common.net.IPOrDomain listen_on = 3;
|
|
|
|
string tag = 4;
|
|
|
|
AllocationStrategy allocation_strategy = 5;
|
|
|
|
v2ray.core.transport.internet.StreamConfig stream_settings = 6;
|
|
|
|
google.protobuf.Any settings = 7;
|
|
|
|
bool allow_passive_connection = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
message OutboundConnectionConfig {
|
|
|
|
string protocol = 1;
|
|
|
|
v2ray.core.common.net.IPOrDomain send_through = 2;
|
|
|
|
v2ray.core.transport.internet.StreamConfig stream_settings = 3;
|
|
|
|
string tag = 4;
|
|
|
|
google.protobuf.Any settings = 5;
|
|
|
|
}
|
2016-10-12 12:43:55 -04:00
|
|
|
|
2016-10-14 16:21:45 -04:00
|
|
|
message Config {
|
|
|
|
repeated InboundConnectionConfig inbound = 1;
|
|
|
|
repeated OutboundConnectionConfig outbound = 2;
|
|
|
|
v2ray.core.common.log.Config log = 3;
|
|
|
|
v2ray.core.app.router.Config router = 4;
|
|
|
|
v2ray.core.app.dns.Config dns = 5;
|
|
|
|
v2ray.core.transport.Config transport = 6;
|
2016-10-12 12:43:55 -04:00
|
|
|
}
|