Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven - how to set socks proxy via settings.xml

I wonder how I could set a SOCKS proxy for maven via the ~/.m2/settings.xml? Yes, I know there is a recipe to do this via MAVEN_OPTS environment variable. But I would like to set this in the settings.xml within the <proxies> section. Which kind of protocol should I use? I already tried

  • socks
  • socks5
  • SOCKS_5
  • SOCKSv5

Regs, Gerd

like image 923
Gerd Aschemann Avatar asked May 19 '16 10:05

Gerd Aschemann


1 Answers

This is my setting, and it worked fine for me,hope useful:

<proxy>
        <id>ss</id>
        <active>true</active>
        <protocol>socks5</protocol>
        <username></username>
        <password></password>
        <host>127.0.0.1</host>
        <port>1080</port>
        <nonProxyHosts>127.0.0.1</nonProxyHosts>
</proxy>
like image 60
Shawn Chang Avatar answered Oct 24 '22 00:10

Shawn Chang