Giter Club home page Giter Club logo

cargo-zproxy's Introduction

镜像切换工具

安装

   #第一步安装
   cargo install cargo-zproxy
   #第二步骤初始化代理
   cargo zproxy init
   #第三步骤初始化代理
   cargo zproxy use  --source tuna  
   # 更多仓库镜像,请使用cargo zproxy list 查看可使用的镜像地址

如何恢复

   #恢复官方镜像只需要执行
   cargo zproxy def

自定义代理镜像地址。满足需要再特定添加特定的内网镜像源情况

   # 自定义添加镜像地址 例如
   cargo zproxy  add   --name "本地源"  --source  "locality" --url "http://127.0.0.1/crates.io-index"
  #切换本地源
  cargo zproxy  use --source locality 

内置索引镜像

目前内置-Github官网索引地址

cargo zproxy list #查看已配置镜像源地址内容
crates.io-index 官网地址
清华,
北京外国语,
浙江大学,
哈尔滨工业大学等镜像
更多使用cargo zproxy list查看

计划实现功能

  • 1: 配置资源初始化

  • 3: list 所有可用镜像地址--按照网络延 迟排序

    • list 所有可用镜像地址
    • 按照网络延迟排序
  • 4: auto 自动选择最优镜像

  • 5: use --source xxx /default/auto/1

    • 设置默认为creates镜像
    • 支持切换内置的镜像配置
  • 6: add 手动设置镜像地址 -source xxx -url=xxxx

  • 7: sync 地址备份git仓库地址

指令列表

  cargo zproxy  init              执行本地初始化
  cargo zproxy  auto              评估网络延迟并自动切换到最优的镜像
  cargo zproxy  use <source>        切换为要使用的镜像
  cargo zproxy  list              查看当前所有配置的镜像资源地址
  cargo zproxy  add  -source<XX> --name<XX> -url xxxx
                                  添加一个镜像进本地配置文件
  cargo zproxy  sync              同步镜像配置文件
                  --repo <XX>     设置私有配置仓库
                  --push          同步镜像配置文件
  cargo zproxy  version           查看当前版本

cargo-zproxy's People

Contributors

cfping avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.