Skip to content

Instantly share code, notes, and snippets.

@jberkel
Created November 21, 2013 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jberkel/7574502 to your computer and use it in GitHub Desktop.
Save jberkel/7574502 to your computer and use it in GitHub Desktop.
simulating iOS reachability
$ host api.soundcloud.com
api.soundcloud.com is an alias for api-cdn.l.soundcloud.com.
api-cdn.l.soundcloud.com is an alias for cs97.wac.edgecastcdn.net.
cs97.wac.edgecastcdn.net has address 93.184.220.127
$ sudo route add -host 93.184.220.127 -interface gif0
add host 93.184.220.127: gateway gif0
$ scutil -r api.soundcloud.com
Reachable,Transient Connection,Connection Required
$ scutil
> get State:/Network/Service/B320DF14-8350-4921-A9AD-E7458B45932B/IPv4
> set State:/Network/Service/B320DF14-8350-4921-A9AD-E7458B45932B/IPv4
$ sudo route delete -host 93.184.220.127 -interface gif0
delete host 93.184.220.127: gateway gif0
$ scutil -r api.soundcloud.com
Reachable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment