Giter Club home page Giter Club logo

crates.io-proxy's Introduction

crates.io-proxy is a crates.io proxy which temporarily fixes a cargo issue Cargo doesn't respect git's http.sslverify

Usage

Set up crates.io proxy:

  1. cd /PATH/TO/DEV/DIR
  2. git clone https://github.com/chrisxue815/crates.io-proxy.git
  3. cd crates.io-proxy
  4. npm config set strict-ssl false
  5. npm init
  6. node index.js --port 3000 --proxy PROXY_ADDRESS
  7. Open http://127.0.0.1:3000/api/v1/crates/libc/0.2.6/download in your browser to make sure the proxy is working

Set up index repo:

  1. cd /PATH/TO/DEV/DIR

  2. git clone https://github.com/rust-lang/crates.io-index.git

  3. Open ./crates.io-index/config.json, set dl to "http://HOSTNAME:3000/api/v1/crates"

  4. cd crates.io-index

  5. git add .

  6. git commit -m fixup!

  7. Create or open ~/.cargo/config, add/set the following section

    [registry]
    index = "file:///PATH/TO/DEV/DIR/crates.io-index"
    

cargo build should work now. If not, try deleting or renaming ~/.cargo/registry and PROJECT_DIR/target

License

crates.io-proxy's People

Contributors

chrisxue815 avatar

Watchers

tempbottle avatar  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.