Simply add the mirror url as a maven repository in the settings.gradle
file and re-sync project:
pluginManagement {
repositories {
maven("https://en-mirror.ir")
}
}
dependencyResolutionManagement {
...
repositories {
maven("https://en-mirror.ir")
}
}
Note
Clone of mirror is launched at en-mirror.ir
and ready to use. this mirror contains google
,central
and jitpack
mavens.
By default, all repositories are mirrored. To mirror only a specific repository, include its key in the mirror URL, like this:
maven("https://en-mirror.ir/jitpack")
- Manual Setup:
- Login to cloudflare
- Click on workers & pages tab
- Create new worker with optional name and click on deploy
- In the new tab, click on edit code
- Copy & Paste worker.js codes into opened tab and click on deploy button
- CLI Setup:
- Ensure you have Node.js installed on your system, then install the Wrangler CLI:
npm install -g wrangler
- Login to your cloudflare account using:
wrangler login
- Update configuration in wrangler.toml:
- Set
compatibility_date
field to current date
- Set
- Deploy the worker using:
wrangler deploy
- Ensure you have Node.js installed on your system, then install the Wrangler CLI:
Now, your worker is ready to use and the mirror url is your worker url in this pattern: https://[worker-name].[cloudflare-username].workers.dev/
- Set up your domain in Cloudflare, configure the DNS servers on the domain, and wait until the domain becomes active
- After your domain becomes active, click on websites tab and select your domain
- Click on DNS tab and add new
CNAME
record, set content to your worker domain:[worker-name].[cloudflare-username].workers.dev
- Keep proxied checked
- Click on Worker Routes tab and add route
- If you want to mirror your root domain, enter the route like this:
https://your-domain.com/*
- Select the created worker and click on save.
Note
You can set up mirror without using cloudflare with PHP Back-End, see.