Sunil Mohan Adapa b96c5e5433
wireguard: Update descriptions in form labels
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:29 -05:00

61 lines
2.2 KiB
Python

#
# This file is part of FreedomBox.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Forms for wireguard module.
"""
from django import forms
from django.utils.translation import ugettext_lazy as _
class AddClientForm(forms.Form):
"""Form to add client."""
public_key = forms.CharField(
label=_('Public Key'), strip=True,
help_text=_('Public key of the peer.'))
class AddServerForm(forms.Form):
"""Form to add server."""
endpoint = forms.CharField(
label=_('Endpoint'), strip=True,
help_text=_('Server endpoint with the form "ip:port".'))
client_ip_address = forms.CharField(
label=_('Client IP address provided by server'), strip=True,
help_text=_('IP address assigned to the client on the VPN after '
'connecting to the endpoint.'))
public_key = forms.CharField(
label=_('Public key of the server'), strip=True,
help_text=_('Public key of the server.'))
client_private_key = forms.CharField(
label=_('Private key of the client'), strip=True,
help_text=_('Optional. A new key is generated if left blank.'),
required=False)
pre_shared_key = forms.CharField(
label=_('Pre-shared key'), strip=True, required=False,
help_text=_('Optional. A shared secret key provided by the server to '
'add an additional layer of encryption.'))
all_outgoing_traffic = forms.BooleanField(
label=_('Use this connection to send all outgoing traffic'),
required=False,
help_text=_('Use this connection to send all outgoing traffic.'))