<!--
	Other Apple rulesets:
		- Apple-MapKit.com.xml
		- Apple.com.cn.xml
		- Apple_CDN_buckets.xml
		- Appsto.re.xml
		- CDN-Apple.com.xml
		- iCloud.com.xml
		- iTunes.com.xml
		- iWork.com.xml
		- ME.com.xml
		- Mzstatic.com.xml

	CDN buckets:
		- a248.e.akamai.net/7/248/51/20120908/swdlp.apple.com/
		- a772.g.akamai.net/7/772/51/\w+/www.apple.com/
		- a771.da1.akamai.net/L/771/82810/5m/init.itunes.apple.com/ | ax.init.itunes.apple.com.edgesuite.net
		- appldnld.apple.com.akadns.net
		- devimages.apple.com.edgekey.net
		- init.ess.apple.com.edgesuite.net
		- ping.itunes.apple.com.edgesuite.net
			- a1755.b.akamai.net
		- static-uptodate.apple.com.edgekey.net
		- storeimages.apple.com.edgekey.net
		- km.support.apple.com.edgekey.net
		- images.apple.com.edgesuite.net
		- ax.init.itunes.apple.com.edgesuite.net
		- legacy-support.apple.com.edgesuite.net
			- docs.info.apple.com
			- www0.info.apple.com
		- ax.phobos.apple.com.edgesuite.net
		- a\d+.phobos.apple.com.edgesuite.net

	Nonfunctional hosts in *apple.com:
		- deimos3	(403/404, akamai)
		- init.ess	(503, akamai)
		- userprofile.itunes *
		- rss.lists	(shows lists; mismatched, CN: lists.apple.com)
		- rss.itunes (redirects to HTTP for Travis)
		- mynews *
		- uptodate  (timeout)
	* Refused

	Problematic hosts in *apple.com:
		- adcdownload
		- advertising *
		- appldnld		(insecure cipher or protocol[?])
		- concierge		(Blocks Tor users)
		- devimages *
		- getsupport		(Blocks Tor users)
		- images *
		- manuals.info *
		- docs.info *
		- signin.info *
		- www.info *
		- www0.info *
		- dzc.itunes		(data differ)
		- ping.itunes *
		- prod.lists ³
		- www.lists		(mismatched, CN: lists.apple.com)
		- mypage        (incomplete cert chain)
		- a1.phobos *
		- a1721.phobos *
		- a1980.phobos *
		- service.ess		(self-signed cert in chain)
		- service[12].ess	(self-signed cert in chain)
		- static-mynews *
		- storeimages *
		- support		(Blocks Tor users)
		- wsidecar	( The certificate expired on 2017/03/10 23:59 )
	* Akamai
	³ Mismatched, CN: lists.apple.com

	At least some pages redirect to http:
		- www

	These altnames don't exist:
		- imix.itunes.apple.com

	Insecure cookies are set for these hosts and domains:
		- .apple.com
		- consultants.apple.com
		- locate.apple.com
		- .store.apple.com

	Mixed content:
		- css, on:
			- trailers from images *
			- trailers from $self *
		- Images, on:
			- autolinkmaker.itunes, banners.itunes, trailers from images *
			- itunes from images *
			- itunes from ax.phobos.apple.com.edgesuite.net *
			- itunes from a[1-5].mzstatic.com *
			- rss.itunes from images *
			- trailers from trailers *
	* Secured by us
