config.proto 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. // Whether or not to allow self-signed certificates.
  27. bool allow_insecure = 1 [(v2ray.core.common.protoext.field_opt).forbidden = true];
  28. // List of certificates to be served on server.
  29. repeated Certificate certificate = 2;
  30. // Override server name.
  31. string server_name = 3;
  32. // Lists of string as ALPN values.
  33. repeated string next_protocol = 4;
  34. // Whether or not to enable session (ticket) resumption.
  35. bool enable_session_resumption = 5;
  36. // If true, root certificates on the system will not be loaded for
  37. // verification.
  38. bool disable_system_root = 6;
  39. /* @Document A pinned certificate chain sha256 hash.
  40. @Document If the server's hash does not match this value, the connection will be aborted.
  41. @Document This value replace allow_insecure.
  42. @Critical
  43. */
  44. repeated bytes pinned_peer_certificate_chain_sha256 = 7;
  45. // If true, the client is required to present a certificate.
  46. bool verify_client_certificate = 8;
  47. }