Commit Graph

844 Commits

Author SHA1 Message Date
Roopesh Chander d2e14cfb19 iOS: Tunnel detail: Reload runtime config every second 2019-02-01 15:27:17 +05:30
Roopesh Chander 26e6f23582 iOS: Tunnel detail: Refactor updation of status 2019-01-31 18:46:46 +05:30
Roopesh Chander d605613c62 Fix handling of 'PersistentKeepalive: every n seconds' 2019-01-31 18:22:08 +05:30
Roopesh Chander d2abc246cf iOS: Make it compile again 2019-01-31 18:17:04 +05:30
Roopesh Chander 60f1fee6e7 Configure timers to fire even when tracking mouse events 2019-01-31 17:04:34 +05:30
Roopesh Chander 85e9b48f87 macOS: Tunnel detail: Reload runtime config every second 2019-01-31 16:48:51 +05:30
Roopesh Chander 558f6db3c2 Logger: Convert do-catch to try? 2019-01-28 17:50:48 +05:30
Roopesh Chander 28e5a061c1 Runtime info: Make bytecount and timestamp info prettier 2019-01-28 17:27:08 +05:30
Roopesh Chander 69fddfa1f8 Persistent Keepalive detail should read 'every n seconds' 2019-01-28 16:07:28 +05:30
Roopesh Chander df7bdc0baa TunnelsManager: Invoke reload() in a subsequent runloop 2019-01-26 14:31:42 +05:30
Roopesh Chander 0c9380fe4e macOS: Delay .deactivated status to workaround system bug
For some time after it's connection status becomes .disconnected,
if a tunnel gets started, it gets automatically killed by the system
after ~25 seconds.
2019-01-26 14:25:38 +05:30
Roopesh Chander e8c644dfdf macOS: Select the active tunnel when showing the manage tunnels window 2019-01-24 18:35:11 +05:30
Roopesh Chander 4df2b7e642 TunnelsTracker: Simplify using TunnelsManager.tunnelInOperation() 2019-01-24 18:11:55 +05:30
Roopesh Chander a099d6fa26 TunnelsManager: func tunnelInOperation() 2019-01-24 18:11:26 +05:30
Roopesh Chander 1e3be2a51e macOS: Ensure status is up-to-date on startup 2019-01-24 16:51:01 +05:30
Roopesh Chander e95cb6e6bd Config file parsing: Fix bug when there are comments at the end 2019-01-24 16:23:07 +05:30
Jason A. Donenfeld 8c4475111b macOS: show runtime configuration in tunnel manager 2019-01-24 01:37:57 +01:00
Jason A. Donenfeld fef3e80472 Tunnel: support getting runtime configuration 2019-01-24 01:37:57 +01:00
Roopesh Chander 262d8800a1 macOS: Tunnel detail: Fix updation of tunnelEditVC 2019-01-23 19:26:43 +05:30
Roopesh Chander c45f591f8b macOS: Deactivate any active tunnel when app exits 2019-01-23 16:31:30 +05:30
Roopesh Chander 8c64f28742 macOS: Adapt to TunnelsManagerListDelegate changes 2019-01-23 16:21:20 +05:30
Roopesh Chander d272cc2ab3 iOS: Fix stale tunnel being shown on iPad
When the detail view is shown in the iPad and we delete
the current tunnel with a list view swipe rather than the delete button,
the detail view should go blank.
2019-01-23 16:11:55 +05:30
Roopesh Chander 775b65306d iOS: Fix handling of deletion outside app 2019-01-23 14:48:45 +05:30
Roopesh Chander b6ad3f39e0 macOS: reload: Iterate in reverse 2019-01-22 20:06:52 +05:30
Jason A. Donenfeld 5ddb81b654 TunnelsManager: refresh status after replacing insides 2019-01-22 15:35:14 +01:00
Jason A. Donenfeld 465b9037ba TunnelsManager: use new helper 2019-01-22 15:20:57 +01:00
Roopesh Chander f1cec084da macOS: Tunnel edit: Handle deletion outside app 2019-01-22 19:30:21 +05:30
Roopesh Chander f281b932c2 macOS: Tunnel detail: Handle deletion outside app 2019-01-22 19:30:21 +05:30
Roopesh Chander c477f721fb macOS: Handle tunnel deletions outside the app 2019-01-22 19:30:21 +05:30
Jason A. Donenfeld d3db8519b0 macOS: remove mobile network tweeks 2019-01-22 13:11:28 +01:00
Jason A. Donenfeld b3d9d582bf MacOS: StatusMenu: Properly localize menu title
Partially revert "macOS: StatusMenu: Remove unused menu title"
2019-01-22 11:26:07 +01:00
Roopesh Chander 658c54f59c macOS: Disable save button if the syntax highlighter detects any errors 2019-01-22 12:57:32 +05:30
Roopesh Chander d056732e27 macOS: Fix crash when importing using NoTunnelsDetailVC's button 2019-01-22 05:00:39 +05:30
Roopesh Chander 592ea5cfca macOS: StatusMenu: Remove unused menu title 2019-01-22 04:41:52 +05:30
Roopesh Chander 8b89c29ace Let there be newlines at the end of all files 2019-01-22 04:40:47 +05:30
Roopesh Chander 4f28737dbf Fix localization
- Use Unicode ellipses
 - Use single quotes everywhere
 - Use smart quotes
 - Minor text change ("You cannot undo this action.")
2019-01-22 04:35:13 +05:30
Roopesh Chander 927ce4c129 macOS: Use Unicode version of '...' for menu text 2019-01-22 04:16:22 +05:30
Roopesh Chander 0f140d2222 macOS: Fix status-related menu items 2019-01-22 04:11:24 +05:30
Roopesh Chander ca827d2d10 Better os() directives 2019-01-22 04:06:37 +05:30
Jason A. Donenfeld c0883e37c4 macOS: Tunnel edit: actually clean up error handling 2019-01-21 23:21:47 +01:00
Jason A. Donenfeld b69dbfda52 XCode: set default signing identity back 2019-01-21 23:17:08 +01:00
Roopesh Chander 808c95567a macOS: Tunnel edit: Clean up error handling when saving 2019-01-22 03:26:01 +05:30
Jason A. Donenfeld 285c21c84c macOS: Observe private key changes for new tunnels too 2019-01-21 22:55:25 +01:00
Jason A. Donenfeld 5b6b34d9c6 macOS: Better highlighter default value and move c implementation 2019-01-21 22:22:20 +01:00
Jason A. Donenfeld 015e94d0a1 macOS: Make highlighter themes static 2019-01-21 22:13:14 +01:00
Roopesh Chander ef54cae788 Avoid using return in single-line closures 2019-01-22 02:01:32 +05:30
Roopesh Chander 1df572218d macOS: Make color theme use a dict 2019-01-22 02:01:32 +05:30
Roopesh Chander dd38cbe7ac macOS: Reset attributes for each syntax highlight cycle 2019-01-22 01:19:16 +05:30
Roopesh Chander 053ea9fc54 macOS: Refactor syntax highlighting 2019-01-22 01:18:07 +05:30
Roopesh Chander a1608819f9 macOS: Simplify NSColor extension 2019-01-21 19:07:42 +05:30
Jason A. Donenfeld 150fd25569 macOS: show icon for inactive state 2019-01-18 21:17:53 +01:00
Jason A. Donenfeld 6b5b8f3c27 highlighter: do not rely on localized case comparisons 2019-01-18 09:32:49 +01:00
Jason A. Donenfeld 919c46af69 Xcode: move directives to toplevel project when possible 2019-01-18 09:32:49 +01:00
Jason A. Donenfeld aefd7425cf global: Fix up copyright headers 2019-01-18 09:32:49 +01:00
Roopesh Chander 02dbb4f94d TunnelsManager: Remove unused variable 2019-01-18 09:32:49 +01:00
Roopesh Chander 9dc6d68b80 macOS: Tunnel detail: Better alignment for bottom controls 2019-01-18 09:32:49 +01:00
Roopesh Chander 5c4b43bcaf macOS: Rafactor by introducing a TunnelsTracker
The TunnelTracker is now the central place to track what the current
tunnel is, and for keeping track of the tunnel list.
2019-01-18 01:34:24 +05:30
Roopesh Chander a61a043537 macOS: Fix autolayout errors on Add Empty Tunnel 2019-01-17 14:20:09 +05:30
Roopesh Chander 1e25c4f554 macOS: Update copyright year 2019-01-17 14:08:11 +05:30
Roopesh Chander b345005645 macOS: Make sure app is active when showing the About dialog 2019-01-17 14:05:23 +05:30
Roopesh Chander 50f6ff311c macOS: Application: Fix comment 2019-01-17 14:03:59 +05:30
Roopesh Chander 19a738b509 macOS: Manage tunnels: Make keyboard shortcuts discoverable 2019-01-17 02:43:24 +05:30
Roopesh Chander 3e850963fc macOS: Manage tunnels: Keyboard shortcuts 2019-01-17 01:44:50 +05:30
Roopesh Chander 4c8c397fac macOS: Tunnel edit: Rename action handling methods 2019-01-17 01:28:57 +05:30
Roopesh Chander 8530ce1545 macOS: Tunnel detail: Rename action handling methods 2019-01-17 00:41:32 +05:30
Roopesh Chander e116365ea4 macOS: Tunnels list: Rename action handling methods 2019-01-17 00:38:44 +05:30
Roopesh Chander e7b40cf993 macOS: Support window management keyboard shortcuts 2019-01-16 18:01:59 +05:30
Jason A. Donenfeld fe1840b028 macOS: Networks should show allowedIPs and disappear when inactive 2019-01-15 22:35:30 +01:00
Roopesh Chander 670673cccc macOS: Use tunnelOverheadBytes for automatic MTU in macOS 2019-01-16 01:51:56 +05:30
Roopesh Chander b6d159ac96 macOS: Different status bar icon looks for different states
- Looks dimmed when no tunnel is active
 - Looks normal when a tunnel is active
 - Animates when a tunnel is activating
