Skip to content

Conversation

@JohnDaWalka
Copy link

@JohnDaWalka JohnDaWalka commented Apr 28, 2025

  • AppDelegate.swift

    • Add code to initialize the TunnelsManager in the application(_:didFinishLaunchingWithOptions:) method.
    • Add code to handle the import of VPN configurations from files in the application(_:open:options:) method.
  • MainViewController.swift

    • Add code to initialize the TunnelsManager in the viewDidLoad method.
  • Info.plist

    • Add the com.apple.developer.networking.networkextension entitlement.
    • Add the com.apple.developer.networking.wifi-info entitlement.

This change is Reviewable

zx2c4 and others added 30 commits November 17, 2022 01:17
People keep asking.

Signed-off-by: Jason A. Donenfeld <[email protected]>
According to [1], the `capacity` parameter is specified as "the number
of instances of T in the re-bound region" and not the total size of the
rebound struct.

Without this patch, there are crashes in the extension with the
following error:

  Fatal error: self must be a properly aligned pointer for types Pointee and T`

Since the subsequent line in the code only reads `sizeof(in_addr)` or
`sizeof(in6_addr)` anyway, change the `capacity` parameter to just be a
count of 1.

[1] https://developer.apple.com/documentation/swift/unsafepointer/withmemoryrebound(to:capacity:_:)

Signed-off-by: John Biggs <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
This allows us to remove a good deal of legacy cruft.

Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Since around iOS 15.1, calling `setNetworkSettings()` when in
airplane mode, throws an unknown error:

Error Domain=NEAgentErrorDomain Code=1

Signed-off-by: Andrej Mihajlov <[email protected]>
This prevents linking against wg-go when 3rd-party application needs to
use the WireGuardKit types from within the main bundle, therefore
prevents wg-go from spinning off Golang threads where not applicable.

Signed-off-by: Andrej Mihajlov <[email protected]>
Signed-off-by: Andrej Mihajlov <[email protected]>
Signed-off-by: Andrej Mihajlov <[email protected]>
Signed-off-by: Andrej Mihajlov <[email protected]>
Signed-off-by: Andrej Mihajlov <[email protected]>
Signed-off-by: Andrej Mihajlov <[email protected]>
pinkisemils and others added 30 commits September 24, 2024 12:44
* **AppDelegate.swift**
  - Add code to initialize the `TunnelsManager` in the `application(_:didFinishLaunchingWithOptions:)` method.
  - Add code to handle the import of VPN configurations from files in the `application(_:open:options:)` method.

* **MainViewController.swift**
  - Add code to initialize the `TunnelsManager` in the `viewDidLoad` method.

* **Info.plist**
  - Add the `com.apple.developer.networking.networkextension` entitlement.
  - Add the `com.apple.developer.networking.wifi-info` entitlement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants