mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-27 07:06:03 +01:00
Add speed profiles to limit the bandwidth of each peer
This commit is contained in:
@@ -73,6 +73,10 @@ class WireGuardInstance(models.Model):
|
||||
worker = models.ForeignKey(
|
||||
'cluster.Worker', on_delete=models.PROTECT, blank=True, null=True, related_name='wireguard_instances'
|
||||
)
|
||||
# Speed profile given to the peers created in this instance
|
||||
default_speed_profile = models.ForeignKey(
|
||||
'speed_profiles.SpeedProfile', on_delete=models.PROTECT, blank=True, null=True, related_name='default_for_instances'
|
||||
)
|
||||
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
@@ -210,6 +214,9 @@ class Peer(models.Model):
|
||||
routing_template = models.ForeignKey(
|
||||
'routing_templates.RoutingTemplate', on_delete=models.SET_NULL, blank=True, null=True, related_name='peers'
|
||||
)
|
||||
speed_profile = models.ForeignKey(
|
||||
'speed_profiles.SpeedProfile', on_delete=models.PROTECT, blank=True, null=True, related_name='peers'
|
||||
)
|
||||
|
||||
# Remote address (host:port) for peers that this server connects to, instead of waiting for them to connect
|
||||
endpoint = models.CharField(max_length=255, blank=True, default='')
|
||||
|
||||
Reference in New Issue
Block a user