2019-01-16 01:26:10 +05:30
Roopesh Chander 02814ba546 macOS: Add About dialog 2019-01-14 14:52:37 +05:30
Roopesh Chander e1d329707a macOS: Add app icon 2019-01-14 14:52:37 +05:30
Roopesh Chander 93b9b0442b macOS: Edit view: Auto hide editor scrollbars 2019-01-14 14:52:37 +05:30
Roopesh Chander ea053c2701 macOS: To set default size, change frame instead of min size 2019-01-14 14:52:37 +05:30
Roopesh Chander bec0cb1e75 macOS: Fix editor scrolling 2019-01-14 14:52:37 +05:30
Eric Kuck 1c3cf52c7d Default view controller sizes 2019-01-14 14:52:36 +05:30
Jason A. Donenfeld 40cabd6e66 ConfTextView: enable undo and disable junk
Double space stil makes a period, unfortunately.
2019-01-14 14:52:36 +05:30
Eric Kuck ab48f7bed8 Cut/copy/paste now work 2019-01-14 14:52:36 +05:30
Jason A. Donenfeld 171989ec56 Resync highlighter 2019-01-14 14:52:36 +05:30
Eric Kuck 2617eab35e Syntax highlighter color updates 2019-01-14 14:52:36 +05:30
Roopesh Chander 1e848c5ef8 macOS: Support for on-demand activation 2019-01-14 14:52:36 +05:30
Roopesh Chander 59f8cc792b macOS: Quit menu item 2019-01-14 14:52:36 +05:30
Roopesh Chander d681e70ce5 macOS: Get the app back in focus after macOS' VPN prompt 2019-01-14 14:52:35 +05:30
Roopesh Chander f68648f874 macOS: Fix 'Network' entry in menu 2019-01-14 14:52:35 +05:30
Roopesh Chander 341f15678f macOS: Ensure a tunnel is selected when '-' is clicked 2019-01-14 14:52:35 +05:30
Roopesh Chander 874057fb9e macOS: Handle errors from TunnelsManager.create() 2019-01-14 14:52:35 +05:30
Roopesh Chander 2724a99733 iOS: Export log: Should present error from the main thread 2019-01-14 14:52:35 +05:30
Roopesh Chander 5cd3859b47 macOS: Localize export sheets 2019-01-14 14:52:35 +05:30
Roopesh Chander 3969cc6ee3 macOS: Import sheet button should say 'Import' 2019-01-14 14:52:35 +05:30
Roopesh Chander 0b8d18b842 macOS: Tunnel detail: Ensure long keys fit 2019-01-14 14:52:35 +05:30
Roopesh Chander 718c316933 macOS: Manage tunnels: Add empty tunnel pulldown menu implementation 2019-01-14 14:52:35 +05:30
Roopesh Chander 14decf0146 macOS: Update detail view after editing 2019-01-14 14:52:35 +05:30
Roopesh Chander e428708631 macOS: Edit view: Update public key as you edit 2019-01-14 14:52:35 +05:30
Roopesh Chander 5802c74245 Highlighter: Report each key type separately 2019-01-14 14:52:34 +05:30
Roopesh Chander 728b3ef61f Parsing: Always error on unrecognized keys 2019-01-14 14:52:34 +05:30
Roopesh Chander bc9f050d7f Parsing: Error on duplicate entries 2019-01-14 14:52:34 +05:30
Roopesh Chander 3830499ac1 macOS: Edit view: Validate and save 2019-01-14 14:52:34 +05:30
Roopesh Chander 309d06217f macOS: Refactor config file parsing
- To report more fine grained errors
 - To make the parse errors conform to WireGuardAppError
