各类代理

1. git

git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890

git config --global --unset http.proxy
git config --global --unset https.proxy

2. npm

npm config set proxy http://127.0.0.1:7890
npm config set https-proxy https://127.0.0.1:7890

npm config delete proxy
npm config delete https-proxy

3. gradle

systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=7890
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=7890

4. maven

<proxies>
  <!--代理信息-->
  <proxy>
    <id>myHttp</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>127.0.0.1</host>
    <port>7890</port>
  </proxy>
  <!--代理信息-->
  <proxy>
    <id>myHttps</id>
    <active>true</active>
    <protocol>https</protocol>
    <host>127.0.0.1</host>
    <port>7890</port>
  </proxy>
</proxies>

<repositories>
  <repository>
    <id>myrepo</id>
    <url>http://repo.maven.apache.org/maven2</url>
    <proxy>
      <id>myHttp</id>  
      <id>myHttps</id>  
    </proxy>
  </repository>
</repositories>
posted @ 2023-12-16 15:09  干翻苍穹  阅读(18)  评论(0编辑  收藏  举报