Traceroute from Sandbox

Thanks for all the comments on this, everyone. After doing a lot of experimenting with the ideas expressed here I have decided to give up on adding traceroute to the Mac version of the app. It’s been in the app store for a couple of years now so I don’t want to pull it out just for the sake of that feature. I’ll just add a button to open up the Network Utility for the user in the Mac version.

Carl,

You could look at a traceroute provider such as http://www.viewdns.info/api/docs/traceroute.php to handle this feature for you? This is what I did to provide DNS A Record look ups (https://dns-api.org/). This way you can use the Client Network entitlement which works fine for outbound network connections to the API.

HTH

They could be grandfathered in and not updated since the App Sandbox was introduced.

[quote=289749:@Mike Cotrone]Carl,

You could look at a traceroute provider such as http://www.viewdns.info/api/docs/traceroute.php to handle this feature for you? This is what I did to provide DNS A Record look ups (https://dns-api.org/). This way you can use the Client Network entitlement which works fine for outbound network connections to the API.

HTH[/quote]
Thanks for the suggestion, I’ll take look, although I have some concerns about using a third-party website that I don’t control.

I just went back to the source code for the previous release of my app and discovered that host and ping are also not accessible from the sandbox. The build that was done in El Capitan still works but running the source code in the debugger in Sierra gives operation not permitted errors for host and ping.

Thats why I moved to the API for the same reason, just different command :slight_smile:

It does not look terribly difficult to come up with your own Xojo Web service for traceroute. But I did not mention it before, since, by essence, traceroute has to be initiated from your device IP. From a web site, you get traceroute from his IP.

The API posted in this thread has a limit of 250 queries per month without a subscription fee, which just isn’t workable for a commercially distributed app. I’m just going to add a button to open the Network Utility for Mac users in the next app update rather than spend any more time trying to find a cost-effective way to duplicate those functions from the sandbox.

Make sure that you sell a version on your own site with this functionality, perhaps even rename the version in the app store to “Lite” version and sell it a little cheaper.

You can not directly promote your “Pro” version on your site, from within the App Store version, but I see that some of Apple’s favored partners sneak in advertising for their “Pro” products, with discount pricing too! It magically appears a few days after a launch.

Heck one company who had a product featured by Apple, starting sending me e-mails, without me giving them any information.

I have two versions of Char Menu. The direct sales version inserts characters directly into applications like a virtual keyboard. The MAS Lite version simply copies to the keyboard, because the sandbox would not permit tapping into system events.

Amazingly enough, the MAS version vastly outsells the web one.

[quote=290191:@Michel Bujardet]I have two versions of Char Menu. The direct sales version inserts characters directly into applications like a virtual keyboard. The MAS Lite version simply copies to the keyboard, because the sandbox would not permit tapping into system events.

Amazingly enough, the MAS version vastly outsells the web one.[/quote]
That’s been my experience as well. My MAS apps sell much better than the ones offered directly from the web.

did you try just running ping several times each time increasing the max hop count? I did that as a test and it would definitely work for providing a trace to the remote host.

I tried that as a test in the console and it worked but the problem is that ping can’t be run from a sandboxed app in Sierra. OS X Sierra seems to have added the same sandbox restrictions on ping and host as traceroute.

There is one question I do not recall reading in this now long thread : why do you need ping and traceroute ?

If it is to see if a server exists, a simple HTTP request could suffice.

[quote=291179:@Michel Bujardet]There is one question I do not recall reading in this now long thread : why do you need ping and traceroute ?

If it is to see if a server exists, a simple HTTP request could suffice.[/quote]
Ping and traceroute provide additional information if the web server fails to respond. If Apache crashes, for example, an HTTP request will fail but the server will still respond to pings if it is online. Traceroute can tell where the interruption occurred if it fails to respond to pings.

I think you may be better off outside of the App Store anyway. If you’re aiming for more technical literate people, you’ll still be able to find them and they’ll pay a premium for a premium product, when you’re in the App Store, Apple take a 30% cut. If you’re selling a mass market application, it’ll be worth it.

Plus being outside of the Sandbox will probably be easier for future upgrades, instead of trying to find workarounds for an ever increasing list of rules and regulations, go make your application awesome.

Well, there is nothing wrong with having a “Lite” version of the app in the App Store without the elaborate tools, and the complete version on a web site.

I still believe you could have a web app on your own site perform these tasks and communicate with your app via HTTP, if you feel this function is absolutely needed. With still the same reservations about traceroute from a site reporting the route from its IP address, instead of from the IP address of the App Connecting point.