config_panel.toml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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."
  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. help = "You should upload a CA certificate to start"
  33. bind = "/etc/openvpn/keys/ca-server.crt"
  34. visible = 'config_file && match(config_file,"^\s*ca\s") && ! match(config_file,"^\s*<ca>")'
  35. [main.auth.crt_client]
  36. ask = "Update Client Certificate"
  37. type = "file"
  38. bind = "/etc/openvpn/keys/user.crt"
  39. visible = 'config_file && match(config_file,"^\s*cert\s") && ! match(config_file,"^\s*<cert>")'
  40. [main.auth.crt_client_key]
  41. ask = "Update Client Key"
  42. type = "file"
  43. help = "This file begins with -----BEGIN PRIVATE KEY-----"
  44. bind = "/etc/openvpn/keys/user.key"
  45. visible = 'config_file && match(config_file,"^\s*key\s") && ! match(config_file,"^\s*<key>")'
  46. [main.auth.login_user]
  47. ask = "Username"
  48. type = "string"
  49. example = "camille"
  50. pattern.regexp = '^[a-zA-Z_\-\\\.@]+$'
  51. pattern.error = "OpenVPN accept only alphabetic chars and -_\\.@"
  52. visible = 'config_file && match(config_file,"^\s*auth-user-pass\s")'
  53. [main.auth.login_passphrase]
  54. ask = "Password"
  55. type = "password"
  56. visible = 'config_file && match(config_file,"^\s*auth-user-pass(\s.*)?$")'
  57. [main.auth.crt_client_ta]
  58. ask = "TLS Auth shared secret"
  59. type = "file"
  60. example = "ta.key"
  61. 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."
  62. bind = "/etc/openvpn/keys/user_ta.key"
  63. visible = 'config_file && match(config_file,"^\s*tls-auth\s") && ! match(config_file,"^\s*<tls-auth>")'
  64. [advanced]
  65. name = "DNS & IPv6"
  66. [advanced.dns]
  67. name = "DNS"
  68. [advanced.dns.dns_method]
  69. ask = "DNS provider"
  70. type = "select"
  71. choices.pushed = "Use DNS from my VPN provider"
  72. choices.yunohost = "Keep DNS from YunoHost"
  73. choices.custom = "Use custom DNS"
  74. [advanced.dns.nameservers]
  75. ask = "DNS resolvers"
  76. type = "tags"
  77. optional = true
  78. visible = "dns_method == 'custom'"
  79. pattern.regexp = "^([0-9.]{8,16}|[0-9a-fA-F:]+)$"
  80. pattern.error = "Not an ip"
  81. [advanced.ipv6]
  82. name = "IPv6"
  83. [advanced.ipv6.ip6_addr]
  84. ask = "IPv6"
  85. type = "string"
  86. optional = true
  87. example = "2001:db8:42::2"
  88. help = "If ipv6 address is not pushed directly by your openvpn server, you can indicate a specific ip to use."
  89. pattern.regexp = "^[0-9a-fA-F:]+$"
  90. pattern.error = "Please provide a valid IPv6"