Skip to content

chore: remove unstable proxy servers #450

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

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x
go-version: 1.19.x
- uses: actions/checkout@v3.6.0
- name: Test
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3.6.0
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3.6.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.19
- name: Image Registry Login
run: |
docker login --username ${{ secrets.DOCKER_HUB_USER }} --password ${{secrets.DOCKER_HUB_TOKEN}}
Expand Down
2 changes: 0 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ func NewRoot(cxt context.Context) (cmd *cobra.Command) {

for _, c := range cmd.Commands() {
registerFlagCompletionFunc(c, "provider", ArrayCompletion(ProviderGitHub, ProviderGitee))
registerFlagCompletionFunc(c, "proxy-github", ArrayCompletion("gh.api.99988866.xyz",
"gh-proxy.com"))
registerFlagCompletionFunc(c, "os", ArrayCompletion("window", "linux", "darwin"))
registerFlagCompletionFunc(c, "arch", ArrayCompletion("amd64", "arm64"))
registerFlagCompletionFunc(c, "format", ArrayCompletion("tar.gz", "zip", "msi"))
Expand Down
3 changes: 1 addition & 2 deletions cmd/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ func (s *searchOption) addFlags(flags *pflag.FlagSet) {
flags.StringVarP(&s.Provider, "provider", "", viper.GetString("provider"), "The file provider")
flags.StringVarP(&s.ProxyGitHub, "proxy-github", "", viper.GetString("proxy-github"),
`The proxy address of github.com, the proxy address will be the prefix of the final address.
Available proxy: gh.api.99988866.xyz, gh-proxy.com
Thanks to https://github.com/hunshcn/gh-proxy`)
Submit the new proxy server in https://github.com/LinuxSuRen/hd-home`)
}

func (s *searchOption) runE(c *cobra.Command, args []string) (err error) {
Expand Down
4 changes: 3 additions & 1 deletion cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ type setupOption struct {

func (o *setupOption) runE(cmd *cobra.Command, args []string) (err error) {
logger := log.GetLoggerFromContextOrDefault(cmd)
proxyServers := []string{""}
proxyServers = append(proxyServers, installer.GetProxyServers()...)

if o.proxy == "" {
if o.proxy, err = selectFromList([]string{"", "gh-proxy.com", "gh.api.99988866.xyz"},
if o.proxy, err = selectFromList(proxyServers,
o.v.GetString("proxy-github"),
"Select proxy-github", o.stdio); err != nil {
return
Expand Down
46 changes: 26 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module github.com/linuxsuren/http-downloader

go 1.18
go 1.19

require (
github.com/AlecAivazis/survey/v2 v2.3.2
github.com/go-git/go-git/v5 v5.4.2
github.com/go-git/go-git/v5 v5.10.1
github.com/golang/mock v1.6.0
github.com/google/go-github/v29 v29.0.3
github.com/h2non/gock v1.0.9
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec
github.com/linuxsuren/cobra-extension v0.0.16
github.com/mitchellh/go-homedir v1.1.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.18.1
github.com/onsi/gomega v1.27.10
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.9.0
Expand All @@ -30,31 +30,37 @@ require (
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/prometheus/client_golang v1.11.1 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/tools v0.13.0 // indirect
)

require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/blang/semver/v4 v4.0.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
Expand All @@ -69,15 +75,15 @@ require (
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
github.com/xanzy/ssh-agent v0.3.3 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/net v0.18.0
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.3.8 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
Expand Down
Loading