Everything is a tunnel.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -22,7 +22,7 @@ extension Interface {
|
||||
@NSManaged public var mtu: Int32
|
||||
@NSManaged public var dns: String?
|
||||
@NSManaged public var table: String?
|
||||
@NSManaged public var profile: Profile?
|
||||
@NSManaged public var tunnel: Tunnel?
|
||||
@NSManaged public var adresses: NSSet?
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,6 @@ extension Peer {
|
||||
@NSManaged public var allowedIPs: String?
|
||||
@NSManaged public var endpoint: String?
|
||||
@NSManaged public var persistentKeepalive: Int16
|
||||
@NSManaged public var profile: Profile?
|
||||
@NSManaged public var tunnel: Tunnel?
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// Profile+CoreDataClass.swift
|
||||
// WireGuard
|
||||
//
|
||||
// Created by Jeroen Leenarts on 23-05-18.
|
||||
// Copyright © 2018 WireGuard. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
@objc(Profile)
|
||||
public class Profile: NSManagedObject {
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// Profile+CoreDataProperties.swift
|
||||
// WireGuard
|
||||
//
|
||||
// Created by Jeroen Leenarts on 23-05-18.
|
||||
// Copyright © 2018 WireGuard. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
extension Profile {
|
||||
|
||||
@nonobjc public class func fetchRequest() -> NSFetchRequest<Profile> {
|
||||
return NSFetchRequest<Profile>(entityName: "Profile")
|
||||
}
|
||||
|
||||
@NSManaged public var title: String?
|
||||
@NSManaged public var peers: NSSet?
|
||||
@NSManaged public var interface: Interface?
|
||||
|
||||
}
|
||||
|
||||
// MARK: Generated accessors for peers
|
||||
extension Profile {
|
||||
|
||||
@objc(addPeersObject:)
|
||||
@NSManaged public func addToPeers(_ value: Peer)
|
||||
|
||||
@objc(removePeersObject:)
|
||||
@NSManaged public func removeFromPeers(_ value: Peer)
|
||||
|
||||
@objc(addPeers:)
|
||||
@NSManaged public func addToPeers(_ values: NSSet)
|
||||
|
||||
@objc(removePeers:)
|
||||
@NSManaged public func removeFromPeers(_ values: NSSet)
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
<attribute name="privateKey" attributeType="String" syncable="YES"/>
|
||||
<attribute name="table" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<relationship name="adresses" toMany="YES" deletionRule="Cascade" destinationEntity="Address" inverseName="interface" inverseEntity="Address" syncable="YES"/>
|
||||
<relationship name="profile" maxCount="1" deletionRule="Nullify" destinationEntity="Profile" inverseName="interface" inverseEntity="Profile" syncable="YES"/>
|
||||
<relationship name="tunnel" maxCount="1" deletionRule="Nullify" destinationEntity="Tunnel" inverseName="interface" inverseEntity="Tunnel" syncable="YES"/>
|
||||
</entity>
|
||||
<entity name="Peer" representedClassName="Peer" syncable="YES">
|
||||
<attribute name="allowedIPs" attributeType="String" syncable="YES"/>
|
||||
@@ -20,17 +20,17 @@
|
||||
<attribute name="persistentKeepalive" attributeType="Integer 16" minValueString="0" maxValueString="65535" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||
<attribute name="presharedKey" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<attribute name="publicKey" attributeType="String" syncable="YES"/>
|
||||
<relationship name="profile" maxCount="1" deletionRule="Nullify" destinationEntity="Profile" inverseName="peers" inverseEntity="Profile" syncable="YES"/>
|
||||
<relationship name="tunnel" maxCount="1" deletionRule="Nullify" destinationEntity="Tunnel" inverseName="peers" inverseEntity="Tunnel" syncable="YES"/>
|
||||
</entity>
|
||||
<entity name="Profile" representedClassName="Profile" syncable="YES">
|
||||
<entity name="Tunnel" representedClassName="Tunnel" syncable="YES">
|
||||
<attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<relationship name="interface" maxCount="1" deletionRule="Cascade" destinationEntity="Interface" inverseName="profile" inverseEntity="Interface" syncable="YES"/>
|
||||
<relationship name="peers" toMany="YES" minCount="1" deletionRule="Cascade" destinationEntity="Peer" inverseName="profile" inverseEntity="Peer" syncable="YES"/>
|
||||
<relationship name="interface" maxCount="1" deletionRule="Cascade" destinationEntity="Interface" inverseName="tunnel" inverseEntity="Interface" syncable="YES"/>
|
||||
<relationship name="peers" toMany="YES" minCount="1" deletionRule="Cascade" destinationEntity="Peer" inverseName="tunnel" inverseEntity="Peer" syncable="YES"/>
|
||||
</entity>
|
||||
<elements>
|
||||
<element name="Interface" positionX="-54" positionY="-9" width="128" height="165"/>
|
||||
<element name="Peer" positionX="-36" positionY="9" width="128" height="135"/>
|
||||
<element name="Profile" positionX="-63" positionY="-18" width="128" height="90"/>
|
||||
<element name="Address" positionX="-54" positionY="45" width="128" height="75"/>
|
||||
<element name="Address" positionX="0" positionY="0" width="0" height="0"/>
|
||||
<element name="Interface" positionX="0" positionY="0" width="0" height="0"/>
|
||||
<element name="Peer" positionX="0" positionY="0" width="0" height="0"/>
|
||||
<element name="Tunnel" positionX="0" positionY="0" width="0" height="0"/>
|
||||
</elements>
|
||||
</model>
|
||||
Reference in New Issue
Block a user