-->
<ruleset name="Apple.com">
	<!--	Direct rewrites:	-->
	<target host="apple.com" />
	<target host="www.apple.com" />
	<target host="albert.apple.com" />
	<target host="appleid.apple.com" />
	<target host="appleseed.apple.com" />
	<target host="appleseedcdn.apple.com" />
	<target host="nc-as-images.apple.com" />
	<target host="beta.apple.com" />
	<target host="bugreport.apple.com" />
	<target host="buyiphone.apple.com" />
	<target host="buyiphone1.apple.com" />
	<target host="buyiphone2.apple.com" />
	<target host="buyiphone3.apple.com" />
	<target host="buyiphone4.apple.com" />
	<target host="certifications.apple.com" />
	<target host="checkcoverage.apple.com" />
	<target host="checkrepair.apple.com" />
	<target host="concierge.apple.com" />
	<target host="configuration.apple.com" />
	<target host="consultants.apple.com" />
	<target host="daw.apple.com" />
	<target host="developer.apple.com" />
	<target host="devforums.apple.com" />
	<target host="discussions.apple.com" />
	<target host="discussionsjapan.apple.com" />
	<target host="ecommerce.apple.com" />
	<target host="expresslane.apple.com" />
	<target host="getsupport.apple.com" />
	<target host="gsx.apple.com" />
	<target host="gsxapp.apple.com" />
	<target host="help.apple.com" />
	<target host="hrweb.apple.com" />
	<target host="iad.apple.com" />
	<target host="id.apple.com" />
	<target host="idmsa.apple.com" />
	<target host="iforgot.apple.com" />
	<target host="images.apple.com" />
	<target host="itunes.apple.com" />
	<target host="affiliate.itunes.apple.com" />
	<target host="api.itunes.apple.com" />
	<target host="autolinkmaker.itunes.apple.com" />
	<target host="banners.itunes.apple.com" />
	<target host="bookkeeper.itunes.apple.com" />
	<target host="buy.itunes.apple.com" />
	<target host="c.itunes.apple.com" />
	<target host="client-api.itunes.apple.com" />
	<target host="collection.itunes.apple.com" />
	<target host="du.itunes.apple.com" />
	<target host="feeds.itunes.apple.com" />
	<target host="files.itunes.apple.com" />
	<target host="genius.itunes.apple.com" />
	<target host="genius-2.itunes.apple.com" />
	<target host="genius-download-2.itunes.apple.com" />
	<target host="genius-upload.itunes.apple.com" />
	<target host="geo.itunes.apple.com" />
	<target host="homesharing.itunes.apple.com" />
	<target host="init.itunes.apple.com" />
	<target host="itunesu.itunes.apple.com" />
	<target host="ld-1.itunes.apple.com" />
	<target host="ld-2.itunes.apple.com" />
	<target host="ld-3.itunes.apple.com" />
	<target host="ld-4.itunes.apple.com" />
	<target host="ld-5.itunes.apple.com" />
	<target host="ld-6.itunes.apple.com" />
	<target host="ld-7.itunes.apple.com" />
	<target host="ld-8.itunes.apple.com" />
	<target host="ld-nk11.itunes.apple.com" />
	<target host="ld-st11.itunes.apple.com" />
	<target host="linkmaker.itunes.apple.com" />
	<target host="metadata.itunes.apple.com" />
	<target host="my.itunes.apple.com" />
	<target host="myapp.itunes.apple.com" />
	<!--target host="p\d+-buy.itunes.apple.com" />	← needs enumerating -->
	<target host="p100-sandbox.itunes.apple.com" />
	<target host="p1-u.itunes.apple.com" />
	<target host="p2-u.itunes.apple.com" />
	<target host="partiality.itunes.apple.com" />
	<target host="pd-nk.itunes.apple.com" />
	<target host="pd-st.itunes.apple.com" />
	<target host="play.itunes.apple.com" />
	<target host="redeem.itunes.apple.com" />
	<target host="sandbox.itunes.apple.com" />
	<target host="se.itunes.apple.com" />
	<target host="search.itunes.apple.com" />
	<target host="sitemanager.itunes.apple.com" />
	<target host="sp.itunes.apple.com" />
	<target host="static.itunes.apple.com" />
	<target host="stations.itunes.apple.com" />
	<target host="su.itunes.apple.com" />
	<target host="upp.itunes.apple.com" />
	<target host="userpub.itunes.apple.com" />
	<target host="volume.itunes.apple.com" />
	<target host="vpp.itunes.apple.com" />
	<target host="widgets.itunes.apple.com" />
	<target host="itunesconnect.apple.com" />
	<target host="jobs.apple.com" />
	<target host="jointventure.apple.com" />
	<target host="lists.apple.com" />
	<target host="locate.apple.com" />
	<target host="mfi.apple.com" />
	<target host="nc-buyiphone.apple.com" />
	<target host="nc-unbrick1.apple.com" />
	<target host="nwk-buyiphone.apple.com" />
	<target host="nwk-unbrick1.apple.com" />
	<target host="nwk-unbrick2.apple.com" />
	<target host="onetoone.apple.com" />
	<target host="opensource.apple.com" />
	<target host="www.opensource.apple.com" />
	<target host="portal.apple.com" />
	<target host="remoteadvisor.apple.com" />
	<target host="reportingitc.apple.com" />
	<target host="reportingitc2.apple.com" />
	<target host="reseller.apple.com" />
	<target host="securemetrics.apple.com" />
	<target host="selfsolve.apple.com" />
	<target host="ssl.apple.com" />
	<target host="store.apple.com" />
	<target host="banners.store.apple.com" />
	<target host="secure.store.apple.com" />
	<target host="secure1.store.apple.com" />
	<target host="secure2.store.apple.com" />
	<target host="support.apple.com" />
	<target host="km.support.apple.com" />
	<target host="supportprofile.apple.com" />
	<target host="swdlp.apple.com" />
	<target host="trailers.apple.com" />
	<target host="wdg2.apple.com" />
		<test url="http://trailers.apple.com/app/" />
		<test url="http://trailers.apple.com/ca/" />
		<test url="http://trailers.apple.com/trailers/wb/thehobbit/" />


	<!--	Complications:	-->
	<target host="devimages.apple.com" />
	<rule from="^http://devimages\.apple\.com/"
			to="https://devimages.apple.com.edgekey.net/" />

	<target host="prod.lists.apple.com" />
	<target host="www.lists.apple.com" />
	<rule from="^http://(prod|www)\.lists\.apple\.com/"
			to="https://lists.apple.com/" />

	<target host="metrics.apple.com" />
	<rule from="^http://metrics\.apple\.com/"
			to="https://securemetrics.apple.com/" />

	<target host="storeimages.apple.com" />
	<rule from="^http://storeimages\.apple\.com/"
			to="https://storeimages.apple.com.edgekey.net/" />

	<target host="*.phobos.apple.com" />
	<rule from="^http://a\d+\.phobos\.apple\.com/"
			to="https://s1.mzstatic.com/" />
		<test url="http://a1.phobos.apple.com/us/r30/CobaltPublic/v4/37/72/a2/3772a292-10d0-b32a-6928-464f7c3ee867/206-3521510896464870564-1128711b_1.pdf" />
		<test url="http://a1980.phobos.apple.com/us/r30/CobaltPublic/v4/37/72/a2/3772a292-10d0-b32a-6928-464f7c3ee867/206-3521510896464870564-1128711b_1.pdf" />

	<securecookie host=".+" name=".+" />

	<rule from="^http:" to="https:" />
</ruleset>
