Post

Replies

Boosts

Views

Activity

Reply to Setup vpn settings for NEPacketTunnelProvider
When trying something like class PacketTunnelProvider: NEPacketTunnelProvider {     override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) { let networkSettings = NETunnelNetworkSettings(tunnelRemoteAddress: "127.0.0.1") setTunnelNetworkSettings(networkSettings) { error in debugPrint(error)         completionHandler(error)         } I get the following error: Error Domain=NETunnelProviderErrorDomain Code=1 \"NEPacketTunnelNetworkSettings must be used with NEPacketTunnelProvider\" UserInfo={NSLocalizedDescription=NEPacketTunnelNetworkSettings must be used with NEPacketTunnelProvider}
Jan ’23
Reply to Need help with handling flows inside NEDNSProxyProvider
@eskimo Thanks for your reply. There's less mess in my head now) Regarding the high-level task I'm trying to achieve: basically, I need DNS settings but with an in-app on/off toggle. And since the use of dns settings requires the user to go into settings app, using that approach is a no-go. I'm well aware of MDM requirement when it comes to DNS proxy, that's not a problem.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’23
Reply to NEProvider creation failed
@meaton, the steps you have provided did get the expension up and running. Thanks But can you please explain a bit more about serverAddress. I don't understand fully how DNS works it seems. My idea was that with DNS Proxy one can intercept DNS requests and modify them (for example, route dns resolution requests to different dns servers based on some set of rules). So why does one need to point the proxy traffic towards some specific server? And what kind of server should that be?
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’23
Reply to ASAuthorizationPlatformPublicKeyCredentialAssertion.signature algorithm
I turns out that ASAuthorizationController accepts data in raw format, meaning Base64URL should first be decoded, then sent into the controller, and the output should be encoded back into Base64URL
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’25
Reply to 'Expand macro' menu option does nothing
Never mind, there was a quirk with the macro implementation
Replies
Boosts
Views
Activity
Nov ’24
Reply to Setup vpn settings for NEPacketTunnelProvider
When trying something like class PacketTunnelProvider: NEPacketTunnelProvider {     override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) { let networkSettings = NETunnelNetworkSettings(tunnelRemoteAddress: "127.0.0.1") setTunnelNetworkSettings(networkSettings) { error in debugPrint(error)         completionHandler(error)         } I get the following error: Error Domain=NETunnelProviderErrorDomain Code=1 \"NEPacketTunnelNetworkSettings must be used with NEPacketTunnelProvider\" UserInfo={NSLocalizedDescription=NEPacketTunnelNetworkSettings must be used with NEPacketTunnelProvider}
Replies
Boosts
Views
Activity
Jan ’23
Reply to Need help with handling flows inside NEDNSProxyProvider
You mean NEDNSSettings? If so, implementing a DNS proxy is a lot of work just to get that in-app control. Yes, exactly that. Seems like NEDNSProxyProvider is not a solution for the problem... `
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to Need help with handling flows inside NEDNSProxyProvider
@eskimo Thanks for your reply. There's less mess in my head now) Regarding the high-level task I'm trying to achieve: basically, I need DNS settings but with an in-app on/off toggle. And since the use of dns settings requires the user to go into settings app, using that approach is a no-go. I'm well aware of MDM requirement when it comes to DNS proxy, that's not a problem.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to NEProvider creation failed
@meaton, the steps you have provided did get the expension up and running. Thanks But can you please explain a bit more about serverAddress. I don't understand fully how DNS works it seems. My idea was that with DNS Proxy one can intercept DNS requests and modify them (for example, route dns resolution requests to different dns servers based on some set of rules). So why does one need to point the proxy traffic towards some specific server? And what kind of server should that be?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to Is it possible to route specific DNS requests to the local DNS server with custom NEDNSSettingsManager configuration?
Figured out what to do using on demand rules described here: https://www.wwdcnotes.com/notes/wwdc20/10047 . It turns out that the rules are evaluated one-by-one, and the .neverConnect means that the matching request is handled by the default DNS provider, not our custom one (which is exactly what I need)
Replies
Boosts
Views
Activity
Jan ’23
Reply to dns_parse_packet API not working
@eskimo Hello. Has this one been fixed?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to NEProvider creation failed
@meaton You'll want to provide some sort of serverAddress for NEDNSProxyProviderProtocol. Is this the same "https://my.dns.server/dns-query" one would use with NEDNSOverHTTPSSettings?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’23