Allowing dns wss peer-to-peer connections on IOS app

Hello,

I'm trying to allow dns wss peer-to-peer connections on my Iphone app in debug mode. An example for an address it would try to connect to: /dns/example.io/tcp/443/wss/p2p/PeerID

I included NSAppTransportSecurity and NSAllowsArbitraryLoads in my info-debug.plist. I also added NSBonjourServices and set the value to an array with the string _dartobservatory._tcp.

My .plist file looks like this now:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>$(DEVELOPMENT_LANGUAGE)</string>
	<key>CFBundleDisplayName</key>
	<string>Trappist Extra</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>trappist_extra</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>$(FLUTTER_BUILD_NAME)</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>$(FLUTTER_BUILD_NUMBER)</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>NSLocalNetworkUsageDescription</key>
	<string>Test Smoldot</string>
	<key>UIApplicationSupportsIndirectInputEvents</key>
	<true/>
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key>
		<true/>
		<key>NSAllowsLocalNetworking</key>
		<true/>
	</dict>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>NSBonjourServices</key>
	<array>
		<string>_dartobservatory._tcp</string>
	</array>
	<key>UIViewControllerBasedStatusBarAppearance</key>
	<false/>
	<key>CADisableMinimumFrameDurationOnPhone</key>
	<true/>
</dict>
</plist>

Unfortunately it still doesn't work. Am I missing something?

Thanks in advance!

I’m not exactly sure what a “dns wss peer-to-peer connection” is. If you clarify that, I may be able to give you a better answer. However, I can address this point:

I included NSAppTransportSecurity and NSAllowsArbitraryLoads in my info-debug.plist.

It sounds like you think that NSAllowsArbitraryLoads disables TLS server trust evaluation. It does not. Rather, it disables the additional HTTPS checks done by ATS. Systems that do TLS still do the standard TLS server trust evaluation. That trust evaluation will typically fail in a peer-to-peer environment. To get your connection to go through you have to override that. How you do that depends on the API in question. Technote 2232 HTTPS Server Trust Evaluation has a summary of this for various APIs, although it hasn’t been updated for the latest stuff (so no Network framework).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm trying to make a websocket connection.

Apple has two WebSocket APIs [1]:

  • URLSession

  • Network framework

Which are you using?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] For years we had 0 WebSocket APIs, and now we have 2!

Allowing dns wss peer-to-peer connections on IOS app
 
 
Q