config_panel.toml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. version = "1.0"
  2. [main]
  3. name = "Auto-configuration"
  4. [main.vpn]
  5. name = ""
  6. optional = false
  7. [main.vpn.status]
  8. ask = "The status of your VPN is unknown."
  9. type = "alert"
  10. style = "info"
  11. [main.vpn.service_enabled]
  12. ask = "Enable VPN"
  13. type = "boolean"
  14. help = "If disabled, the VPN service will not automatically be started at boot."
  15. [main.vpn.doc]
  16. ask.en = "VPNclient only interfaces with *dedicated, public IP VPNs accepting inbound traffic*, preferably with an associated `.cube` (or `.ovpn/.conf`) configuration file. Checkout the [list of known compatible providers](https://yunohost.org/providers/vpn) for more info."
  17. ask.fr = "VPNclient est prévu pour fonctionner avec des *VPN dédiés et à IP publique qui acceptent le traffic entrant*, et de préférence avec un fichier de configuration `.cube` (ou `.ovpn/.conf`) associé. Consultez [la liste des fournisseurs connus et compatibles](https://yunohost.org/providers/vpn) pour plus d'infos."
  18. type = "alert"
  19. style = "info"
  20. [main.vpn.config_file]
  21. ask = "Configuration file"
  22. type = "file"
  23. accept = ".cube, .ovpn, .conf"
  24. help = ".cube file recommended, .ovpn file accepted"
  25. bind = "/etc/openvpn/client.conf"
  26. redact = true
  27. [main.auth]
  28. name = "Authentication"
  29. optional = true
  30. visible = 'config_file && ((match(config_file,"^\s*ca\s") && ! match(config_file,"^\s*<ca>")) || (match(config_file,"^\s*cert\s") && ! match(config_file,"^\s*<cert>")) || (match(config_file,"^\s*key\s") && ! match(config_file,"^\s*<key>")) || (match(config_file,"^\s*tls-auth\s") && ! match(config_file,"^\s*<tls-auth>")) || match(config_file,"^\s*auth-user-pass(\s.*)?$"))'
  31. [main.auth.crt_server_ca]
  32. ask = "Update Server CA"
  33. type = "file"
  34. bind = "/etc/openvpn/keys/ca-server.crt"
  35. visible = 'config_file && match(config_file,"^\s*ca\s") && ! match(config_file,"^\s*<ca>")'
  36. [main.auth.crt_client]
  37. ask = "Update Client Certificate"
  38. type = "file"
  39. bind = "/etc/openvpn/keys/user.crt"
  40. visible = 'config_file && match(config_file,"^\s*cert\s") && ! match(config_file,"^\s*<cert>")'
  41. [main.auth.crt_client_key]
  42. ask = "Update Client Key"
  43. type = "file"
  44. help = "This file begins with -----BEGIN PRIVATE KEY-----"
  45. bind = "/etc/openvpn/keys/user.key"
  46. visible = 'config_file && match(config_file,"^\s*key\s") && ! match(config_file,"^\s*<key>")'
  47. redact = true
  48. [main.auth.login_user]
  49. ask = "Username"
  50. type = "string"
  51. example = "camille"
  52. pattern.regexp = '^[a-zA-Z0-9_\-\\\.@]+$'
  53. pattern.error = "OpenVPN accept only alphabetic chars and -_\\.@"
  54. visible = 'config_file && match(config_file,"^\s*auth-user-pass\s")'
  55. [main.auth.login_passphrase]
  56. ask = "Password"
  57. type = "password"
  58. visible = 'config_file && match(config_file,"^\s*auth-user-pass(\s.*)?$")'
  59. [main.auth.crt_client_ta]
  60. ask = "TLS Auth shared secret"
  61. type = "file"
  62. example = "ta.key"
  63. help = "Some servers have an additional protection agains Deny of Service attack. If you have no tls-auth key in your ovpn, skip this question."
  64. bind = "/etc/openvpn/keys/user_ta.key"
  65. visible = 'config_file && match(config_file,"^\s*tls-auth\s") && ! match(config_file,"^\s*<tls-auth>")'
  66. redact = true
  67. [advanced]
  68. name = "DNS & IPv6"
  69. [advanced.dns]
  70. name = "DNS"
  71. [advanced.dns.dns_method]
  72. ask = "DNS resolvers"
  73. type = "select"
  74. choices.yunohost = "Default DNS resolvers from YunoHost"
  75. choices.custom = "Use custom DNS resolvers"
  76. [advanced.dns.nameservers]
  77. ask = "Custom DNS resolvers"
  78. type = "tags"
  79. optional = true
  80. visible = "dns_method == 'custom'"
  81. pattern.regexp = "^([0-9.]{7,15}|[0-9a-fA-F:]+)$"
  82. pattern.error = "Not an ip"
  83. [advanced.ipv6]
  84. name = "IPv6"
  85. [advanced.ipv6.ip6_net]
  86. ask = "IPv6 prefix"
  87. type = "string"
  88. optional = true
  89. example = "2001:db8:42::"
  90. pattern.regexp = "^[0-9a-fA-F:]+$"
  91. pattern.error = "Please provide a valid IPv6 Prefix"
  92. [advanced.ipv6.ip6_addr]
  93. ask = "IPv6"
  94. type = "string"
  95. optional = true
  96. example = "2001:db8:42::2"
  97. help = "If no IPv6 address is pushed directly by your VPN provider, you can indicate a specific IP to use here."
  98. pattern.regexp = "^[0-9a-fA-F:]+$"
  99. pattern.error = "Please provide a valid IPv6"