clojars and maven repositories block IPs of countries that the west hates (ex. Iran) and this problem is only going to get worse as americans increasingly become more fascist. It’s obvious the Chinese are getting a block soon.
This is how to fix the issue. Use a Chinese, Iranian, or other mirror. You can find a local mirror (if it exists) by going to some search engine and searching “clojar mirror iran” or “maven mirror china” for whatever country you live in.
If you use /usr/bin/clojure and get dependencies from maven (it looks like this: clojure -Sdeps ‘{:deps {nrepl/nrepl {:mvn/version “1.0.0”} cider/cider-nrepl {:mvn/version “0.30.0”}}) then simply add a maven mirror.
For maven all settings are stored in $HOME/.m2/settings.xml so go there and add a mirror (like this Iranian one) in the settings file.
<profiles>
<profile>
<id>iranrepo</id>
<repositories>
<repository>
<id>maven-iranrepo</id>
<url>https://maven.iranrepo.ir</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven-iranrepo</id>
<url>https://maven.iranrepo.ir</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
For clojars (which is used in lein or leiningen) go to $HOME/.lein/profiles.clj and add a mirror for clojars
{:user {:plugin-repositories [["clojars" {:url "https://mirrors.ustc.edu.cn/clojars/"}]]}}
{:user {:plugin-repositories [["central" {:url "https://maven.iranrepo.ir"}]]}}