config.proto 1.6 KB

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