config.proto 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. syntax = "proto3";
  2. package v2ray.core.transport.internet.tls;
  3. option csharp_namespace = "V2Ray.Core.Transport.Internet.Tls";
  4. option go_package = "github.com/v2fly/v2ray-core/v5/transport/internet/tls";
  5. option java_package = "com.v2ray.core.transport.internet.tls";
  6. option java_multiple_files = true;
  7. import "common/protoext/extensions.proto";
  8. message Certificate {
  9. // TLS certificate in x509 format.
  10. bytes Certificate = 1;
  11. // TLS key in x509 format.
  12. bytes Key = 2;
  13. enum Usage {
  14. ENCIPHERMENT = 0;
  15. AUTHORITY_VERIFY = 1;
  16. AUTHORITY_ISSUE = 2;
  17. AUTHORITY_VERIFY_CLIENT = 3;
  18. }
  19. Usage usage = 3;
  20. string certificate_file = 96001 [(v2ray.core.common.protoext.field_opt).convert_time_read_file_into = "Certificate"];
  21. string key_file = 96002 [(v2ray.core.common.protoext.field_opt).convert_time_read_file_into = "Key"];
  22. }
  23. message Config {
  24. option (v2ray.core.common.protoext.message_opt).type = "security";
  25. option (v2ray.core.common.protoext.message_opt).short_name = "tls";
  26. option (v2ray.core.common.protoext.message_opt).allow_restricted_mode_load = true;
  27. // Whether or not to allow self-signed certificates.
  28. bool allow_insecure = 1 [(v2ray.core.common.protoext.field_opt).forbidden = true];
  29. // List of certificates to be served on server.
  30. repeated Certificate certificate = 2;
  31. // Override server name.
  32. string server_name = 3;
  33. // Lists of string as ALPN values.
  34. repeated string next_protocol = 4;
  35. // Whether or not to enable session (ticket) resumption.
  36. bool enable_session_resumption = 5;
  37. // If true, root certificates on the system will not be loaded for
  38. // verification.
  39. bool disable_system_root = 6;
  40. /* @Document A pinned certificate chain sha256 hash.
  41. @Document If the server's hash does not match this value, the connection will be aborted.
  42. @Document This value replace allow_insecure.
  43. @Critical
  44. */
  45. repeated bytes pinned_peer_certificate_chain_sha256 = 7;
  46. // If true, the client is required to present a certificate.
  47. bool verify_client_certificate = 8;
  48. enum TLSVersion {
  49. Default = 0;
  50. TLS1_0 = 1;
  51. TLS1_1 = 2;
  52. TLS1_2 = 3;
  53. TLS1_3 = 4;
  54. }
  55. // Minimum TLS version to support.
  56. TLSVersion min_version = 9;
  57. // Maximum TLS version to support.
  58. TLSVersion max_version = 10;
  59. // Whether or not to allow self-signed certificates when pinned_peer_certificate_chain_sha256 is present.
  60. bool allow_insecure_if_pinned_peer_certificate = 11;
  61. // ECH Config in bytes format
  62. bytes ech_config = 16;
  63. // DOH server to query HTTPS record for ECH
  64. string ech_DOHserver = 17;
  65. }