aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/TunnelViewModel.swift (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Model: Declare keyLength constant and use that wherever applicableRoopesh Chander2018-12-091-4/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* On-Demand: TunnelViewModel: Make activate-on-demand methods staticRoopesh Chander2018-12-081-2/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* On-Demand: Move detail text to TunnelViewModelRoopesh Chander2018-12-081-0/+12
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Make strings consistentJason A. Donenfeld2018-12-071-4/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* It's 'WiFi', not 'Wifi'Roopesh Chander2018-11-281-5/+5
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: Invalidate the configuration object when updating allowedIPs using the 'Exclude private IPs' switchRoopesh Chander2018-11-191-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: VPN-on-demand stuff shouldn't be part of the tunnel modelRoopesh Chander2018-11-121-16/+22
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit, Tunnel view model: UI for providing On-Demand activation optionsRoopesh Chander2018-11-111-0/+16
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: Ensure that a TunnelConfiguration always has a valid array of peersRoopesh Chander2018-11-101-2/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: Peers in a configuation may not share the same public keyRoopesh Chander2018-11-061-0/+7
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: No need to save if we already have a validated configuration objectRoopesh Chander2018-11-051-0/+8
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Global: run through swiftlintJason A. Donenfeld2018-11-031-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Ensure that all tunnel names are trimmed of whitespacesRoopesh Chander2018-11-031-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: If there's just one peer, populate the scratchpad on initRoopesh Chander2018-11-021-7/+13
| | | | | | So that exclude private IPs can be computed correctly. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: Initialize peerData.numberOfPeersRoopesh Chander2018-11-021-0/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Global: fix up stringsJason A. Donenfeld2018-11-011-13/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: More elegant copy-to-clipboard behaviorJason A. Donenfeld2018-10-311-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Tunnel view model: IP address can be specified without '/cidr'Roopesh Chander2018-10-301-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Global: fix up captialization in headersJason A. Donenfeld2018-10-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Tunnel view model: Support for exclude private IPsRoopesh Chander2018-10-291-0/+70
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: Allow creating an interface with empty nameRoopesh Chander2018-10-271-1/+1
| | | | | | | | But don't allow such a tunnel to be added to the tunnel manager. (We'll need to create an interface with an empty name when we're reading QR codes.) Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: MTU should be a 16-bit integerRoopesh Chander2018-10-271-2/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel detail: Don't show fields that have empty valueRoopesh Chander2018-10-271-0/+28
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel creation: Compute public key from private key as the text is being editedRoopesh Chander2018-10-271-0/+12
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: Populate interface's public keyRoopesh Chander2018-10-271-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Smaller copyright headersRoopesh Chander2018-10-271-7/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: Add copy public keyRoopesh Chander2018-10-271-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: The view model applies for both editing and viewingRoopesh Chander2018-10-271-8/+8
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: Use DNSServer in the Configuration modelRoopesh Chander2018-10-271-4/+13
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: listenPort and persistentKeepAlive should be 16-bit integersRoopesh Chander2018-10-271-4/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel creation: Refactor by creating a separate view modelRoopesh Chander2018-10-271-0/+309
Signed-off-by: Roopesh Chander <roop@roopc.net>