When jcenter is not accessible without proxy server, to resolve dependencies, and i want to use socks instead of http proxy, how i can use it in commanad line? I know how to use http proxy:
-Dhttp.proxyHost=yourProxy -Dhttp.proxyPort=yourPort
-Dhttp.proxyUser=usernameProxy -Dhttp.proxyPassword=yourPassoword
Configure proxy settings directly from IntelliJ IDEA. Do the following: Open the Version Control | Subversion | Network page of the IDE settings Ctrl+Alt+S . Click the Edit Network Options button and specify the proxy settings in the Edit Subversion Options Related to Network Layers dialog that opens.
Gradle only documents about how to use HTTP(s) proxy, however in the ant source code it mentions, there is enough information about how to setup the SOCKS proxy.
Add the following two lines to the gradle.properties configuration file and you are done.
systemProp.socksProxyHost=your socks proxy ip
systemProp.socksProxyPort=your socks proxy port
The format of SOCKS configuration names (socksProxyHost and socksProxyPort) differs from HTTP proxy host and port configurations (http.proxyHost and http.proxyPort).
I found answer, here you can use:
./gradlew -DsocksProxyHost=yourHost
-DsocksProxyPort=yourHostPort your-command
using above you can set socks host and port.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With