Merge branch 'master' into chore-code-cleanup

# Conflicts:
#	go.mod
#	go.sum
This commit is contained in:
Christoph Haas 2025-03-09 21:17:47 +01:00
commit 678b6c6456
15 changed files with 656 additions and 497 deletions

View File

@ -16,7 +16,7 @@ annotations:
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.7.0 version: 0.7.1
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to

View File

@ -1,6 +1,6 @@
# wg-portal # wg-portal
![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2](https://img.shields.io/badge/AppVersion-v2-informational?style=flat-square) ![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2](https://img.shields.io/badge/AppVersion-v2-informational?style=flat-square)
WireGuard Configuration Portal with LDAP, OAuth, OIDC authentication WireGuard Configuration Portal with LDAP, OAuth, OIDC authentication
@ -27,97 +27,98 @@ The [Values](#values) section lists the parameters that can be configured during
## Values ## Values
| Key | Type | Default | Description | | Key | Type | Default | Description |
|----------------------------------|------------|--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |-----|------|---------|-------------|
| nameOverride | string | `""` | Partially override resource names (adds suffix) | | nameOverride | string | `""` | Partially override resource names (adds suffix) |
| fullnameOverride | string | `""` | Fully override resource names | | fullnameOverride | string | `""` | Fully override resource names |
| extraDeploy | list | `[]` | Array of extra objects to deploy with the release | | extraDeploy | list | `[]` | Array of extra objects to deploy with the release |
| config.advanced | tpl/object | `{}` | [Advanced configuration](https://wgportal.org/latest/documentation/configuration/overview/#advanced) options. | | config.advanced | tpl/object | `{}` | [Advanced configuration](https://wgportal.org/latest/documentation/configuration/overview/#advanced) options. |
| config.auth | tpl/object | `{}` | [Auth configuration](https://wgportal.org/latest/documentation/configuration/overview/#auth) options. | | config.auth | tpl/object | `{}` | [Auth configuration](https://wgportal.org/latest/documentation/configuration/overview/#auth) options. |
| config.core | tpl/object | `{}` | [Core configuration](https://wgportal.org/latest/documentation/configuration/overview/#core) options.<br> If external admins in `auth` are defined and there are no `admin_user` and `admin_password` defined here, the default admin account will be disabled. | | config.core | tpl/object | `{}` | [Core configuration](https://wgportal.org/latest/documentation/configuration/overview/#core) options.<br> If external admins in `auth` are defined and there are no `admin_user` and `admin_password` defined here, the default admin account will be disabled. |
| config.database | tpl/object | `{}` | [Database configuration](https://wgportal.org/latest/documentation/configuration/overview/#database) options | | config.database | tpl/object | `{}` | [Database configuration](https://wgportal.org/latest/documentation/configuration/overview/#database) options |
| config.mail | tpl/object | `{}` | [Mail configuration](https://wgportal.org/latest/documentation/configuration/overview/#mail) options | | config.mail | tpl/object | `{}` | [Mail configuration](https://wgportal.org/latest/documentation/configuration/overview/#mail) options |
| config.statistics | tpl/object | `{}` | [Statistics configuration](https://wgportal.org/latest/documentation/configuration/overview/#statistics) options | | config.statistics | tpl/object | `{}` | [Statistics configuration](https://wgportal.org/latest/documentation/configuration/overview/#statistics) options |
| config.web | tpl/object | `{}` | [Web configuration](https://wgportal.org/latest/documentation/configuration/overview/#web) options.<br> `listening_address` will be set automatically from `service.web.port`. `external_url` is required to enable ingress and certificate resources. | | config.web | tpl/object | `{}` | [Web configuration](https://wgportal.org/latest/documentation/configuration/overview/#web) options.<br> `listening_address` will be set automatically from `service.web.port`. `external_url` is required to enable ingress and certificate resources. |
| revisionHistoryLimit | string | `10` | The number of old ReplicaSets to retain to allow rollback. | | revisionHistoryLimit | string | `10` | The number of old ReplicaSets to retain to allow rollback. |
| workloadType | string | `"Deployment"` | Workload type - `Deployment` or `StatefulSet` | | workloadType | string | `"Deployment"` | Workload type - `Deployment` or `StatefulSet` |
| strategy | object | `{"type":"RollingUpdate"}` | Update strategy for the workload Valid values are: `RollingUpdate` or `Recreate` for Deployment, `RollingUpdate` or `OnDelete` for StatefulSet | | strategy | object | `{"type":"RollingUpdate"}` | Update strategy for the workload Valid values are: `RollingUpdate` or `Recreate` for Deployment, `RollingUpdate` or `OnDelete` for StatefulSet |
| image.repository | string | `"ghcr.io/h44z/wg-portal"` | Image repository | | image.repository | string | `"ghcr.io/h44z/wg-portal"` | Image repository |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion |
| imagePullSecrets | list | `[]` | Image pull secrets | | imagePullSecrets | list | `[]` | Image pull secrets |
| podAnnotations | tpl/object | `{}` | Extra annotations to add to the pod | | podAnnotations | tpl/object | `{}` | Extra annotations to add to the pod |
| podLabels | object | `{}` | Extra labels to add to the pod | | podLabels | object | `{}` | Extra labels to add to the pod |
| podSecurityContext | object | `{}` | Pod Security Context | | podSecurityContext | object | `{}` | Pod Security Context |
| securityContext.capabilities.add | list | `["NET_ADMIN"]` | Add capabilities to the container | | securityContext.capabilities.add | list | `["NET_ADMIN"]` | Add capabilities to the container |
| initContainers | tpl/list | `[]` | Pod init containers | | initContainers | tpl/list | `[]` | Pod init containers |
| sidecarContainers | tpl/list | `[]` | Pod sidecar containers | | sidecarContainers | tpl/list | `[]` | Pod sidecar containers |
| dnsPolicy | string | `"ClusterFirst"` | Set DNS policy for the pod. Valid values are `ClusterFirstWithHostNet`, `ClusterFirst`, `Default` or `None`. | | dnsPolicy | string | `"ClusterFirst"` | Set DNS policy for the pod. Valid values are `ClusterFirstWithHostNet`, `ClusterFirst`, `Default` or `None`. |
| restartPolicy | string | `"Always"` | Restart policy for all containers within the pod. Valid values are `Always`, `OnFailure` or `Never`. | | restartPolicy | string | `"Always"` | Restart policy for all containers within the pod. Valid values are `Always`, `OnFailure` or `Never`. |
| hostNetwork | string | `false`. | Use the host's network namespace. | | hostNetwork | string | `false`. | Use the host's network namespace. |
| resources | object | `{}` | Resources requests and limits | | resources | object | `{}` | Resources requests and limits |
| command | list | `[]` | Overwrite pod command | | command | list | `[]` | Overwrite pod command |
| args | list | `[]` | Additional pod arguments | | args | list | `[]` | Additional pod arguments |
| env | tpl/list | `[]` | Additional environment variables | | env | tpl/list | `[]` | Additional environment variables |
| envFrom | tpl/list | `[]` | Additional environment variables from a secret or configMap | | envFrom | tpl/list | `[]` | Additional environment variables from a secret or configMap |
| livenessProbe | object | `{}` | Liveness probe configuration | | livenessProbe | object | `{}` | Liveness probe configuration |
| readinessProbe | object | `{}` | Readiness probe configuration | | readinessProbe | object | `{}` | Readiness probe configuration |
| startupProbe | object | `{}` | Startup probe configuration | | startupProbe | object | `{}` | Startup probe configuration |
| volumes | tpl/list | `[]` | Additional volumes | | volumes | tpl/list | `[]` | Additional volumes |
| volumeMounts | tpl/list | `[]` | Additional volumeMounts | | volumeMounts | tpl/list | `[]` | Additional volumeMounts |
| nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node Selector configuration | | nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node Selector configuration |
| tolerations | list | `[]` | Tolerations configuration | | tolerations | list | `[]` | Tolerations configuration |
| affinity | object | `{}` | Affinity configuration | | affinity | object | `{}` | Affinity configuration |
| service.mixed.enabled | bool | `false` | Whether to create a single service for the web and wireguard interfaces | | service.mixed.enabled | bool | `false` | Whether to create a single service for the web and wireguard interfaces |
| service.mixed.type | string | `"LoadBalancer"` | Service type | | service.mixed.type | string | `"LoadBalancer"` | Service type |
| service.web.annotations | object | `{}` | Annotations for the web service | | service.web.annotations | object | `{}` | Annotations for the web service |
| service.web.type | string | `"ClusterIP"` | Web service type | | service.web.type | string | `"ClusterIP"` | Web service type |
| service.web.port | int | `8888` | Web service port Used for the web interface listener | | service.web.port | int | `8888` | Web service port Used for the web interface listener |
| service.web.appProtocol | string | `"http"` | Web service appProtocol. Will be auto set to `https` if certificate is enabled. | | service.web.appProtocol | string | `"http"` | Web service appProtocol. Will be auto set to `https` if certificate is enabled. |
| service.wireguard.annotations | object | `{}` | Annotations for the WireGuard service | | service.wireguard.annotations | object | `{}` | Annotations for the WireGuard service |
| service.wireguard.type | string | `"LoadBalancer"` | Wireguard service type | | service.wireguard.type | string | `"LoadBalancer"` | Wireguard service type |
| service.wireguard.ports | list | `[51820]` | Wireguard service ports. Exposes the WireGuard ports for created interfaces. Lowerest port is selected as start port for the first interface. Increment next port by 1 for each additional interface. | | service.wireguard.ports | list | `[51820]` | Wireguard service ports. Exposes the WireGuard ports for created interfaces. Lowerest port is selected as start port for the first interface. Increment next port by 1 for each additional interface. |
| service.metrics.port | int | `8787` | | | service.metrics.port | int | `8787` | |
| ingress.enabled | bool | `false` | Specifies whether an ingress resource should be created | | ingress.enabled | bool | `false` | Specifies whether an ingress resource should be created |
| ingress.className | string | `""` | Ingress class name | | ingress.className | string | `""` | Ingress class name |
| ingress.annotations | object | `{}` | Ingress annotations | | ingress.annotations | object | `{}` | Ingress annotations |
| ingress.tls | bool | `false` | Ingress TLS configuration. Enable certificate resource or add ingress annotation to create required secret | | ingress.tls | bool | `false` | Ingress TLS configuration. Enable certificate resource or add ingress annotation to create required secret |
| certificate.enabled | bool | `false` | Specifies whether a certificate resource should be created. If enabled, certificate will be used for the web. | | certificate.enabled | bool | `false` | Specifies whether a certificate resource should be created. If enabled, certificate will be used for the web. |
| certificate.issuer.name | string | `""` | Certificate issuer name | | certificate.issuer.name | string | `""` | Certificate issuer name |
| certificate.issuer.kind | string | `""` | Certificate issuer kind (ClusterIssuer or Issuer) | | certificate.issuer.kind | string | `""` | Certificate issuer kind (ClusterIssuer or Issuer) |
| certificate.issuer.group | string | `"cert-manager.io"` | Certificate issuer group | | certificate.issuer.group | string | `"cert-manager.io"` | Certificate issuer group |
| certificate.duration | string | `""` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.duration | string | `""` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.renewBefore | string | `""` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.renewBefore | string | `""` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.commonName | string | `""` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.commonName | string | `""` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.emailAddresses | list | `[]` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.emailAddresses | list | `[]` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.ipAddresses | list | `[]` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.ipAddresses | list | `[]` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.keystores | object | `{}` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.keystores | object | `{}` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.privateKey | object | `{}` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.privateKey | object | `{}` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.secretTemplate | object | `{}` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.secretTemplate | object | `{}` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.subject | object | `{}` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.subject | object | `{}` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.uris | list | `[]` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.uris | list | `[]` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| certificate.usages | list | `[]` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) | | certificate.usages | list | `[]` | Optional. [Documentation](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) |
| persistence.enabled | bool | `false` | Specifies whether an persistent volume should be created | | persistence.enabled | bool | `false` | Specifies whether an persistent volume should be created |
| persistence.annotations | object | `{}` | Persistent Volume Claim annotations | | persistence.annotations | object | `{}` | Persistent Volume Claim annotations |
| persistence.storageClass | string | `""` | Persistent Volume storage class. If undefined (the default) cluster's default provisioner will be used. | | persistence.storageClass | string | `""` | Persistent Volume storage class. If undefined (the default) cluster's default provisioner will be used. |
| persistence.accessMode | string | `"ReadWriteOnce"` | Persistent Volume Access Mode | | persistence.accessMode | string | `"ReadWriteOnce"` | Persistent Volume Access Mode |
| persistence.size | string | `"1Gi"` | Persistent Volume size | | persistence.size | string | `"1Gi"` | Persistent Volume size |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | | persistence.volumeName | string | `""` | Persistent Volume Name (optional) |
| serviceAccount.annotations | object | `{}` | Service account annotations | | serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.automount | bool | `false` | Automatically mount a ServiceAccount's API credentials | | serviceAccount.annotations | object | `{}` | Service account annotations |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | | serviceAccount.automount | bool | `false` | Automatically mount a ServiceAccount's API credentials |
| monitoring.enabled | bool | `false` | Enable Prometheus monitoring. | | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| monitoring.apiVersion | string | `"monitoring.coreos.com/v1"` | API version of the Prometheus resource. Use `azmonitoring.coreos.com/v1` for Azure Managed Prometheus. | | monitoring.enabled | bool | `false` | Enable Prometheus monitoring. |
| monitoring.kind | string | `"PodMonitor"` | Kind of the Prometheus resource. Could be `PodMonitor` or `ServiceMonitor`. | | monitoring.apiVersion | string | `"monitoring.coreos.com/v1"` | API version of the Prometheus resource. Use `azmonitoring.coreos.com/v1` for Azure Managed Prometheus. |
| monitoring.labels | object | `{}` | Resource labels. | | monitoring.kind | string | `"PodMonitor"` | Kind of the Prometheus resource. Could be `PodMonitor` or `ServiceMonitor`. |
| monitoring.annotations | object | `{}` | Resource annotations. | | monitoring.labels | object | `{}` | Resource labels. |
| monitoring.interval | string | `1m` | Interval at which metrics should be scraped. If not specified `config.statistics.data_collection_interval` interval is used. | | monitoring.annotations | object | `{}` | Resource annotations. |
| monitoring.metricRelabelings | list | `[]` | Relabelings to samples before ingestion. | | monitoring.interval | string | `1m` | Interval at which metrics should be scraped. If not specified `config.statistics.data_collection_interval` interval is used. |
| monitoring.relabelings | list | `[]` | Relabelings to samples before scraping. | | monitoring.metricRelabelings | list | `[]` | Relabelings to samples before ingestion. |
| monitoring.scrapeTimeout | string | `""` | Timeout after which the scrape is ended If not specified, the Prometheus global scrape interval is used. | | monitoring.relabelings | list | `[]` | Relabelings to samples before scraping. |
| monitoring.jobLabel | string | `""` | The label to use to retrieve the job name from. | | monitoring.scrapeTimeout | string | `""` | Timeout after which the scrape is ended If not specified, the Prometheus global scrape interval is used. |
| monitoring.podTargetLabels | object | `{}` | Transfers labels on the Kubernetes Pod onto the target. | | monitoring.jobLabel | string | `""` | The label to use to retrieve the job name from. |
| monitoring.dashboard.enabled | bool | `false` | Enable Grafana dashboard. | | monitoring.podTargetLabels | object | `{}` | Transfers labels on the Kubernetes Pod onto the target. |
| monitoring.dashboard.annotations | object | `{}` | Annotations for the dashboard ConfigMap. | | monitoring.dashboard.enabled | bool | `false` | Enable Grafana dashboard. |
| monitoring.dashboard.labels | object | `{}` | Additional labels for the dashboard ConfigMap. | | monitoring.dashboard.annotations | object | `{}` | Annotations for the dashboard ConfigMap. |
| monitoring.dashboard.namespace | string | `""` | Dashboard ConfigMap namespace Overrides the namespace for the dashboard ConfigMap. | | monitoring.dashboard.labels | object | `{}` | Additional labels for the dashboard ConfigMap. |
| monitoring.dashboard.namespace | string | `""` | Dashboard ConfigMap namespace Overrides the namespace for the dashboard ConfigMap. |

View File

@ -89,13 +89,17 @@ admin_user: ""
Define PersistentVolumeClaim spec Define PersistentVolumeClaim spec
*/}} */}}
{{- define "wg-portal.pvc" -}} {{- define "wg-portal.pvc" -}}
accessModes: [{{ .Values.persistence.accessMode }}] accessModes:
{{- with .Values.persistence.storageClass }} - {{ .Values.persistence.accessMode }}
storageClassName: {{ . }}
{{- end }}
resources: resources:
requests: requests:
storage: {{ .Values.persistence.size | quote }} storage: {{ .Values.persistence.size | quote }}
{{- with .Values.persistence.storageClass }}
storageClassName: {{ . }}
{{- end }}
{{- with .Values.persistence.volumeName }}
volumeName: {{ . }}
{{- end }}
{{- end -}} {{- end -}}
{{/* {{/*

View File

@ -195,6 +195,8 @@ persistence:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
# -- Persistent Volume size # -- Persistent Volume size
size: 1Gi size: 1Gi
# -- Persistent Volume Name (optional)
volumeName: ""
serviceAccount: serviceAccount:
# -- Specifies whether a service account should be created # -- Specifies whether a service account should be created

View File

@ -58,7 +58,7 @@ mail:
host: 127.0.0.1 host: 127.0.0.1
port: 25 port: 25
encryption: none encryption: none
cert_validation: false cert_validation: true
username: "" username: ""
password: "" password: ""
auth_type: plain auth_type: plain
@ -289,7 +289,7 @@ Options for configuring email notifications or sending peer configurations via e
- **Description:** SMTP encryption type. Valid values: `none`, `tls`, `starttls`. - **Description:** SMTP encryption type. Valid values: `none`, `tls`, `starttls`.
### `cert_validation` ### `cert_validation`
- **Default:** `false` - **Default:** `true`
- **Description:** If `true`, validate the SMTP server certificate (relevant if `encryption` = `tls`). - **Description:** If `true`, validate the SMTP server certificate (relevant if `encryption` = `tls`).
### `username` ### `username`

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
"preview": "vite preview --port 5050" "preview": "vite preview --port 5050"
}, },
"dependencies": { "dependencies": {
"@fontsource/nunito-sans": "^5.1.1", "@fontsource/nunito-sans": "^5.2.5",
"@fortawesome/fontawesome-free": "^6.7.2", "@fortawesome/fontawesome-free": "^6.7.2",
"@kyvg/vue3-notification": "^3.4.1", "@kyvg/vue3-notification": "^3.4.1",
"@popperjs/core": "^2.11.8", "@popperjs/core": "^2.11.8",
@ -16,19 +16,19 @@
"bootswatch": "^5.3.3", "bootswatch": "^5.3.3",
"flag-icons": "^7.3.2", "flag-icons": "^7.3.2",
"ip-address": "^10.0.1", "ip-address": "^10.0.1",
"is-cidr": "^5.1.0", "is-cidr": "^5.1.1",
"is-ip": "^5.0.1", "is-ip": "^5.0.1",
"pinia": "^2.3.1", "pinia": "^3.0.1",
"prismjs": "^1.29.0", "prismjs": "^1.29.0",
"vue": "^3.5.13", "vue": "^3.5.13",
"vue-i18n": "^11.0.1", "vue-i18n": "^11.1.1",
"vue-prism-component": "github:h44z/vue-prism-component", "vue-prism-component": "github:h44z/vue-prism-component",
"vue-router": "^4.5.0", "vue-router": "^4.5.0",
"vue3-tags-input": "^1.0.12" "vue3-tags-input": "^1.0.12"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^5.2.1", "@vitejs/plugin-vue": "^5.2.1",
"sass-embedded": "^1.83.4", "sass-embedded": "^1.85.1",
"vite": "^5.4.12" "vite": "^6.2.0"
} }
} }

View File

@ -4,8 +4,7 @@ import { notify } from "@kyvg/vue3-notification";
import { apiWrapper } from '@/helpers/fetch-wrapper' import { apiWrapper } from '@/helpers/fetch-wrapper'
import router from '../router' import router from '../router'
export const authStore = defineStore({ export const authStore = defineStore('auth',{
id: 'auth',
state: () => ({ state: () => ({
// initialize state from local storage to enable user to stay logged in // initialize state from local storage to enable user to stay logged in
user: JSON.parse(localStorage.getItem('user')), user: JSON.parse(localStorage.getItem('user')),
@ -122,4 +121,4 @@ export const authStore = defineStore({
} }
}, },
} }
}); });

View File

@ -7,8 +7,7 @@ import { base64_url_encode } from '@/helpers/encoding';
const baseUrl = `/interface` const baseUrl = `/interface`
export const interfaceStore = defineStore({ export const interfaceStore = defineStore('interfaces', {
id: 'interfaces',
state: () => ({ state: () => ({
interfaces: [], interfaces: [],
prepared: freshInterface(), prepared: freshInterface(),

View File

@ -8,8 +8,7 @@ import { ipToBigInt } from '@/helpers/utils';
const baseUrl = `/peer` const baseUrl = `/peer`
export const peerStore = defineStore({ export const peerStore = defineStore('peers', {
id: 'peers',
state: () => ({ state: () => ({
peers: [], peers: [],
stats: {}, stats: {},

View File

@ -8,8 +8,7 @@ import { ipToBigInt } from '@/helpers/utils';
const baseUrl = `/user` const baseUrl = `/user`
export const profileStore = defineStore({ export const profileStore = defineStore('profile', {
id: 'profile',
state: () => ({ state: () => ({
peers: [], peers: [],
interfaces: [], interfaces: [],

View File

@ -3,8 +3,7 @@ import { defineStore } from 'pinia'
import { notify } from "@kyvg/vue3-notification"; import { notify } from "@kyvg/vue3-notification";
import { apiWrapper } from '@/helpers/fetch-wrapper' import { apiWrapper } from '@/helpers/fetch-wrapper'
export const securityStore = defineStore({ export const securityStore = defineStore('security',{
id: 'security',
state: () => ({ state: () => ({
csrfToken: "", csrfToken: "",
}), }),
@ -29,4 +28,4 @@ export const securityStore = defineStore({
}) })
} }
} }
}); });

View File

@ -5,8 +5,7 @@ import { apiWrapper } from '@/helpers/fetch-wrapper'
const baseUrl = `/config` const baseUrl = `/config`
export const settingsStore = defineStore({ export const settingsStore = defineStore('settings', {
id: 'settings',
state: () => ({ state: () => ({
settings: {}, settings: {},
}), }),
@ -33,4 +32,4 @@ export const settingsStore = defineStore({
}) })
} }
} }
}); });

View File

@ -5,8 +5,7 @@ import { base64_url_encode } from '@/helpers/encoding';
const baseUrl = `/user` const baseUrl = `/user`
export const userStore = defineStore({ export const userStore = defineStore('users', {
id: 'users',
state: () => ({ state: () => ({
userPeers: [], userPeers: [],
users: [], users: [],

View File

@ -149,7 +149,7 @@ func defaultConfig() *Config {
Host: "127.0.0.1", Host: "127.0.0.1",
Port: 25, Port: 25,
Encryption: MailEncryptionNone, Encryption: MailEncryptionNone,
CertValidation: false, CertValidation: true,
Username: "", Username: "",
Password: "", Password: "",
AuthType: MailAuthPlain, AuthType: MailAuthPlain,