config.proto 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. syntax = "proto3";
  2. package xray.transport.internet.xtls;
  3. option csharp_namespace = "Xray.Transport.Internet.Xtls";
  4. option go_package = "github.com/xtls/xray-core/transport/internet/xtls";
  5. option java_package = "com.xray.transport.internet.xtls";
  6. option java_multiple_files = true;
  7. message Certificate {
  8. // TLS certificate in x509 format.
  9. bytes certificate = 1;
  10. // TLS key in x509 format.
  11. bytes key = 2;
  12. enum Usage {
  13. ENCIPHERMENT = 0;
  14. AUTHORITY_VERIFY = 1;
  15. AUTHORITY_ISSUE = 2;
  16. }
  17. Usage usage = 3;
  18. uint64 ocsp_stapling = 4;
  19. // TLS certificate path
  20. string certificate_path = 5;
  21. // TLS Key path
  22. string key_path = 6;
  23. // If true, one-Time Loading
  24. bool One_time_loading = 7;
  25. }
  26. message Config {
  27. // Whether or not to allow self-signed certificates.
  28. bool allow_insecure = 1;
  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. // The minimum TLS version.
  41. string min_version = 7;
  42. // The maximum TLS version.
  43. string max_version = 8;
  44. // Specify cipher suites, except for TLS 1.3.
  45. string cipher_suites = 9;
  46. // Whether the server selects its most preferred ciphersuite.
  47. bool prefer_server_cipher_suites = 10;
  48. bool reject_unknown_sni = 12;
  49. /* @Document A pinned certificate chain sha256 hash.
  50. @Document If the server's hash does not match this value, the connection will be aborted.
  51. @Document This value replace allow_insecure.
  52. @Critical
  53. */
  54. repeated bytes pinned_peer_certificate_chain_sha256 = 13;
  55. }