Browse Source

force mode python for file settings

HgO 1 month ago
parent
commit
1f6f7ce090
1 changed files with 14 additions and 7 deletions
  1. 14 7
      config_panel.toml

+ 14 - 7
config_panel.toml

@@ -26,21 +26,24 @@ name = "Configuration"
         [main.vpn.config_file]
         ask = "Configuration file"
         type = "file"
+        mode = "python"
         accept = [".cube", ".ovpn", ".conf", "application/json", "text/plain"]
         help = ".cube file recommended, .ovpn file accepted"
-        bind = ":/etc/openvpn/client.conf"
+        bind = "/etc/openvpn/client.conf"
         redact = true
 
         [main.vpn.cube_file]
         type = "file"
-        bind = ":/etc/openvpn/client.cube"
+        mode = "python"
+        bind = "/etc/openvpn/client.cube"
         redact = true
         optional = true
         visible = false
 
         [main.vpn.ovpn_file]
         type = "file"
-        bind = ":/etc/openvpn/client.ovpn"
+        mode = "python"
+        bind = "/etc/openvpn/client.ovpn"
         redact = true
         optional = true
         visible = false
@@ -53,20 +56,23 @@ name = "Configuration"
         [main.auth.crt_server_ca]
         ask = "Update Server CA"
         type = "file"
-        bind = ":/etc/openvpn/keys/ca-server.crt"
+        mode = "python"
+        bind = "/etc/openvpn/keys/ca-server.crt"
         visible = 'config_file && match(config_file,"^\s*ca\s") && ! match(config_file,"^\s*<ca>")'
 
         [main.auth.crt_client]
         ask = "Update Client Certificate"
         type = "file"
-        bind = ":/etc/openvpn/keys/user.crt"
+        mode = "python"
+        bind = "/etc/openvpn/keys/user.crt"
         visible = 'config_file && match(config_file,"^\s*cert\s") && ! match(config_file,"^\s*<cert>")'
 
         [main.auth.crt_client_key]
         ask = "Update Client Key"
         type = "file"
+        mode = "python"
         help = "This file begins with -----BEGIN PRIVATE KEY-----"
-        bind = ":/etc/openvpn/keys/user.key"
+        bind = "/etc/openvpn/keys/user.key"
         visible = 'config_file && match(config_file,"^\s*key\s") && ! match(config_file,"^\s*<key>")'
         redact = true
 
@@ -86,9 +92,10 @@ name = "Configuration"
         [main.auth.crt_client_ta]
         ask = "TLS Auth shared secret"
         type = "file"
+        mode = "python"
         example = "ta.key"
         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."
-        bind = ":/etc/openvpn/keys/user_ta.key"
+        bind = "/etc/openvpn/keys/user_ta.key"
         visible = 'config_file && match(config_file,"^\s*tls-auth\s") && ! match(config_file,"^\s*<tls-auth>")'
         redact = true