2017-11-27 16:09:30 -05:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package v2ray.core.app.policy;
|
|
|
|
option csharp_namespace = "V2Ray.Core.App.Policy";
|
2021-02-16 15:31:50 -05:00
|
|
|
option go_package = "github.com/v2fly/v2ray-core/v4/app/policy";
|
2017-11-27 16:09:30 -05:00
|
|
|
option java_package = "com.v2ray.core.app.policy";
|
|
|
|
option java_multiple_files = true;
|
|
|
|
|
|
|
|
message Second {
|
|
|
|
uint32 value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Policy {
|
|
|
|
// Timeout is a message for timeout settings in various stages, in seconds.
|
|
|
|
message Timeout {
|
|
|
|
Second handshake = 1;
|
|
|
|
Second connection_idle = 2;
|
|
|
|
Second uplink_only = 3;
|
|
|
|
Second downlink_only = 4;
|
|
|
|
}
|
|
|
|
|
2018-03-30 17:39:54 -04:00
|
|
|
message Stats {
|
2018-03-31 14:30:49 -04:00
|
|
|
bool user_uplink = 1;
|
|
|
|
bool user_downlink = 2;
|
2018-03-30 17:39:54 -04:00
|
|
|
}
|
|
|
|
|
2018-05-25 06:08:28 -04:00
|
|
|
message Buffer {
|
2018-05-25 07:12:00 -04:00
|
|
|
// Buffer size per connection, in bytes. -1 for unlimited buffer.
|
|
|
|
int32 connection = 1;
|
2018-05-25 06:08:28 -04:00
|
|
|
}
|
|
|
|
|
2017-11-27 16:09:30 -05:00
|
|
|
Timeout timeout = 1;
|
2018-03-30 17:39:54 -04:00
|
|
|
Stats stats = 2;
|
2018-05-25 06:08:28 -04:00
|
|
|
Buffer buffer = 3;
|
2017-11-27 16:09:30 -05:00
|
|
|
}
|
|
|
|
|
2018-04-11 18:10:14 -04:00
|
|
|
message SystemPolicy {
|
|
|
|
message Stats {
|
|
|
|
bool inbound_uplink = 1;
|
|
|
|
bool inbound_downlink = 2;
|
2020-06-22 23:55:00 -04:00
|
|
|
bool outbound_uplink = 3;
|
|
|
|
bool outbound_downlink = 4;
|
2018-04-11 18:10:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Stats stats = 1;
|
|
|
|
}
|
|
|
|
|
2017-11-27 16:09:30 -05:00
|
|
|
message Config {
|
|
|
|
map<uint32, Policy> level = 1;
|
2018-04-11 18:10:14 -04:00
|
|
|
SystemPolicy system = 2;
|
2017-11-27 16:09:30 -05:00
|
|
|
}
|