2019-01-14 14:52:34 +05:30
Eric Kuck e0aaf0661f Syntax highlighter color updates 2019-01-14 14:52:34 +05:30
Jason A. Donenfeld 1c7ae7a334 Highlighter: use original file from contrib/examples/highlighter
This makes it easier to track updates and make diffs. Also, disable
things we don't support in the NetworkExtension app.
2019-01-14 14:52:34 +05:30
Eric Kuck 3795a06e92 Added syntax highlighting conf textview 2019-01-14 14:52:34 +05:30
Roopesh Chander b5cfa60c8a macOS: Tunnel edit view 2019-01-14 14:52:33 +05:30
Roopesh Chander b35ebd8a67 macOS: Rename *Cell to *Row 2019-01-14 14:52:33 +05:30
Roopesh Chander ab077422d8 macOS: On adding the first tunnel, select it 2019-01-14 14:52:33 +05:30
Roopesh Chander 6b587b4a11 macOS: Consolidate presenting of the import panel 2019-01-14 14:52:33 +05:30
Roopesh Chander 4b4fa6519a macOS: Manage tunnels: Handle the case when there are no tunnels 2019-01-14 14:52:33 +05:30
Roopesh Chander eddfee90f1 macOS: Present tunnel activation errors from the window when possible 2019-01-14 14:52:33 +05:30
Roopesh Chander c14e156926 macOS: Present errors as a sheet when applicable 2019-01-14 14:52:32 +05:30
Roopesh Chander ca5e90a70e macOS: Manage tunnels: Remove tunnel 2019-01-14 14:52:32 +05:30
Roopesh Chander 78c11a1f14 macOS: Manage tunnels: Update tunnels list on changes 2019-01-14 14:52:32 +05:30
Roopesh Chander 37d84f9f3b macOS: Manage tunnels: Export log pulldown menu implementation 2019-01-14 14:52:32 +05:30
Roopesh Chander fde0d67dda macOS: Manage tunnels: Export tunnels pulldown menu implementation 2019-01-14 14:52:32 +05:30
Roopesh Chander ae991167f2 macOS: Xcode: Add ablity to save files 2019-01-14 14:52:32 +05:30
Roopesh Chander fda8a5d83b macOS: Manage tunnels: Select first tunnel on showing the window 2019-01-14 14:52:32 +05:30
Roopesh Chander 14fa8530d7 macOS: Manage tunnels: Set window title 2019-01-14 14:52:32 +05:30
Roopesh Chander 59e5247e0f macOS: Manage tunnels: Import pulldown menu implementation 2019-01-14 14:52:32 +05:30
Roopesh Chander 005a2c37c2 macOS: Manage tunnels: Localize pulldown menu items 2019-01-14 14:52:32 +05:30
Roopesh Chander 79feef3d1d macOS: Show open panel as sheet on manage window 2019-01-14 14:52:32 +05:30
Roopesh Chander 8a08b9cc2c macOS: Manage tunnels: Adjust spacings 2019-01-14 14:52:32 +05:30
Roopesh Chander f26f4b5e7d macOS: Manage tunnels: Add a box around the detail view 2019-01-14 14:52:31 +05:30
Roopesh Chander 5ed147aa3e macOS: Manage tunnels: Show status checkbox and edit button 2019-01-14 14:52:31 +05:30
Roopesh Chander 9535a0c585 macOS: s/macMenuStatus/macStatus/g; 2019-01-14 14:52:31 +05:30
Roopesh Chander 50ed363ef2 macOS: Manage tunnels: Tunnel detail view 2019-01-14 14:52:31 +05:30
Roopesh Chander 5bd9b6f9d4 macOS: Manage tunnels: Add a filler button 2019-01-14 14:52:31 +05:30
Roopesh Chander 301dc81770 macOS: Manage tunnels: Fix list view look 2019-01-14 14:52:31 +05:30
Roopesh Chander 3bfcfe61a6 macOS: Manage tunnels: Add buttons to the bottom of the list view 2019-01-14 14:52:30 +05:30
Roopesh Chander 8d39a2725c macOS: Manage tunnels window: Tunnels list 2019-01-14 14:52:30 +05:30
Roopesh Chander 8008498ffc macOS: Capitalize All Rights Reserved 2019-01-14 14:52:30 +05:30
Roopesh Chander b024887052 macOS: Show status as disabled menu items 2019-01-14 14:52:30 +05:30
Roopesh Chander e61da844bd macOS: Ability to activate / deactivate a tunnel 2019-01-14 14:52:30 +05:30
Roopesh Chander c1a5fb7ddd macOS: Ability to import tunnels from file
For now, the open panel shows as a separate window.
Later, we'll open it as a sheet on the 'Manage tunnels' window.
2019-01-14 14:52:30 +05:30
Roopesh Chander c8b3d5a8ed iOS: Refactor importFromFile
So that it can be used in macOS as well
2019-01-14 14:52:29 +05:30
Roopesh Chander 3d97b59a4f macOS: Add tunnel management menu items 2019-01-14 14:52:29 +05:30
Roopesh Chander 93d7bfa12c macOS: Specify app is an 'agent'
This hides the app from the Dock, while still enabling the app
to come to the foreground if required.
2019-01-14 14:52:29 +05:30
Roopesh Chander f5e5fa4d5e macOS: Create status bar with tunnel names 2019-01-14 14:52:29 +05:30
Roopesh Chander 0355d55937 macOS: Add status bar icon 2019-01-14 14:52:29 +05:30
Roopesh Chander ee4eae0ade macOS: Remove MainMenu.xib
When there's no xib, we should explicitly set the app delegate, so we
override NSApplication and set the app delegate in NSApplication.shared
2019-01-14 14:52:29 +05:30
Roopesh Chander 1e543f7f8c macOS: NE: Add entitlements for making network connections 2019-01-14 14:52:28 +05:30
Roopesh Chander c41be2a29d Make app groups work on both iOS and macOS 2019-01-14 14:52:28 +05:30
Roopesh Chander c8a8d4ba1e macOS: Add Network Extensions capability to app 2019-01-14 14:52:28 +05:30
Roopesh Chander 2632ead1bf iOS: Fix WireGuardNetworkExtensioniOS target
- Rename WireGuardNetworkExtension.entitlements to WireGuardNetworkExtension_iOS.entitlements
2019-01-14 14:52:28 +05:30
Roopesh Chander 10ff41cc64 iOS: Fix WireGuardiOS target
- Move Info.plist and entitlements to WireGuard/UI/iOS/
2019-01-14 14:52:28 +05:30
Roopesh Chander 3ea00e1f41 macOS: Fix WireGuardmacOS target
- Include non-UI code from iOS while building
- Add run scripts
- Move files to WireGuard/UI/macOS
- Set Swift-Obj-C bridging header
2019-01-14 14:52:28 +05:30
Roopesh Chander 966883ea05 macOS: Fix WireGuardNetworkExtensionmacOS target
- Build using common network extension code
- Add run scripts
- Set Info.plist to common network extension's Info.plist
- Move entitlements to common network extension folder
- Remove Xcode-generated macOS network extension code
- Set Swift-Obj-C bridging header
2019-01-14 14:52:27 +05:30
Roopesh Chander 548d6bda72 macOS: WireGuardNetworkExtensionmacOS depends on WireGuardGoBridgemacOS 2019-01-14 14:52:27 +05:30
Roopesh Chander fae6bc6bdf macOS: Add WireGuardNetworkExtensionmacOS target 2019-01-14 14:52:27 +05:30
Roopesh Chander 46b26a146c macOS: Add WireGuardmacOS target 2019-01-14 14:52:27 +05:30
Roopesh Chander 1fa38101c5 Xcode: Add WireGuardGoBridgemacOS target 2019-01-14 14:52:27 +05:30
Roopesh Chander ad502331f0 Move iOS images and storyboard into UI/iOS/ folder 2019-01-14 14:52:27 +05:30
Roopesh Chander 6ec9e94a39 Xcode: Rename iOS targets to include an 'iOS' suffix
But keep the PRODUCT_NAME as 'WireGuard', not 'WireGuardiOS'.
2019-01-14 14:52:26 +05:30