Skip to content

Commit

Permalink
Merge pull request v2rayA#1148 from MarksonHon/feat_v5
Browse files Browse the repository at this point in the history
Remove all of v2raya.org domain, use GitHub's link instead.
  • Loading branch information
MarksonHon authored Nov 5, 2023
2 parents 40f2859 + e4bd7f5 commit dfe0078
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions service/core/v2ray/asset/dat/geoip.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ func UpdateLocalGeoIP() (err error) {
if err != nil {
return err
}
if err = asset.Download("https://hubmirror.v2raya.org/v2fly/geoip/releases/latest/download/geoip.dat", pathSiteDat+".new"); err != nil {
if err = asset.Download("https://github.com/v2fly/geoip/releases/latest/download/geoip.dat", pathSiteDat+".new"); err != nil {
log.Warn("UpdateLocalGeoIP: %v", err)
return
}
siteDatSha256, err := httpGet("https://hubmirror.v2raya.org/v2fly/geoip/releases/latest/download/geoip.dat.sha256sum")
siteDatSha256, err := httpGet("https://github.com/v2fly/geoip/releases/latest/download/geoip.dat.sha256sum")
if err != nil {
err = fmt.Errorf("%w: %v", FailCheckSha, err)
log.Warn("UpdateLocalGeoIP: %v", err)
Expand Down
4 changes: 2 additions & 2 deletions service/core/v2ray/asset/dat/geosite.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ func UpdateLocalGeoSite() (err error) {
return err
}

if err = asset.Download("https://hubmirror.v2raya.org/v2fly/domain-list-community/releases/latest/download/dlc.dat", pathSiteDat+".new"); err != nil {
if err = asset.Download("https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat", pathSiteDat+".new"); err != nil {
log.Warn("UpdateLocalGeoSite: %v", err)
return
}
siteDatSha256, err := httpGet("https://hubmirror.v2raya.org/v2fly/domain-list-community/releases/latest/download/dlc.dat.sha256sum")
siteDatSha256, err := httpGet("https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat.sha256sum")
if err != nil {
err = fmt.Errorf("%w: %v", FailCheckSha, err)
log.Warn("UpdateLocalGeoSite: %v", err)
Expand Down
6 changes: 3 additions & 3 deletions service/core/v2ray/asset/dat/gfwlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func GetRemoteGFWListUpdateTime(c *http.Client) (gfwlist GFWList, err error) {
if !g.UpdateTime.IsZero() {
return g, nil
}
resp, err := httpClient.HttpGetUsingSpecificClient(c, "https://hubmirror.v2raya.org/api/v2rayA/dist-v2ray-rules-dat/tags")
resp, err := httpClient.HttpGetUsingSpecificClient(c, "https://api.github.com/repos/v2rayA/dist-v2ray-rules-dat/tags")
if err != nil {
err = fmt.Errorf("failed to get latest version of GFWList: %w", err)
return
Expand Down Expand Up @@ -108,12 +108,12 @@ func UpdateLocalGFWList() (localGFWListVersionAfterUpdate string, err error) {
if err != nil {
return "", err
}
u := fmt.Sprintf(`https://hubmirror.v2raya.org/v2rayA/dist-v2ray-rules-dat/raw/%v/geosite.dat`, gfwlist.Tag)
u := fmt.Sprintf(`https://github.com/v2rayA/dist-v2ray-rules-dat/raw/%v/geosite.dat`, gfwlist.Tag)
if err = asset.Download(u, pathSiteDat+".new"); err != nil {
log.Warn("UpdateLocalGFWList: %v", err)
return
}
u2 := fmt.Sprintf(`https://hubmirror.v2raya.org/v2rayA/dist-v2ray-rules-dat/raw/%v/geosite.dat.sha256sum`, gfwlist.Tag)
u2 := fmt.Sprintf(`https://github.com/v2rayA/dist-v2ray-rules-dat/raw/%v/geosite.dat.sha256sum`, gfwlist.Tag)
siteDatSha256, err := httpGet(u2)
if err != nil {
err = fmt.Errorf("%w: %v", FailCheckSha, err)
Expand Down
2 changes: 1 addition & 1 deletion service/server/service/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func CheckUpdate() (foundNew bool, remoteVersion string, err error) {
resp, err := http.Get("https://apt.v2raya.org/dists/v2raya/main/binary-amd64/Packages")
resp, err := http.Get("https://raw.githubusercontent.com/v2rayA/v2raya-apt/master/dists/v2raya/main/binary-amd64/Packages")
if err != nil {
return
}
Expand Down

0 comments on commit dfe0078

Please sign in to comment.