Comments (6)
Sorry, I didn't understand what you meant. It looks like you're not using this project. This project is a minimalist Go module proxy handler, not a binary file you can use directly. Maybe you asked the wrong project?
from goproxy.
I built this project and got a executable binary file goproxy. I think you are Chinese, here the Chinese:
我从这个项目编译了一个可执行文件。在服务器上运行:goproxy -proxy=https://goproxy.io
本地内网开发环境设置了$GOPROXY=mygoproxyweb
然后本地创建了一个测试golang项目,import 了github.com/gin-gonic/gin
本地go build时,mygoproxyweb 却返回了302响应(内网无法访问goproxy.someimg.com):
Location https://goproxy.someimg.com/github.com/gin-gonic/gin/@v/v1.5.0.zip
经测试:
本地访问 https://mygoproxyweb/github.com/gin-gonic/gin/@v/v1.5.0.zip 会被redirect 到goproxy.someimg.com
互联网访问 https://goproxy.io/github.com/gin-gonic/gin/@v/v1.5.0.zip 也会被redirect 到goproxy.someimg.com
我在https://github.com/goproxy/goproxy 源代码里没有找到 someimg.com
. 难道这个是https://goproxy.io 的功能,并没有在代码里面?
from goproxy.
$ curl -v https://goproxy.io/github.com/gin-gonic/gin/@v/v1.5.0.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 119.28.201.50:443...
- TCP_NODELAY set
- Connected to goproxy.io (119.28.201.50) port 443 (#0)
- ALPN, offering h2
- ALPN, offering http/1.1
...........................(ssl) - Using HTTP2, server supports multi-use
- Connection state changed (HTTP/2 confirmed)
- Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data] - Using Stream ID: 1 (easy handle 0xe41300)
} [5 bytes data]
GET /github.com/gin-gonic/gin/@v/v1.5.0.zip HTTP/2
Host: goproxy.io
user-agent: curl/7.68.0
accept: /
{ [5 bytes data]
-
Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
} [5 bytes data]
< HTTP/2 302
< server: nginx/1.16.1
< date: Thu, 12 Mar 2020 11:27:26 GMT
< content-type: text/html; charset=utf-8
< content-length: 89
< location: https://goproxy.someimg.com/github.com/gin-gonic/gin/@v/v1.5.0.zip
<
{ [89 bytes data]
100 89 100 89 0 0 640 0 --:--:-- --:--:-- --:--:-- 644Found. -
Connection #0 to host goproxy.io left intact
from goproxy.
你确定你在使用这个项目嘛?这个项目跟 goproxy.io 是无关的哦,如果你发现访问某些东西被 302 了那说明是他们的表现既如此,跟你具体怎么用是无关的。你也可以试试用 goproxy.cn 做上游,是不会出现任何 302 行为的。
from goproxy.
此外,当前这个项目的使用方式是写代码哦:
package main
import (
"net/http"
"github.com/goproxy/goproxy"
)
func main() {
http.ListenAndServe("localhost:8080", goproxy.New())
}
而不是编译,这个项目是一个可引入的三方库。
from goproxy.
ok~ 我试一下
from goproxy.
Related Issues (20)
- Cache HOT 10
- Unable to complete go get command when GOPROXY=direct HOT 11
- /tmp required but not configurable HOT 3
- 可以使用 goproxy 解决私有 GitLab 仓库问题吗? HOT 9
- goproxy 无法代理私有 GitLab多级子目录问题 HOT 4
- 请求某个资源时容易出现500错误 HOT 2
- 自建goproxy,私有包拉取不了 HOT 8
- failed to list module versions HOT 5
- 代理有时会产生http2: server sent GOAWAY and closed the connection错误 HOT 3
- 无法拉取gitlab中的私有包 HOT 18
- goproxy responds with HTTP/1.0 on response to CONNECT, some clients do not support this HOT 1
- Disable-Module-Fetch: true header support HOT 1
- server panic HOT 2
- is there a changelog? HOT 1
- goproxy redirect http proxy to transparent proxy cause some http quest 400 error HOT 1
- support /@latest endpoint HOT 4
- [BUG] go get stuck and server output git error HOT 6
- 拉取私有仓库问题 HOT 2
- 502了 HOT 1
- connections staying open HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goproxy.