config_panel.toml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 = "Only VPN with a dedicated public ip that accept inbound traffic are compatible. See the [compatible providers list](https://yunohost.org/providers/vpn)."
  17. type = "alert"
  18. style = "warning"
  19. [main.vpn.config_file]
  20. ask = "Configuration file"
  21. type = "file"
  22. accept = ".cube, .ovpn, .conf"
  23. help = ".cube file recommended, .ovpn file accepted"
  24. bind = "/etc/openvpn/client.conf"
  25. [main.auth]
  26. name = "Authentication"
  27. optional = true
  28. 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.*)?$"))'
  29. [main.auth.crt_server_ca]
  30. ask = "Update Server CA"
  31. type = "file"
  32. bind = "/etc/openvpn/keys/ca-server.crt"
  33. visible = 'config_file && match(config_file,"^\s*ca\s") && ! match(config_file,"^\s*<ca>")'
  34. [main.auth.crt_client]
  35. ask = "Update Client Certificate"
  36. type = "file"
  37. bind = "/etc/openvpn/keys/user.crt"
  38. visible = 'config_file && match(config_file,"^\s*cert\s") && ! match(config_file,"^\s*<cert>")'
  39. [main.auth.crt_client_key]
  40. ask = "Update Client Key"
  41. type = "file"
  42. help = "This file begins with -----BEGIN PRIVATE KEY-----"
  43. bind = "/etc/openvpn/keys/user.key"
  44. visible = 'config_file && match(config_file,"^\s*key\s") && ! match(config_file,"^\s*<key>")'
  45. [main.auth.login_user]
  46. ask = "Username"
  47. type = "string"
  48. example = "camille"
  49. pattern.regexp = '^[a-zA-Z_\-\\\.@]+$'
  50. pattern.error = "OpenVPN accept only alphabetic chars and -_\\.@"
  51. visible = 'config_file && match(config_file,"^\s*auth-user-pass\s")'
  52. [main.auth.login_passphrase]
  53. ask = "Password"
  54. type = "password"
  55. visible = 'config_file && match(config_file,"^\s*auth-user-pass(\s.*)?$")'
  56. [main.auth.crt_client_ta]
  57. ask = "TLS Auth shared secret"
  58. type = "file"
  59. example = "ta.key"
  60. 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."
  61. bind = "/etc/openvpn/keys/user_ta.key"
  62. visible = 'config_file && match(config_file,"^\s*tls-auth\s") && ! match(config_file,"^\s*<tls-auth>")'
  63. [advanced]
  64. name = "DNS & IPv6"
  65. [advanced.dns]
  66. name = "DNS"
  67. [advanced.dns.dns_method]
  68. ask = "DNS resolvers"
  69. type = "select"
  70. choices.yunohost = "Default DNS resolvers from YunoHost"
  71. choices.custom = "Use custom DNS resolvers"
  72. [advanced.dns.nameservers]
  73. ask = "Custom DNS resolvers"
  74. type = "tags"
  75. optional = true
  76. visible = "dns_method == 'custom'"
  77. pattern.regexp = "^([0-9.]{7,15}|[0-9a-fA-F:]+)$"
  78. pattern.error = "Not an ip"
  79. [advanced.ipv6]
  80. name = "IPv6"
  81. [advanced.ipv6.ip6_net]
  82. ask = "IPv6 prefix"
  83. type = "string"
  84. optional = true
  85. example = "2001:db8:42::"
  86. pattern.regexp = "^[0-9a-fA-F:]+$"
  87. pattern.error = "Please provide a valid IPv6 Prefix"
  88. [advanced.ipv6.ip6_addr]
  89. ask = "IPv6"
  90. type = "string"
  91. optional = true
  92. example = "2001:db8:42::2"
  93. help = "If no IPv6 address is pushed directly by your VPN provider, you can indicate a specific IP to use here."
  94. pattern.regexp = "^[0-9a-fA-F:]+$"
  95. pattern.error = "Please provide a valid IPv6"