{
  "title": "ovpn-config",
  "type": "object",
  "properties": {
    "settings": {
      "type": "object",
      "properties": {
        "vpn-protocol": {
          "type": "string",
          "enum": ["adaptive", "tcp", "udp"]
        },
        "timeout": {
          "type": "string",
          "enum": ["10", "30", "60", "120", "0"]
        },
        "launch-at-startup": {
          "type": "boolean",
        },
        "connect-on-launch": {
          "type": "boolean",
        },
        "seamless-tunnel": {
          "type": "boolean"
        },
        "minimize_on_launch": {
          "type": "boolean"
        },
        "hide-dock-icon": {
          "type": "boolean"
        },
        "captive-portal-detection": {
          "type": "boolean"
        },
        "software-update": {
          "type": "string",
          "enum": ["daily", "weekly", "monthly", "never"]
        },
        "theme": {
          "type": "string",
          "enum": ["system", "light", "dark"]
        },
        "tray-icon-style": {
          "type": "string",
          "enum": ["monochrome", "colorful"]
        },
        "disconnect-confirmation": {
          "type": "boolean"
        },
        "security-level": {
          "type": "string",
          "enum": ["insecure", "legacy", "preferred"]
        },
        "enforce-tls-1-3": {
          "type": "boolean"
        },
        "google-dns-fallback": {
          "type": "boolean"
        },
        "block-ipv6": {
          "type": "string",
          "enum": ["yes", "no"]
        },
       "enable-crash-reporting": {
         "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "import-url": {
      "type": "string",
      "maxLength": 255
    },
    "proxies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "proxy_name": {
            "type": "string",
            "maxLength": 255
          },
          "proxy_host": {
            "type": "string",
            "maxLength": 255
          },
          "proxy_port": {
            "type": "integer"
          },
          "proxy_password": {
            "type": "string",
            "maxLength": 127
          },
          "proxy_username": {
            "type": "string",
            "maxLength": 127
          },
          "basic_auth": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "proxy_name",
          "proxy_host"
        ]
      }
    },
    "profiles": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "profile_name": {
                "type": "string",
                "maxLength": 255
              },
              "profile_path": {
                "type": "string"
              }
            },
            "required": [
              "profile_name",
              "profile_path"
            ]
          },
          {
            "type": "object",
            "properties": {
              "profile_name": {
                "type": "string",
                "maxLength": 255
              },
              "profile_body": {
                "type": "string",
                "maxLength": 262144
              }
            },
            "required": [
              "profile_name",
              "profile_body"
            ]
          }
        ]
      }
    }
  }
}
