Git Product home page Git Product logo

goproxy's Introduction

goproxy 自建 go modules 代理,部署到 heroku

  1. 点击下面这个按钮(或者先fork再点,这样可以自己修改部署脚本)

Deploy

goproxyheroku 自建 go modules 代理。

image

App name 是一个唯一的 app名字

Choose a region 有美国和欧洲可以选。个人认为美国的速度还不错。会在region里随机分配一个节点给你,有的节点很快,有的比较慢。不过还是会比 goproxy.io 之类的快。

点 Create app ,等一会就部署完成了。

  1. 现在你就可以使用你自建的 go modules 代理了。

linux: export GOPROXY=https://youappname.herokuapp.com

windows: $env:GOPROXY = "https://youappname.herokuapp.com"

  1. Now, when you build and run your applications, go will fetch dependencies via https://youappname.herokuapp.com.

Note: This proxy can't fetch your private repos of course.

youappname 是你Crate New App 时的 App name

  1. 直接打开你申请的链接应该是显示空白。

可以用这个链接测试一下: https://youappname.herokuapp.com/github.com/nsqio/nsq/@v/list

  1. heroku 部署的 app,在一段时间内没有流量会被冻结。然后有人访问的时候就才会再次启动。(所以第一次打开会比较慢,启动好了就快了)

  2. 提供一个懒人用测试地址,多人用不能保证速度,而且每个月是有限额的(一个人单独用完全足够)。所以还是建议自己 fork 自己建立一个 app。 https://goproxyus.herokuapp.com

额外的功能

  • 可以用这个代理下载仓库
  1. https://goproxyus.herokuapp.com/github.com/whtiehack/goproxy/@latest

  2. https://goproxyus.herokuapp.com/github.com/whtiehack/goproxy/@v/v0.0.0-20190429094219-4f70e1c14471.zip

  3. latest 有个问题,不会再次去拿最新代码。

或者你知道明确版本的放可以构造url直接下载 : https://goproxyus.herokuapp.com/github.com/node-pinus/pinus/@v/v1.3.10.zip

goproxy's People

Contributors

whtiehack avatar

Watchers

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