mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-08-26 21:31:14 +00:00
Port forwarding skeleton
This commit is contained in:
35
firewall/migrations/0001_initial.py
Normal file
35
firewall/migrations/0001_initial.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# Generated by Django 5.0.2 on 2024-02-26 12:59
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('wireguard', '0014_alter_wireguardinstance_dns_primary_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='RedirectRule',
|
||||
fields=[
|
||||
('description', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('protocol', models.CharField(choices=[('tcp', 'TCP'), ('udp', 'UDP')], default='tcp', max_length=3)),
|
||||
('port', models.PositiveIntegerField(default=8080)),
|
||||
('add_forward_rule', models.BooleanField(default=True)),
|
||||
('ip_address', models.GenericIPAddressField(blank=True, null=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('updated', models.DateTimeField(auto_now=True)),
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
('peer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wireguard.peer')),
|
||||
('wireguard_instance', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wireguard.wireguardinstance')),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('port', 'protocol')},
|
||||
},
|
||||
),
|
||||
]
|
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.0.2 on 2024-02-26 13:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('firewall', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='redirectrule',
|
||||
name='masquerade_source',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='redirectrule',
|
||||
name='ip_address',
|
||||
field=models.GenericIPAddressField(blank=True, null=True, protocol='IPv4'),
|
||||
),
|
||||
]
|
0
firewall/migrations/__init__.py
Normal file
0
firewall/migrations/__init__.py
Normal file
Reference in New Issue
Block a user