-
Notifications
You must be signed in to change notification settings - Fork 14
Domain Fronting For Fastly
Drew Griess edited this page Jun 26, 2020
·
1 revision
Author: DoctorEww
Working As of Date (WAD): 06/24/20
CDN Organization: Fastly
In order to front the given domain, the following conditions must be met for success:
- Target Domain must exist on Fastly CDN
- Your fronted domain must exist on Fastly CDN
- Both domains must use HTTPS
Fronted Domain: The allowed domain you are using as a "mask".
Target Domain: The domain you want to access, using the Fronted domain.
-
Follow the steps to setup a resource on Fastly CDN
- A account can be made for free. "Free Trial" gives $50 credit.
-
Construct your HTTPS request with the target domain in the
Host:
header and the fronted domain as the primary domain you wish to access. The following two methods are just two ways to do it:-
cURL:
curl -H "Host: <Target_domain>" https://<Fronted_domain>
-
Python:
import urllib.request as request TARGET = 'target_domain' FRONTED = 'https://domain.to.front' h = {} h['Host'] = TARGET h['User-Agent'] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36" req = request.Request( FRONTED, data=None, headers=h ) response = request.urlopen(req, timeout=60) # Check if we fronted or not, if so, print data if response.code == 200: for line in response.readlines(): print(line.decode()) else: print("Failed to front.")
-
- Fastly has worked on every