extensions.proto 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. syntax = "proto3";
  2. package v2ray.core.common.protoext;
  3. option csharp_namespace = "V2Ray.Core.Common.ProtoExt";
  4. option go_package = "github.com/v2fly/v2ray-core/v5/common/protoext";
  5. option java_package = "com.v2ray.core.common.protoext";
  6. option java_multiple_files = true;
  7. import "google/protobuf/descriptor.proto";
  8. extend google.protobuf.MessageOptions {
  9. MessageOpt message_opt = 50000;
  10. }
  11. extend google.protobuf.FieldOptions {
  12. FieldOpt field_opt = 50000;
  13. }
  14. message MessageOpt{
  15. repeated string type = 1;
  16. repeated string short_name = 2;
  17. string transport_original_name = 86001;
  18. // allow_restricted_mode_load allow this config to be loaded in restricted mode
  19. // this is typically used when a an attacker can control the content
  20. bool allow_restricted_mode_load = 86002;
  21. }
  22. message FieldOpt{
  23. repeated string any_wants = 1;
  24. repeated string allowed_values = 2;
  25. repeated string allowed_value_types = 3;
  26. // convert_time_read_file_into read a file into another field, and clear this field during input parsing
  27. string convert_time_read_file_into = 4;
  28. // forbidden marks a boolean to be inaccessible to user
  29. bool forbidden = 5;
  30. // convert_time_resource_loading read a file, and place its resource hash into another field
  31. string convert_time_resource_loading = 6;
  32. // convert_time_parse_ip parse a string ip address, and put its binary representation into another field
  33. string convert_time_parse_ip = 7;
  34. }