config.proto 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. syntax = "proto3";
  2. package xray.transport.internet.tls;
  3. option csharp_namespace = "Xray.Transport.Internet.Tls";
  4. option go_package = "github.com/xtls/xray-core/transport/internet/tls";
  5. option java_package = "com.xray.transport.internet.tls";
  6. option java_multiple_files = true;
  7. import "transport/internet/config.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. }
  18. Usage usage = 3;
  19. uint64 ocsp_stapling = 4;
  20. // TLS certificate path
  21. string certificate_path = 5;
  22. // TLS Key path
  23. string key_path = 6;
  24. // If true, one-Time Loading
  25. bool One_time_loading = 7;
  26. bool build_chain = 8;
  27. }
  28. message Config {
  29. // Whether or not to allow self-signed certificates.
  30. bool allow_insecure = 1;
  31. // List of certificates to be served on server.
  32. repeated Certificate certificate = 2;
  33. // Override server name.
  34. string server_name = 3;
  35. // Lists of string as ALPN values.
  36. repeated string next_protocol = 4;
  37. // Whether or not to enable session (ticket) resumption.
  38. bool enable_session_resumption = 5;
  39. // If true, root certificates on the system will not be loaded for
  40. // verification.
  41. bool disable_system_root = 6;
  42. // The minimum TLS version.
  43. string min_version = 7;
  44. // The maximum TLS version.
  45. string max_version = 8;
  46. // Specify cipher suites, except for TLS 1.3.
  47. string cipher_suites = 9;
  48. // TLS Client Hello fingerprint (uTLS).
  49. string fingerprint = 11;
  50. bool reject_unknown_sni = 12;
  51. /* @Document Some certificate chain sha256 hashes.
  52. @Document After normal validation or allow_insecure, if the server's cert chain hash does not match any of these values, the connection will be aborted.
  53. @Critical
  54. */
  55. repeated bytes pinned_peer_certificate_chain_sha256 = 13;
  56. /* @Document Some certificate public key sha256 hashes.
  57. @Document After normal validation (required), if one of certs in verified chain matches one of these values, the connection will be eventually accepted.
  58. @Critical
  59. */
  60. repeated bytes pinned_peer_certificate_public_key_sha256 = 14;
  61. string master_key_log = 15;
  62. // Lists of string as CurvePreferences values.
  63. repeated string curve_preferences = 16;
  64. /* @Document Replaces server_name to verify the peer cert.
  65. @Document After allow_insecure (automatically), if the server's cert can't be verified by any of these names, pinned_peer_certificate_chain_sha256 will be tried.
  66. @Critical
  67. */
  68. repeated string verify_peer_cert_in_names = 17;
  69. bytes ech_server_keys = 18;
  70. string ech_config_list = 19;
  71. string ech_force_query = 20;
  72. SocketConfig ech_socket_settings = 21;
  73. }