Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream goproxy #1096

Closed
wants to merge 2 commits into from
Closed

Upstream goproxy #1096

wants to merge 2 commits into from

Conversation

yittg
Copy link
Contributor

@yittg yittg commented Mar 1, 2019

What is the problem I am trying to address?

Support configure one upstream proxy, like mirror of another. Often use in private develop environment.

How is the fix applied?

If one go proxy configured, all handler for GOPROXY will try to fetch from the upstream proxy configured if local miss, or do the original fetch if failed.

Mention the issue number it fixes or add the details of the changes if it doesn't have a specific issue.

proxy repo code edited from go modfetch package.

@yittg yittg requested a review from a team as a code owner March 1, 2019 08:02
@marwan-at-work
Copy link
Contributor

@yittg Athens already has a way to redirect requests to another proxy. See the GlobalEndpoint field in the config file. Please see if that solves your use case, otherwise feel free to open an issue issue about what you need and we'll discuss design/implementation there first.

Furthermore, when it comes to redirecting to other proxies, we are most likely not going to make any major decisions until the Go team resolves this issue: golang/go#26334

I will close this PR for now but feel free to open an issue and if it makes sense I'll re-open this PR. If you also want some chat-style discussion, feel free to join and ask anything on the #athens channel on the Gopher Slack org.

Thanks for contributing!

@yittg
Copy link
Contributor Author

yittg commented Mar 4, 2019

oh, i missed the existed config, it's a better and more complete way. i write this patch when reading the athens and goproxy source code by the way, so i don't new an issue first 😊, it's all right. And thanks for the great job.

@yittg yittg deleted the upstream-proxy branch March 4, 2019 02:04
@yittg
Copy link
Contributor Author

yittg commented Mar 4, 2019

I've have a closer look about this configuration and it's machanism. It doesn't match this PR exactly. It redirects to proxy directly without local cache function, is it right?And cache is a important for private env. May we new an issue to discuss it?@marwan-at-work

@marwan-at-work
Copy link
Contributor

@yittg The entire multi proxy communication will be rethought for Athens once the Go issue above that I mentioned is resolved. It might be best to wait until then so we know what kind of solution we want to have. So I'd keep the conversation in the upstream and once that is resolved, we can discuss the how Athens should play out. If you see anything differently, you're always free to open an issue as you see fit :)

@yittg
Copy link
Contributor Author

yittg commented Mar 4, 2019

@marwan-at-work That's all right, thanks for your reply. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants