Skip to content

chrisxue815/crates.io-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 install
  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

About

A crates.io proxy which temporarily fixes https://github.com/rust-lang/cargo/issues/1180

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published